-
Notifications
You must be signed in to change notification settings - Fork 5
/
.golangci.yml
52 lines (48 loc) · 1.9 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
run:
timeout: 5m
linters:
enable:
- whitespace # Tool for detection of leading and trailing whitespace
- gosec # Security problems
- gci
- misspell # Misspelled English words in comments
- mnd
- gofmt # Whether the code was gofmt-ed
- goimports # Unused imports
- revive
- wastedassign # Finds wasted assignment statements
- unconvert # Unnecessary type conversions
- prealloc # Finds slice declarations that could potentially be pre-allocated
- predeclared # Finds code that shadows one of Go's predeclared identifiers
- nolintlint # Ill-formed or insufficient nolint directives
- makezero # Finds slice declarations with non-zero initial length
- importas # Enforces consistent import aliases
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- goconst # Repeated strings that could be replaced by a constant
- forcetypeassert # Finds forced type assertions
- tparallel # Detects inappropriate usage of t.Parallel() method in your Go test codes
- thelper # Detects golang test helpers without t.Helper() call and checks the consistency of test helpers
- errcheck # Errcheck is a go lint rule for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
- lll # Long lines
linters-settings:
revive:
rules:
- name: exported
arguments:
- disableStutteringCheck
goconst:
min-len: 4
min-occurrences: 3
issues:
exclude-rules:
- path: _test\.go
linters:
- gosec
- lll
exclude-dirs:
- test
include:
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments