Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump go x tools to v0.2.0 #260

Closed
wants to merge 2 commits into from
Closed

Conversation

Codelax
Copy link

@Codelax Codelax commented Nov 2, 2022

I updated golang.org/x/tools to v0.2.0

I also changed broken tests to use variable assignation instead of variable declaration.
Using variable declaration in tests will fails as the code output will fail with gofmt and analysistest.RunWithSuggestedFixes expect edited code to be able to run under gofmt.

Old test would do

var failingAlias =  e.Command // want "avoid os/exec.Command"

to

var failingAlias =  // want "avoid os/exec.Command"

This will also fail with the bulk version

var (
    failingAlias =  // want "avoid os/exec.Command"
)

If you prefer i could change XR007 and XR008 to edit assignments and variables declaration containing the selectionExpr.
It would work like this

var (
    failingAlias =  e.Command // want "avoid os/exec.Command"
)

to

var (
    // want "avoid os/exec.Command"
)

@bflad
Copy link
Owner

bflad commented Apr 13, 2023

After some rigamarole with needing to upgrade Go (#269) and then x/tools (#270), this should be resolved in the upcoming v0.29.0 release 🔜 . Thanks for submitting this and sorry for the delayed resolution.

@bflad bflad closed this Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants