-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yaml
41 lines (37 loc) · 1.25 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
# =================================================================
# 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
- wsl # Whitespace style enforcer, a matter of taste
- 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
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: [160]