-
Notifications
You must be signed in to change notification settings - Fork 812
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
Add funcorder linter #4939
Add funcorder linter #4939
Conversation
58554de
to
d695ffe
Compare
"golang.org/x/tools/go/analysis/singlechecker" | ||
) | ||
|
||
func main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the tool used? Do we need to run it manually? Do we need to pass the file we want to fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it's a script that runs manually. go run main.go will output the command line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this isn't hooked into the make lint
step yet? should that be done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. and we should probably move this to internal/tools/go.mod
What changed?
We need to sort the order of access methods in preparation for add codegen components. So I wrote a simple ast-based linter that automatically scan through the package and apply the changes.
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes