-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yaml
69 lines (68 loc) · 2.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
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
linters-settings:
dogsled:
# Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()).
max-blank-identifiers: 2
gocognit:
# Minimal cognitive complexity to report.
min-complexity: 20
gocyclo:
# Minimal cyclomatic complexity to report.
min-complexity: 10
gofumpt:
# Whether or not to use the extra rules extending gofmt.
extra-rules: true
golint:
min-confidence: 0
lll:
# Mininal line length to report.
line-length: 120
# Tab 'legth' when counting length of the line.
tab-width: 1
misspell:
# Locale to use when checking for misspellings.
locale: "US"
nestif:
# Minimal complexity of if statements to report.
min-complexity: 4
prealloc:
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them
simple: false
# Report preallocation suggestions on range loops.
range-loops: true
# Report preallocation suggestions on for loops.
for-loops: true
wsl:
# If true append is only allowed to be cuddled if appending value is matching variables, fields or types on line above
strict-append: true
# Allow calls and assignments to be cuddled as long as the lines have any matching variables, fields or types.
allow-assign-and-call: false
# Allow multiline assignments to be cuddled.
allow-multiline-assign: false
# Allow declarations (var) to be cuddled.
allow-cuddle-declarations: false
# Allow trailing comments in ending of blocks.
allow-trailing-comment: false
# Force newlines in end of case at this limit (0 = never).
force-case-trailing-whitespace: 0
# Force cuddling of err checks with err var assignment.
force-err-cuddling: true
# Allow leading comments to be separated with empty lines.
allow-separated-leading-comment: false
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- dogsled
- gocognit
- maligned
- gocyclo
- gofumpt
- golint
- lll
- misspell
- nestif
- noctx # Doesn't have any config for linters-settings section.
- prealloc
- testpackage
- wsl