-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.golangci.yml
More file actions
88 lines (86 loc) · 1.87 KB
/
Copy path.golangci.yml
File metadata and controls
88 lines (86 loc) · 1.87 KB
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
version: '2'
linters:
default: all
disable:
- depguard
- err113
- exhaustive
- exhaustruct
- forcetypeassert
- gochecknoglobals
- gocyclo
- gosec
- godox
- mnd
- nlreturn
- noinlineerr
- nonamedreturns
- paralleltest
- varnamelen
- wrapcheck
- wsl
- wsl_v5
settings:
cyclop:
max-complexity: 20
funlen:
# Complexity is already covered by cyclop and gocognit.
statements: -1
govet:
enable-all: true
disable: [fieldalignment]
revive:
enable-all-rules: true
rules:
- name: line-length-limit
disabled: true # covered by lll
- name: function-length
disabled: true # covered by funlen
- name: cognitive-complexity
disabled: true # covered by gocognit
- name: cyclomatic
disabled: true # covered by cyclop
- name: add-constant
disabled: true # covered by goconst/mnd
- name: unnecessary-format
disabled: true # covered by perfsprint
- name: enforce-switch-style
disabled: true
- name: flag-parameter
disabled: true
nolintlint:
require-specific: true
exclusions:
presets:
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
- funlen
- gocognit
- goconst
- maintidx
path: (.+)_test.go
- linters: [govet]
text: 'shadow: declaration of "err" shadows declaration'
paths:
- testdata
- cmd/gocondense/internal.go
formatters:
enable:
- gofmt
- gofumpt
- goimports
- golines
settings:
gofmt:
rewrite-rules:
- pattern: interface{}
replacement: any
gofumpt:
extra-rules: true
golines:
max-len: 120
tab-len: 2