-
Notifications
You must be signed in to change notification settings - Fork 13
/
.golangci.yaml
98 lines (93 loc) · 2.99 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
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
run:
timeout: 10s
allow-parallel-runners: true
linters:
enable-all: true
disable:
- depguard
- gci
- godox
- gofmt
- gofumpt
- goheader
- goimports
- varnamelen
- exhaustivestruct # deprecated
- nonamedreturns # we're using named returns quite often
- errname # naming is too strict and is not observed in many places
- golint # deprecated
- importas # may be useful later, requires configuration
- interfacer # deprecated
- maligned # deprecated
- misspell # we have IDE speller
- scopelint # obsoleted, replaced by other linters
- govet # invoked by the goland internally
- tagliatelle # it isn't very handy to have such linter in a monorepo with a lot of different coding standards
- nlreturn # there is wsl linter what implements the same checks
- ifshort # deprecated in 1.48
- structcheck # deprecated 1.49
- varcheck # deprecated 1.49
- nosnakecase # deprecated 1.48
- deadcode # deprecated 1.49
- lll # disabled in favor of revive
- funlen # disabled in favor of revive
- gocognit # disabled in favor of revive
- cyclop # disabled in favor of revive
- gocyclo # disabled in favor of revive
linters-settings:
wsl:
force-case-trailing-whitespace: 1
revive:
enable-all-rules: true
confidence: 0.8
rules:
- name: comment-spacings
severity: warning
disabled: false
arguments: [ "nolint" ]
- name: function-length
severity: warning
disabled: false
arguments: [ 50, 0 ]
- name: function-result-limit
severity: warning
disabled: false
arguments: [ 3 ]
- name: cognitive-complexity
severity: warning
disabled: false
arguments: [ 20 ]
- name: cyclomatic
severity: warning
disabled: false
arguments: [ 10 ]
- name: line-length-limit
severity: warning
disabled: false
arguments: [ 110 ]
- name: argument-limit
severity: warning
disabled: false
arguments: [ 6 ]
# disabled rules
- name: unchecked-type-assertion # forcetypeassert is already used
disabled: true
- name: max-public-structs # quite annoying rule
disabled: true
- name: banned-characters # we don't have banned chars
disabled: true
- name: file-header # we don't have a file headers
disabled: true
- name: flag-parameter # extremely annoying linter, it is absolutely okay to have boolean args
disabled: true
- name: struct-tag # false-positive on tags implemented by other linters
disabled: true
- name: unhandled-error # dont have proper exclusions list ToDo: make a PR
disabled: true
- name: add-constant # dont have exclusions list ToDo: make a PR
disabled: true
- name: empty-lines # it false-positives on one-liners ToDo: make a PR
disabled: true
issues:
max-issues-per-linter: 0
max-same-issues: 0