-
Notifications
You must be signed in to change notification settings - Fork 23
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 tools and fix CI #110
Conversation
24f7ff7
to
4753d60
Compare
nakedret: | ||
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30 | ||
max-func-lines: 0 |
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.
nakedret
is a linting check in both the elastic-agent
and beats
repos. To keep coding standards consistent across repos, perhaps it should be kept here as well and added to the enabled checks?
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.
To be clear, it is still enabled here. What this section does is set it to error for any function with a naked return. Removing it keeps it enabled, but at default configuration, which only applies to functions longer than 30 lines.
And yeah, imo we should do this everywhere. We recently did in elastic agent (elastic/elastic-agent#5442).
💚 Build Succeeded
History
|
Update github.com/elastic/elastic-agent-libs so we get a more recent version of golangci-lint locally. Now running
mage lint
gives the same result as the Github Action.Fix linter errors in existing code, drop deprecated linters, and revert the
nakedret
linter to its default config.I've also updated the default Go version to 1.22.7, as the updated tooling requires it.