-
Notifications
You must be signed in to change notification settings - Fork 241
Fix all lint issues #981
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
Fix all lint issues #981
Conversation
``` $ golangci-lint run ./... --max-issues-per-linter=0 --max-same-issues=0 ```
max := client.options.MaxBreadcrumbs | ||
limit := client.options.MaxBreadcrumbs | ||
switch { | ||
case max < 0: | ||
case limit < 0: | ||
return | ||
case max == 0: | ||
max = defaultMaxBreadcrumbs | ||
case max > maxBreadcrumbs: | ||
max = maxBreadcrumbs |
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.
limit
is the name used by AddBreadcrumb
, and it doesn't shadow the Go builtin max
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #981 +/- ##
==========================================
+ Coverage 83.64% 83.65% +0.01%
==========================================
Files 50 50
Lines 5159 5159
==========================================
+ Hits 4315 4316 +1
Misses 687 687
+ Partials 157 156 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@cleptric this PR is of course partially redundant with #982. This begs the question — is it necessary to remove the For reference, here's the golangci-lint-action logic for fetching the PR patch: Without the token provided, I'd expect I think this is because That's fine for PRs from branches in this repo, but I believe that secret will not be set for PRs from external forks. If the secret isn't set, It seems preferable to just drop the flag. If there are no lint issues on master, then any lint issue on a PR is, by definition, new :) |
Yes, we can just remove it and lint should fail on all, not just new issues. Will review this next week. |
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.
Thanks!
Changes
_
forrevive
— to bring all files into compliance with the current golangci-lint config.//nolint
directive in a follow-up.only-new-issues: true
andgithub-token
options from thegolangci-lint-action
step.github-token
is only necessary whenonly-new-issues: true
.github-token
to thegolangci-lint-action
step.Testing
I believe CI should run the version of the lint.yml action on this branch.
make test
andmake lint
succeed locally: