Skip to content

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

Merged
merged 2 commits into from
Aug 20, 2021
Merged

use golangci-lint-action #81

merged 2 commits into from
Aug 20, 2021

Conversation

pohly
Copy link
Contributor

@pohly pohly commented Aug 20, 2021

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

@pohly pohly force-pushed the linter branch 3 times, most recently from 4e56ae4 to ceaf8c6 Compare August 20, 2021 07:29
@pohly pohly changed the title TEST: introduce lint failure use golangci-lint-action Aug 20, 2021
@pohly
Copy link
Contributor Author

pohly commented Aug 20, 2021

@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
Copy link
Contributor Author

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.

Copy link
Contributor

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 :)

@thockin thockin self-assigned this Aug 20, 2021
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
@thockin thockin merged commit 8772683 into go-logr:master Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint: comment check
2 participants