dotfiles/.golangci.yml

94 lines
1.4 KiB
YAML
Raw Normal View History

2022-07-04 05:37:10 +00:00
run:
2023-06-28 17:50:06 +00:00
timeout: 5m
2022-07-04 05:37:10 +00:00
tests: false
skip-dirs:
- ".*test.*"
- ".*mock.*"
- ".*example.*"
2023-02-25 16:30:20 +00:00
- ".*utils.*"
2022-07-04 05:37:10 +00:00
skip-files:
- ".*Mock.*"
- ".*_mock.*"
output:
sort-results: true
linters:
disable-all: true
enable:
2023-02-25 16:30:20 +00:00
# Default
2022-07-04 05:37:10 +00:00
- errcheck
- gosimple
- govet
- ineffassign
2022-07-04 05:37:10 +00:00
- staticcheck
- typecheck
- unused
2023-02-25 16:30:20 +00:00
# Custom
- errchkjson
2022-07-04 05:37:10 +00:00
- errname
- errorlint
- execinquery
2023-02-25 16:30:20 +00:00
- forcetypeassert
- gocritic
2022-07-04 05:37:10 +00:00
- goerr113
- gofumpt
- gosec
- importas
- makezero
- nilnil
2023-06-28 17:50:06 +00:00
- noctx
2022-07-04 05:37:10 +00:00
- prealloc
2023-02-25 16:30:20 +00:00
- reassign
# - rowserrcheck
- sqlclosecheck
2022-07-04 05:37:10 +00:00
- unconvert
2023-02-25 16:30:20 +00:00
# - wastedassign
2022-07-04 05:37:10 +00:00
fast: true
linters-settings:
2023-02-25 16:30:20 +00:00
# Default
2022-07-04 05:37:10 +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
2023-06-28 17:50:06 +00:00
staticcheck:
checks: ["all", "-SA1019"]
2023-02-25 16:30:20 +00:00
# Custom
gocritic:
2023-02-25 16:30:20 +00:00
disabled-checks:
- ifElseChain
- singleCaseSwitch
2023-06-28 17:50:06 +00:00
- unnamedResult
- whyNoLint
enabled-tags:
2023-02-25 16:30:20 +00:00
- diagnostic
- style
2023-02-25 16:30:20 +00:00
gosec:
2023-06-28 17:50:06 +00:00
excludes:
- G101
- G112
- G402
- G404
- G501
- G505
2023-02-25 16:30:20 +00:00
exclude-generated: true
reassign:
patterns:
- ".*"