-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.golangci.yaml
108 lines (108 loc) · 2.7 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
run:
build-tags:
- nolibopusfile
linters:
presets:
- bugs
- comment
- performance
- format
- test
enable:
- copyloopvar
- goconst
- godot
- intrange
- predeclared
- revive
- stylecheck
- unconvert
- usestdlibvars
- whitespace
- zerologlint
disable:
- asciicheck # Unicode is fine!
- contextcheck # Neat but doesn't understand request contexts in this project
- godox # The point of a TODO is something you can't do yet...
- gofumpt # Neat tool but no editor integration
- gci # Bugged? Stdlib imports out of order
- testpackage # Test packages only allow blackbox testing
- exhaustruct # Too verbose
linters-settings:
gosec:
excludes:
- G107 # Intentional use of custom webhooks
- G115 # https://github.com/securego/gosec/issues/1187
- G404 # We aren't using math/rand/v2 for secure random numbers in this project
revive:
rules:
- name: bool-literal-in-expr
enabled: true
- name: confusing-naming
enabled: true
- name: confusing-results
enabled: true
- name: constant-logical-expr
enabled: true
- name: context-as-argument
enabled: true
- name: context-keys-type
enabled: true
- name: defer
enabled: true
- name: early-return
enabled: true
- name: empty-block
enabled: true
- name: error-naming
enabled: true
- name: error-return
enabled: true
- name: error-strings
enabled: true
- name: errorf
enabled: true
- name: exported
enabled: true
- name: identical-branches
enabled: true
- name: if-return
enabled: true
- name: increment-decrement
enabled: true
- name: indent-error-flow
enabled: true
- name: import-shadowing
enabled: true
- name: modifies-value-receiver
enabled: true
- name: package-comments
enabled: true
- name: range
enabled: true
- name: redefines-builtin-id
enabled: true
- name: string-of-int
enabled: true
- name: superfluous-else
enabled: true
- name: time-naming
enabled: true
- name: var-declaration
enabled: true
- name: unconditional-recursion
enabled: true
- name: unhandled-error
enabled: true
- name: unnecessary-stmt
enabled: true
- name: unreachable-code
enabled: true
- name: unused-parameter
enabled: true
- name: unused-receiver
enabled: true
- name: waitgroup-by-value
enabled: true
issues:
max-same-issues: 0