Skip to content

Migrate golangcilint#233

Merged
EthanHeilman merged 3 commits into
openpubkey:mainfrom
datosh:migrate-golangcilint
Jun 23, 2025
Merged

Migrate golangcilint#233
EthanHeilman merged 3 commits into
openpubkey:mainfrom
datosh:migrate-golangcilint

Conversation

@datosh
Copy link
Copy Markdown
Contributor

@datosh datosh commented Jun 23, 2025

Migrated golangci-lint to version 2 as we were already using version 2.x of golangci-lint, to fix pipeline in #122

I migrated the configuration file using the tool assissted approach as per documentation. This leads to some changes, most relevant for us "run.timeout: the existing value is ignored because, in v2, there is no timeout by default.". I would say we accept this for now, and if the action takes too long we add a timeout there.

There have also been changes to the used linters (even though I followed their docs). gosimple for example was available in v1 but vanished in v2.

Do you have strong feelings about the included linters @EthanHeilman ?
Happy to add more in this PR or create an issue to look into this.

datosh added 3 commits June 23, 2025 20:42
Signed-off-by: Fabian Kammel <fabian@kammel.dev>
Signed-off-by: Fabian Kammel <fabian@kammel.dev>
Signed-off-by: Fabian Kammel <fabian@kammel.dev>
@EthanHeilman
Copy link
Copy Markdown
Member

No strong feelings about which linters to use as long as they cover roughly the same cases.

Below I just did a double check what is default now and it seems like we only lost gosimple. However I don't think that is a big loss as gosimple has been depreciated in favor of staticcheck.

previously we had:

 gosimple
 govet
 ineffassign
 staticcheck
 unused
 misspell
 gofmt

now:

govet - enabled by default
ineffassign - enabled by default
staticcheck - enabled by default
unused - enabled by default
errcheck -  enabled by default
misspell
gofmt

Copy link
Copy Markdown
Member

@EthanHeilman EthanHeilman left a comment

Choose a reason for hiding this comment

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

LGTM

@EthanHeilman EthanHeilman merged commit 805a280 into openpubkey:main Jun 23, 2025
14 checks passed
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