-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.golangci.yaml
57 lines (54 loc) · 1.72 KB
/
.golangci.yaml
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
52
53
54
55
56
57
linters-settings:
govet:
enable:
- fieldalignment
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 3
gocyclo:
min-complexity: 15
lll:
line-length: 120
revive:
confidence: 0.8
linters:
enable:
- bodyclose # Checks whether HTTP response body is closed
- dogsled # Checks assignments with too many blank identifiers
- dupl # Code clone detection
- errcheck # Error handling checks
- copyloopvar # Checks for pointers to enclosing loop variables
- goconst # Finds repeated strings that could be constants
- gocritic # Various diagnostic checks
- gocyclo # Cyclomatic complexity
- gofmt # Formatting checks
- gosec # Security checks
- gosimple # Simplifies code
- govet # Reports suspicious constructs
- ineffassign # Detects unused assignments
- lll # Line length limits
- misspell # Spelling mistakes
- nakedret # Naked returns
- prealloc # Suggests slice preallocation
- revive # Fast, configurable, extensible, flexible, and beautiful linter
- staticcheck # Static analysis checks
- stylecheck # Style checks
- typecheck # Type-checking
- unconvert # Unnecessary type conversions
- unparam # Unused parameters
- unused # Unused code
- whitespace # Trailing whitespace and unnecessary blank lines
run:
timeout: 5m
tests: true
issues:
exclude-dirs:
- vendor
max-same-issues: 20
exclude-rules:
- path: _test\.go
linters:
- dupl
- gosec