-
Notifications
You must be signed in to change notification settings - Fork 36
chore(build): migrate to golangci-lint@v2 and golangci-lint-action@v7 #523
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
MatousJobanek
merged 4 commits into
codeready-toolchain:master
from
xcoulon:golangci_2_regsvc
Apr 2, 2025
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cc4e829
chore(build): migrate to golangci-lint@v2 and golangci-lint-action@v7
xcoulon d097a29
Update pkg/middleware/promhttp_middleware_test.go
xcoulon fe2a319
Merge branch 'master' into golangci_2_regsvc
metlos c8eef4c
Merge branch 'master' into golangci_2_regsvc
metlos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,61 @@ | ||
run: | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
timeout: 10m | ||
|
||
version: "2" | ||
linters: | ||
enable: | ||
- megacheck | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- durationcheck | ||
- errchkjson | ||
- errorlint | ||
- exhaustive | ||
- gocheckcompilerdirectives | ||
- gochecksumtype | ||
- gocyclo | ||
- gofmt | ||
- revive | ||
- misspell | ||
- gosec | ||
presets: # groups of linters. See https://golangci-lint.run/usage/linters/ | ||
- bugs | ||
- unused | ||
disable: | ||
- golint # deprecated, use 'revive' | ||
- scopelint # deprecated, use 'exportloopref' | ||
- contextcheck # too many false-positives | ||
- noctx # not needed | ||
|
||
# all available settings of specific linters | ||
linters-settings: | ||
unparam: | ||
# Inspect exported functions, default is false. Set to true if no external program/library imports your code. | ||
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: | ||
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations | ||
# with golangci-lint call it on a directory with the changed file. | ||
check-exported: true | ||
testifylint: | ||
disable: | ||
- suite-dont-use-pkg | ||
|
||
- gosmopolitan | ||
- loggercheck | ||
- makezero | ||
- misspell | ||
- musttag | ||
- nilerr | ||
- nilnesserr | ||
- protogetter | ||
- reassign | ||
- recvcheck | ||
- revive | ||
- rowserrcheck | ||
- spancheck | ||
- sqlclosecheck | ||
- testifylint | ||
- unparam | ||
- zerologlint | ||
disable: | ||
- contextcheck | ||
- noctx | ||
settings: | ||
testifylint: | ||
disable: | ||
- suite-dont-use-pkg | ||
unparam: | ||
check-exported: true | ||
exclusions: | ||
generated: lax | ||
presets: | ||
- comments | ||
- common-false-positives | ||
- legacy | ||
- std-error-handling | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ | ||
formatters: | ||
enable: | ||
- gofmt | ||
exclusions: | ||
generated: lax | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.