license/.golangci.yml

93 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2022-08-16 06:00:03 +00:00
run:
2024-05-07 18:15:51 +00:00
timeout: 5m
2022-08-16 06:00:03 +00:00
tests: false
output:
sort-results: true
linters:
disable-all: true
enable:
2024-05-07 18:15:51 +00:00
# Default
2022-08-16 06:00:03 +00:00
- errcheck
- gosimple
- govet
2024-05-07 18:15:51 +00:00
- ineffassign
2022-08-16 06:00:03 +00:00
- staticcheck
- typecheck
- unused
2024-05-07 18:15:51 +00:00
# Custom
- err113
- errchkjson
2022-08-16 06:00:03 +00:00
- errname
- errorlint
2024-05-07 18:15:51 +00:00
- forcetypeassert
- gocritic
2022-08-16 06:00:03 +00:00
- gofumpt
- gosec
- importas
- makezero
- nilnil
2024-05-07 18:15:51 +00:00
- noctx
2022-08-16 06:00:03 +00:00
- prealloc
2024-05-07 18:15:51 +00:00
- reassign
- sqlclosecheck
2022-08-16 06:00:03 +00:00
- unconvert
fast: true
linters-settings:
2024-05-07 18:15:51 +00:00
# Default
2022-08-16 06:00:03 +00:00
govet:
check-shadowing: false
disable-all: true
enable:
- assign
- atomic
- bools
- buildtag
- composites
- copylocks
- fieldalignment
- httpresponse
- loopclosure
- lostcancel
- nilfunc
- printf
- unmarshal
- unreachable
- unusedresult
staticcheck:
checks: ["all", "-SA1019"]
2024-05-07 18:15:51 +00:00
# Custom
gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch
- unnamedResult
- whyNoLint
enabled-tags:
- diagnostic
- style
gosec:
excludes:
- G101
- G112
- G402
- G404
- G501
- G505
exclude-generated: true
reassign:
patterns:
- ".*"
issues:
exclude-dirs:
- ".*test.*"
- ".*mock.*"
- ".*example.*"
- ".*utils.*"
exclude-files:
- ".*Mock.*"
- ".*_mock.*"