-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
44 lines (40 loc) · 1.28 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
# =================================================================
# An opinionated config for linting Go code with golangci-lint
# See https://golangci-lint.run/usage/linters/
# =================================================================
linters:
enable:
- revive # Replacement for golint
- gofmt # Runs gofmt as part of the linter
- whitespace # Whitespace end of lines
- stylecheck # A few Go style rules
- cyclop # Find cyclomatic complexity
- gocyclo # Also find cyclomatic complexity
- bodyclose # Check for HTTP body close errors
- nilerr # Find bad nil/err handling
- nilnil # Also find bad nil/err handling
- tagliatelle # Find badly named struct tags
issues:
exclude:
- composite
linters-settings:
# Check struck tag naming
tagliatelle:
case:
use-field-name: true
rules:
json: goCamel
yaml: goCamel
revive:
severity: error
enable-all-rules: false
confidence: 0.5
rules:
# There are MANY rules you could enable...
# See https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
# And https://golangci-lint.run/usage/linters/#revive
- name: line-length-limit
severity: error
arguments: [120]
- name: var-naming
severity: error