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

run-checks: update to match new argument syntax of ineffassign #9806

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

jhenstridge
Copy link
Contributor

The ineffassign utility has changed its argument syntax so that the static checks fail with:

-: no Go files in .../src/github.com/snapcore/snapd
ineffassign: error during loading

To check the current package and all sub-packages, we now need to pass ./... as the argument (as outlined in gordonklaus/ineffassign#51).

@jhenstridge jhenstridge added Skip spread Indicate that spread job should not run Simple 😃 A small PR which can be reviewed quickly labels Jan 4, 2021
Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@jhenstridge
Copy link
Contributor Author

This is failing the Go 1.9 unit test run with:

# golang.org/x/tools/go/analysis
../../../golang.org/x/tools/go/analysis/validate.go:119:8: undefined: strings.Builder
# golang.org/x/tools/go/packages
../../../golang.org/x/tools/go/packages/golist_overlay.go:547:7: undefined: strings.ReplaceAll

The changes to ineffassign add a dependency on golang.org/x/tools, which in turn depends on stdlib features not found in Go 1.9. I'm not sure of the best way around this part of the change. Maybe disabling the test on old Go would be appropriate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly Skip spread Indicate that spread job should not run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants