Skip to content

Upgrade to golangci-lint v2.2.1 + disable some annoying lints + fix others #989

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 1 commit into from
Jul 27, 2025

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Jul 27, 2025

Here, upgrade golangci-lint to v2.2.1, mostly because my local version
is upgraded and throwing problems.

Some really, really, really-no-good lints have been added (noinlineerr
and wsl_v5) which we disable.

Some others have been added which are good, which we keep. One checks
that there's a consistent whitespace between embedded structs and other
properties on a struct definition. Another makes sure we're using the
context form of logging functions, so WarnContext instead of Warn.

@brandur brandur requested a review from bgentry July 27, 2025 06:24
…thers

Here, upgrade golangci-lint to v2.2.1, mostly because my local version
is upgraded and throwing problems.

Some really, really, really-no-good lints have been added (`noinlineerr`
and `wsl_v5`) which we disable.

Some others have been added which are good, which we keep. One checks
that there's a consistent whitespace between embedded structs and other
properties on a struct definition. Another makes sure we're using the
context form of logging functions, so `WarnContext` instead of `Warn`.
@brandur brandur force-pushed the brandur-golang-ci-lint-v2.2.1-upgrade branch from 0bc6301 to baf299f Compare July 27, 2025 07:16
Copy link
Contributor

@bgentry bgentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had that inline error one pop up the other day, who decided to pull that in as a default?? 🤦🏼‍♂️

@brandur
Copy link
Contributor Author

brandur commented Jul 27, 2025

I had that inline error one pop up the other day, who decided to pull that in as a default?? 🤦🏼‍♂️

Yeah it's crazy!

@brandur brandur merged commit 2edf911 into master Jul 27, 2025
10 checks passed
@brandur brandur deleted the brandur-golang-ci-lint-v2.2.1-upgrade branch July 27, 2025 15:21
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.

2 participants