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

update x/tools #256

Closed
wants to merge 2 commits into from
Closed

update x/tools #256

wants to merge 2 commits into from

Conversation

remyleone
Copy link

No description provided.

@bflad bflad added enhancement New feature or request dependencies Pull requests that update a dependency file labels Apr 8, 2022
@bflad bflad self-assigned this Apr 8, 2022
@bflad bflad added this to the v0.29.0 milestone Apr 8, 2022
@bflad
Copy link
Owner

bflad commented Apr 8, 2022

@remyleone can you ensure that all the files from go mod vendor are added as well? Thanks!

@bflad
Copy link
Owner

bflad commented Apr 8, 2022

Very strange:

--- FAIL: TestAnalyzerFixes (1.19s)
Error:     analysistest.go:229: /home/runner/work/tfproviderlint/tfproviderlint/xpasses/XR007/testdata/src/a/alias.go: error formatting resulting source: 9:6: expected '(', found fAlias (and 1 more errors)
        package a
        
        import (
        	e "os/exec"
        )
        
        var failingAlias =  // want "avoid os/exec.Command"
        
        func fAlias() {
        	 // want "avoid os/exec.Command"
        
        	failingAlias("true")
        }

https://github.com/bflad/tfproviderlint/blob/9717018be82635e82809d1f68179793bfe088e12/xpasses/XR007/testdata/src/a/alias.go

package a

import (
	e "os/exec"
)

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

func fAlias() {
	e.Command("true") // want "avoid os/exec.Command"

	failingAlias("true")
}

Maybe switching those files to this syntax will fix them as a quick fix for whatever is going on differently in x/tools:

var (
  // ... 
)

@mattburgess
Copy link

mattburgess commented Jul 6, 2022

If it helps any, I bisected those test failures down to golang.org/x/tools v0.1.8. Using v0.1.7, they pass just fine. Interestingly, and maybe related, it's v0.1.8 that fixes the original issue this was intended to fix, namely #255 which I happen to be hitting trying to run make providerlint on the AWS provider.

@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
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants