-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.golangci.yaml
46 lines (42 loc) · 1.47 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
# =================================================================
# 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
- gosec # Find security issues
- wsl # Whitespace linter
- stylecheck # A few Go style rules
- misspell # Find misspelled words
- 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
#- gomnd # Find magic numbers, enable at your peril
linters-settings:
misspell:
locale: UK # Enable UK spelling
# 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