test linter

mine
derailed 2025-03-30 18:52:30 -06:00
parent 0c99540fb3
commit bed484213c
1 changed files with 99 additions and 98 deletions

View File

@ -1,4 +1,5 @@
version: "2"
run:
concurrency: 8
@ -18,7 +19,7 @@ formatters:
# - golines
linters:
disable-all: true
# disable-all: true
enable:
- sloglint
exclusions:
@ -29,7 +30,7 @@ linters:
- examples$
- \\.(generated\\.deepcopy|pb)\\.go$
settings:
settings:
gocyclo:
min-complexity: 35
@ -120,26 +121,26 @@ issues:
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
exclude-dirs-use-default: true
# exclude-dirs-use-default: true
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters: [staticcheck]
text: "SA1019" # this is rule for deprecated method
# exclude-rules:
# - linters: [staticcheck]
# text: "SA1019" # this is rule for deprecated method
- linters: [staticcheck]
text: "SA9003: empty branch"
# - linters: [staticcheck]
# text: "SA9003: empty branch"
- linters: [staticcheck]
text: "SA2001: empty critical section"
# - linters: [staticcheck]
# text: "SA2001: empty critical section"
- linters: [err113]
text: "do not define dynamic errors, use wrapped static errors instead" # This rule to avoid opinionated check fmt.Errorf("text")
# Skip goimports check on generated files
- path: \\.(generated\\.deepcopy|pb)\\.go$
linters:
- goimports
# Skip goheader check on files imported and modified from upstream k8s
- path: "pkg/ipam/(cidrset|service)/.+\\.go"
linters:
- goheader
# - linters: [err113]
# text: "do not define dynamic errors, use wrapped static errors instead" # This rule to avoid opinionated check fmt.Errorf("text")
# # Skip goimports check on generated files
# - path: \\.(generated\\.deepcopy|pb)\\.go$
# linters:
# - goimports
# # Skip goheader check on files imported and modified from upstream k8s
# - path: "pkg/ipam/(cidrset|service)/.+\\.go"
# linters:
# - goheader