118 lines
2.4 KiB
YAML
118 lines
2.4 KiB
YAML
---
|
|
version: "2"
|
|
run:
|
|
timeout: 5m
|
|
tests: true
|
|
output:
|
|
formats:
|
|
text:
|
|
path: stdout
|
|
linters:
|
|
default: none
|
|
enable:
|
|
- bodyclose
|
|
- dogsled
|
|
- dupl
|
|
- errcheck
|
|
- exhaustive
|
|
- gochecknoinits
|
|
- goconst
|
|
- gocritic
|
|
- gocyclo
|
|
- goprintffuncname
|
|
- gosec
|
|
- govet
|
|
- ineffassign
|
|
- lll
|
|
- misspell
|
|
- nakedret
|
|
- noctx
|
|
- nolintlint
|
|
- rowserrcheck
|
|
- staticcheck
|
|
- unconvert
|
|
- unparam
|
|
- unused
|
|
- whitespace
|
|
- revive
|
|
settings:
|
|
nolintlint:
|
|
allow-unused: true
|
|
govet:
|
|
enable:
|
|
- shadow
|
|
- fieldalignment
|
|
gocyclo:
|
|
min-complexity: 15
|
|
dupl:
|
|
threshold: 100
|
|
goconst:
|
|
min-len: 3
|
|
min-occurrences: 3
|
|
misspell:
|
|
locale: US
|
|
ignore-rules:
|
|
- cancelled
|
|
- cancelling
|
|
- behaviour
|
|
- colour
|
|
- sanitise
|
|
- initialise
|
|
- optimise
|
|
- normalised
|
|
lll:
|
|
line-length: 100
|
|
revive:
|
|
confidence: 0.8
|
|
exclusions:
|
|
rules:
|
|
# G306: File permissions - acceptable for test files and scripts
|
|
- text: "G306:"
|
|
linters:
|
|
- gosec
|
|
# Exclude linters for test files
|
|
- path: ".*_test\\.go"
|
|
linters:
|
|
- gocyclo
|
|
- errcheck
|
|
- dupl
|
|
- lll
|
|
- gosec
|
|
- revive
|
|
# Exclude errcheck for tests directory
|
|
- path: "^tests/"
|
|
linters:
|
|
- errcheck
|
|
# approve insecureSkipVerify in test files
|
|
- path: _test\\.go
|
|
text: "insecureSkipVerify"
|
|
linters:
|
|
- gosec
|
|
# Exclude gosec G204 for tests and tools via source match
|
|
- source: "exec\\.CommandContext"
|
|
path: "(tests|tools)/"
|
|
linters:
|
|
- gosec
|
|
# Exclude revive for api package naming via source match
|
|
- source: "^package api$"
|
|
linters:
|
|
- revive
|
|
# Known legacy staticcheck issue
|
|
- path: "^internal/worker/snapshot_store\\.go$"
|
|
text: "SA1019"
|
|
linters:
|
|
- staticcheck
|
|
# Known legacy unparam issue
|
|
- path: "^internal/resources/manager\\.go$"
|
|
text: "gpuSlotsForTask"
|
|
linters:
|
|
- unparam
|
|
# Ignore whitespace-only lint noise in this file
|
|
- path: "^internal/api/ws_jobs\\.go$"
|
|
linters:
|
|
- whitespace
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
severity:
|
|
default: error
|