-
Notifications
You must be signed in to change notification settings - Fork 395
chore(deps): update dependency golangci/golangci-lint to v2 #2804
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
733de6c to
70d120a
Compare
47ddce0 to
820507c
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
|
@flouthoc could you take a look, please? This is mostly a dumb dependency update, but the warning changes are large enough that I’d prefer not to merge this with no review at all. |
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 agree this commit reduces readability.
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 — that’s now consensus enough that I’d prefer to this, either silencing the warnings or restructuring to avoid them.
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.
If you need an extra data point to make a decision, I'm disabling QF1008 in couple of other repos.
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 have disabled QF1008 now — if we embed a field anonymously, that’s either for JSON etc. decoding, or as a mixing for a partial interface implementation. In both cases, being explicit about the embedded field makes it easier to audit code for correctly handling all fields of both the embedder and the embedder.
flouthoc
left a comment
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.
LGTM
.golangci.yml
Outdated
| --- | ||
| version: "2" | ||
| run: | ||
| concurrency: 6 |
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.
Can remove concurrency while at it
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, done.
.golangci.yml
Outdated
| staticcheck: | ||
| checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1005"] # golangci-lint's default, we add -ST1005 | ||
| exclusions: | ||
| generated: lax |
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'd rather have strict here.
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.
We don’t actually have any generated code, and thus we have no opinion — we can drop this and let the linter’s default do the best it can, maybe improving over time.
820507c to
5af10c8
Compare
Should not change behavior Signed-off-by: Miloslav Trmač <[email protected]>
…tion" ... actually inline the code into the only user. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
time.IsZero() is probably a bit slower, but relying on an explicit API should be better long-term. Signed-off-by: Miloslav Trmač <[email protected]>
…...))" Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Miloslav Trmač <[email protected]>
5af10c8 to
ff238bc
Compare
kolyshkin
left a comment
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.
LGTM
This PR contains the following updates:
1.64.8->2.0.0Release Notes
golangci/golangci-lint (golangci/golangci-lint)
v2.0.0Compare Source
golangci-lint fmtcommand with dedicated formatter configuration (https://golangci-lint.run/welcome/quick-start/#formatting)golangci-lint migratecommand to help migration from v1 to v2 (cf. Migration guide)run.relative-path-mode(cf. Migration guide)--fast-onlyflag (cf. Migration guide)linters.exclusions.warn-unusedto log a warning if an exclusion rule is unused.golinesformatter https://github.com/segmentio/golinesstaticcheck,stylecheck,gosimpleinto one linter (staticcheck) (cf. Migration guide)go-critic: from 0.12.0 to 0.13.0gomodguard: from 1.3.5 to 1.4.1 (block explicit indirect dependencies)nilnil: from 1.0.1 to 1.1.0 (new option:only-two)perfsprint: from 0.8.2 to 0.9.1 (checker name in the diagnostic message)staticcheck: newquickfixset of rulestestifylint: from 1.5.2 to 1.6.0 (new options:equal-values,suite-method-signature,require-string-msg)wsl: from 4.5.0 to 4.6.0 (new option:allow-cuddle-used-in-block)bidichk: from 0.3.2 to 0.3.3errchkjson: from 0.4.0 to 0.4.1errname: from 1.0.0 to 1.1.0funlen: fixignore-commentsoptiongci: from 0.13.5 to 0.13.6gosmopolitan: from 1.2.2 to 1.3.0inamedparam: from 0.1.3 to 0.2.0intrange: from 0.3.0 to 0.3.1protogetter: from 0.3.9 to 0.3.12unparam: from8a5130cto0df0534golangci-lint config path --jsongolangci-lint help linters --jsongolangci-lint help formatters --jsongolangci-lint linters --jsongolangci-lint formatters --jsongolangci-lint version --jsonConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.