1- run :
2- timeout : 1m
3-
4- linters-settings :
5- errcheck :
6- # report about not checking of errors in type assetions: `a := b.(MyStruct)`;
7- # default is false: such cases aren't reported by default.
8- check-type-assertions : true
9-
10- # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
11- # default is false: such cases aren't reported by default.
12- check-blank : false
13-
14- # [deprecated] comma-separated list of pairs of the form pkg:regex
15- # the regex is used to ignore names within pkg. (default "fmt:.*").
16- # see https://github.com/kisielk/errcheck#the-deprecated-method for details
17- # ignore: fmt:.*,io/ioutil:^Read.*
18-
19- # path to a file containing a list of functions to exclude from checking
20- # see https://github.com/kisielk/errcheck#excluding-functions for details
21- # exclude: /path/to/file.txt
22-
23- funlen :
24- lines : 50
25- statements : 40
26-
27- govet :
28- # report about shadowed variables
29- shadow : true
30-
31- # enable or disable analyzers by name
32- # enable:
33- # - atomicalign
34- enable-all : true
35- disable :
36- - fieldalignment
37- # disable-all: false
38- revive :
39- # minimal confidence for issues, default is 0.8
40- min-confidence : 0.8
41- gofmt :
42- # simplify code: gofmt with `-s` option, true by default
43- simplify : true
44- goimports :
45- # put imports beginning with prefix after 3rd-party packages;
46- # it's a comma-separated list of prefixes
47- local-prefixes : github.com/kinbiko/bugsnag
48- gocyclo :
49- # minimal code complexity to report, 30 by default (but we recommend 10-20)
50- # This check is set to an unreasonably low number by most developers'
51- # standards to track the code standard over time
52- min-complexity : 10
53- gocognit :
54- # minimal code complexity to report, 30 by default (but we recommend 10-20)
55- # This check is a more useful cyclomatic complexity called cognitive complexity,
56- # where nested if/for is weighted more, and only one point regardless of
57- # cases in a switch.
58- min-complexity : 11
59- dupl :
60- # tokens count to trigger issue, 150 by default
61- threshold : 100
62- goconst :
63- # minimal length of string constant, 3 by default
64- min-len : 10
65- # minimal occurrences count to trigger, 3 by default
66- min-occurrences : 3
67-
68- # packages-with-error-messages:
69- # specify an error message to output when a blacklisted package is used
70- # github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
71- misspell :
72- # Correct spellings using locale preferences for US or UK.
73- # Default is to use a neutral variety of English.
74- # Setting locale to US will correct the British spelling of 'colour' to 'color'.
75- locale : US
76- # ignore-words:
77- # - someword
78- lll :
79- # max line length, lines longer will be reported. Default is 120.
80- # '\t' is counted as 1 character by default, and can be changed with the tab-width option
81- line-length : 165
82- # tab width in spaces. Default to 1.
83- tab-width : 4
84- unused :
85- # treat code as a program (not a library) and report unused exported identifiers; default is false.
86- # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
87- # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
88- # with golangci-lint call it on a directory with the changed file.
89- check-exported : false
90- unparam :
91- # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
92- # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
93- # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
94- # with golangci-lint call it on a directory with the changed file.
95- check-exported : true
96- nakedret :
97- # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
98- # Naked returns can go plop itself
99- max-func-lines : 0
100- prealloc :
101- # XXX: we don't recommend using this linter before doing performance profiling.
102- # For most programs usage of prealloc will be a premature optimization.
103-
104- # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
105- # True by default.
106- simple : true
107- range-loops : true # Report preallocation suggestions on range loops, true by default
108- for-loops : false # Report preallocation suggestions on for loops, false by default
109- gocritic :
110- # Which checks should be enabled; can't be combined with 'disabled-checks';
111- # See https://go-critic.github.io/overview#checks-overview
112- # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
113- # By default list of stable checks is used.
114- # enabled-checks:
115- # - badCond
116-
117- # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
118- # disabled-checks:
119-
120- # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
121- # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
122- enabled-tags :
123- - diagnostic
124- - style
125- - performance
126-
127- settings : # settings passed to gocritic
128- captLocal : # must be valid enabled check name
129- paramsOnly : true
130- rangeValCopy :
131- sizeThreshold : 64
132- godox :
133- # report any comments starting with keywords, this is useful for TODO or FIXME comments that
134- # might be left in the code accidentally and should be resolved before merging
135- keywords : # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
136- - TODO
137- - FIXME
138- dogsled :
139- # checks assignments with too many blank identifiers; default is 2
140- max-blank-identifiers : 2
141-
142- whitespace :
143- multi-if : false # Enforces newlines (or comments) after every multi-line if statement
144- multi-func : false # Enforces newlines (or comments) after every multi-line function signature
145-
1+ version : " 2"
1462linters :
3+ default : all
1474 disable :
148- - wsl
5+ - depguard
6+ - exhaustruct # replaced by exhaustruct_v5
1497 - godot
8+ - gomodguard # replaced by gomodguard_v2
9+ - modernize
15010 - nlreturn
151-
152- - depguard
153-
154- - gci # This conflicts with goimports
155- - varnamelen # This has too many false positives around indexes etc to be useful
156- presets :
157- - bugs
158- - complexity
159- - format
160- - performance
161- - style
162- - unused
163- fast : false
164-
11+ - noinlineerr
12+ - testableexamples
13+ - varnamelen
14+ - wsl
15+ - wsl_v5
16+ settings :
17+ dupl :
18+ threshold : 100
19+ errcheck :
20+ check-type-assertions : true
21+ funlen :
22+ lines : 50
23+ statements : 40
24+ gocognit :
25+ min-complexity : 11
26+ goconst :
27+ min-len : 10
28+ min-occurrences : 3
29+ gocritic :
30+ enabled-tags :
31+ - diagnostic
32+ - style
33+ - performance
34+ settings :
35+ captLocal :
36+ paramsOnly : true
37+ rangeValCopy :
38+ sizeThreshold : 64
39+ gocyclo :
40+ min-complexity : 10
41+ govet :
42+ enable-all : true
43+ disable :
44+ - fieldalignment
45+ lll :
46+ line-length : 165
47+ tab-width : 4
48+ misspell :
49+ locale : US
50+ nakedret :
51+ max-func-lines : 0
52+ unparam :
53+ check-exported : true
54+ exclusions :
55+ rules :
56+ - path : _test\.go
57+ linters :
58+ - cyclop
59+ - dupl
60+ - errcheck
61+ - errchkjson
62+ - forbidigo
63+ - funlen
64+ - gocognit
65+ - goconst
66+ - gocyclo
67+ - gosmopolitan
68+ - lll
69+ - maintidx
70+ - mnd
71+ - paralleltest
72+ - staticcheck
73+ - testpackage
74+ - varnamelen
75+ - path : \.go
76+ linters :
77+ - err113
16578issues :
166- # Excluding configuration per-path, per-linter, per-text and per-source
167- exclude-rules :
168- # Exclude some linters from running on tests files.
169- - path : _test\.go
170- linters :
171- - cyclop
172- - dupl
173- - errcheck
174- - errchkjson
175- - exhaustivestruct
176- - forbidigo
177- - funlen
178- - gocognit
179- - gocyclo
180- - gomnd
181- - lll
182- - stylecheck
183- - testpackage
184- - varnamelen
185- - maintidx
186- - path : \.go
187- linters :
188- - err113
189-
190- # Independently from option `exclude` we use default exclude patterns,
191- # it can be disabled by this option. To list all
192- # excluded by default patterns execute `golangci-lint run --help`.
193- # Default value for this option is true.
194- exclude-use-default : false
195- # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
19679 max-issues-per-linter : 0
197- # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
19880 max-same-issues : 0
81+ formatters :
82+ enable :
83+ - gofumpt
84+ - goimports
85+ settings :
86+ goimports :
87+ local-prefixes :
88+ - github.com/kinbiko/bugsnag
0 commit comments