-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.golangci.yml
121 lines (116 loc) · 2.56 KB
/
.golangci.yml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
run:
tests: false
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters-settings:
goconst:
min-len: 2
min-occurrences: 3
gocyclo:
min-complexity: 30 # Will be decreased later in the devellopement
gosimple:
go: "1.17"
checks: ["all"]
govet:
check-shadowing: true
settings:
printf:
funcs:
- (github.com/sirupsen/logrus).Debugf
- (github.com/sirupsen/logrus).Infof
- (github.com/sirupsen/logrus).Warnf
- (github.com/sirupsen/logrus).Errorf
- (github.com/sirupsen/logrus).Fatalf
misspell:
locale: US
lll:
line-length: 140
revive:
ignore-generated-header: false
severity: warning
confidence: 0.8
errorCode: 1
warningCode: 1
rules:
- name: blank-imports
severity: warning
- name: context-as-argument
severity: warning
- name: context-keys-type
severity: warning
- name: cyclomatic
severity: warning
arguments:
- 30 # Maximum cyclomatic complexity
- name: error-return
severity: warning
- name: error-strings
severity: warning
- name: error-naming
severity: warning
- name: exported
severity: warning
- name: if-return
severity: warning
- name: increment-decrement
severity: warning
- name: var-naming
severity: warning
- name: var-declaration
severity: warning
- name: package-comments
severity: warning
- name: range
severity: warning
- name: receiver-naming
severity: warning
- name: time-naming
severity: warning
- name: unexported-return
severity: warning
- name: indent-error-flow
severity: warning
- name: errorf
severity: warning
- name: empty-block
severity: warning
- name: superfluous-else
severity: warning
- name: unreachable-code
severity: warning
- name: redefines-builtin-id
severity: warning
staticcheck:
go: "1.17"
checks: ["all"]
linters:
disable-all: true
enable:
- dupl
- exportloopref
- goconst
- gocyclo
- godox
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- prealloc
- revive
- rowserrcheck
- staticcheck
- typecheck
- unconvert
- unparam
- whitespace
# Disabled during early devellopment
# - deadcode
# - errcheck
# - gosec
# - structcheck
# - unused
# - varcheck