Skip to content
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

ci: migrate deprecated golangci-lint config #76

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
run:
deadline: 2m

skip-files:
- "zz_generated\\..+\\.go$"
timeout: 5m

output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats:
- format: colored-line-number

linters-settings:
errcheck:
Expand All @@ -21,7 +19,7 @@ linters-settings:
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exclude-functions: fmt:.*,io/ioutil:^Read.*

govet:
# report about shadowed variables
Expand Down Expand Up @@ -104,17 +102,19 @@ linters-settings:

linters:
enable:
- megacheck
- govet
- gocyclo
- gocritic
- goconst
- goimports
- gocritic
- gocyclo
- gofmt # We enable this as well as goimports for its simplify mode.
- prealloc
- unconvert
- goimports
- gosimple
- govet
- misspell
- nakedret
- prealloc
- staticcheck
- unconvert
- unused

presets:
- bugs
Expand All @@ -123,6 +123,9 @@ linters:


issues:
exclude-files:
- "zz_generated\\..+\\.go$"

# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
Expand Down
Loading