-
Notifications
You must be signed in to change notification settings - Fork 84
use golangci-lint-action #81
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
Conversation
4e56ae4
to
ceaf8c6
Compare
@thockin: I've kept the one commit which intentionally introduces a linter violation to demonstrate how the annotations look like. Will remove before we merge. |
The integration with GitHub is better. It uses caching and posts errors as annotations to the PR. This is easier to use than having to dig into the log to find errors.
funcr/funcr.go
Outdated
@@ -67,7 +67,7 @@ type Options struct { | |||
// This has some overhead, so some users might not want it. | |||
LogCaller MessageClass | |||
|
|||
// LogTimestamp tells funcr to add a "ts" key to log lines. This has some | |||
// LogTimestamps tells funcr to add a "ts" key to log lines. This has some |
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.
It's perhaps worth pointing out that this intentional revert to a typo is not flagged as an issue. My theory is that slight grammatical changes like appending "s" are not seen as a problem by the "revive" check.
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.
indeed. It catches that same error on a public method. We should file a bug against revive :)
golangci-lint by default suppresses issues about invalid comments. This let some real errors (cut-and-paste, incomplete rename) slip through. Fixes: go-logr#84
The integration with GitHub is better. It uses caching and posts
errors as annotations to the PR. This is easier to use than having to
dig into the log to find errors.
Fixes #82