New 🌊 wave for @helm

Commit 90f37b7e

90f37b7ef5e7Merged

Dmitrii Zhiliaev <[email protected]> · 1 year ago · 7 files · ~6 modified · -1 deleted

Description

feat: golangci lint new config

Details

Commit
90f37b7ef5e7
Parent
8123d191a0ee

.golangci.ymldeleted

1-# options for analysis running
2-run:
3- timeout: 10m
4- build-tags:
5- - integration
6-
7-output:
8- # sorts results by: filepath, line and column
9- sort-results: true
10-
11-linters:
12- enable-all: true
13- disable:
14- - perfsprint
15- - paralleltest
16- - recvcheck
17- - wrapcheck
18- - gochecknoglobals # we use globals
19- - musttag # we don't need tags always
20- - depguard # we know what we do. We can check extra deps via PRs changes.
21- - contextcheck # we don't need contexts everywhere
22- - revive # piece of shit
23- - execinquery # deprecated
24- - exhaustruct # it requires to initialize billions of fields, I ain't monkey to fix these
25- - gci # we use gofumpt
26- - gochecknoinits # we want to use `init()` functions
27- - gocyclo # we use cyclop
28- - godox # get rid of TODOs
29- - err113 # need to create wrapped static errors
30- - goimports # we use gofumpt
31- - gomnd # renamed to mnd
32- - mnd # we want to keep magic numbers
33- - inamedparam
34- - interfacebloat # we want huge interfaces
35- - ireturn # sometimes we need to return interfaces
36- - nakedret # sometimes we have to use naked returns
37- - nonamedreturns # we do want some named returns
38- - varnamelen # I don't think short names are bad
39- - wsl # lots of style checks
40-
41-# all available settings of specific linters
42-linters-settings:
43- # https://golangci-lint.run/usage/linters/#lll
44- tagalign:
45- # Align and sort can be used together or separately.
46- # Whether enable align. If true, the struct tags will be aligned.
47- # Default: true.
48- align: false
49- # Whether enable tags sort.
50- # If true, the tags will be sorted by name in ascending order.
51- # eg: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"`
52- # Default: true
53- sort: true
54- order:
55- - yaml
56- - yml
57- - json
58- - toml
59- - mapstructure
60- - binding
61- - validate
62- cyclop:
63- # the maximal code complexity to report
64- max-complexity: 13
65- # the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)
66- package-average: 0.0
67- # should ignore tests (default false)
68- skip-tests: true
69-
70- dogsled:
71- # checks assignments with too many blank identifiers; default is 2
72- max-blank-identifiers: 2
73-
74- dupl:
75- # tokens count to trigger issue, 150 by default
76- threshold: 100
77-
78- errcheck:
79- # report about not checking of errors in type assertions: `a := b.(MyStruct)`;
80- # default is false: such cases aren't reported by default.
81- check-type-assertions: false
82-
83- # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
84- # default is false: such cases aren't reported by default.
85- check-blank: false
86-
87- exclude-functions:
88- - fmt:.*
89- - io/ioutil:^Read.*
90-
91- errorlint:
92- # Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats
93- errorf: true
94- # Check for plain type assertions and type switches
95- asserts: true
96- # Check for plain error comparisons
97- comparison: true
98-
99- exhaustive:
100- # check switch statements in generated files also
101- check-generated: false
102- # indicates that switch statements are to be considered exhaustive if a
103- # 'default' case is present, even if all enum members aren't listed in the
104- # switch
105- default-signifies-exhaustive: true
106-
107- forbidigo:
108- # Forbid the following identifiers (identifiers are written using regexp):
109- forbid:
110- - ^print.*$
111- - 'fmt\.Print.*'
112-
113-
114- funlen:
115- lines: 69
116- statements: 75
117-
118- gocognit:
119- # minimal code complexity to report, 30 by default (but we recommend 10-20)
120- min-complexity: 15
121-
122- nestif:
123- # minimal complexity of if statements to report, 5 by default
124- min-complexity: 6
125-
126- goconst:
127- # minimal length of string constant, 3 by default
128- min-len: 3
129- # minimal occurrences count to trigger, 3 by default
130- min-occurrences: 3
131-
132- gocritic:
133- enabled-tags:
134- - diagnostic
135- - experimental
136- - opinionated
137- - performance
138- - style
139-
140- disabled-checks:
141- - commentedOutCode
142- - typeSwitchVar
143- - whyNoLint
144- - yodaStyleExpr
145-
146- settings:
147- captLocal: # must be valid enabled check name
148- # whether to restrict checker to params only (default true)
149- paramsOnly: true
150- elseif:
151- # whether to skip balanced if-else pairs (default true)
152- skipBalanced: true
153- hugeParam:
154- # size in bytes that makes the warning trigger (default 80)
155- sizeThreshold: 80
156- nestingReduce:
157- # min number of statements inside a branch to trigger a warning (default 5)
158- bodyWidth: 5
159- rangeExprCopy:
160- # size in bytes that makes the warning trigger (default 512)
161- sizeThreshold: 512
162- # whether to check test functions (default true)
163- skipTestFuncs: true
164- rangeValCopy:
165- # size in bytes that makes the warning trigger (default 128)
166- sizeThreshold: 32
167- # whether to check test functions (default true)
168- skipTestFuncs: true
169- ruleguard:
170- # path to a gorules file for the ruleguard checker
171- rules: ""
172- truncateCmp:
173- # whether to skip int/uint/uintptr types (default true)
174- skipArchDependent: true
175- underef:
176- # whether to skip (*x).method() calls where x is a pointer receiver (default true)
177- skipRecvDeref: true
178- unnamedResult:
179- # whether to check exported functions
180- checkExported: true
181-
182- gofmt:
183- # simplify code: gofmt with `-s` option, true by default
184- simplify: true
185-
186- gofumpt:
187- # Choose whether to use the extra rules that are disabled
188- # by default
189- extra-rules: false
190-
191- gomoddirectives:
192- # Allow local `replace` directives. Default is false.
193- replace-local: false
194- # List of allowed `replace` directives. Default is empty.
195- replace-allow-list:
196- - launchpad.net/gocheck
197- # Allow to not explain why the version has been retracted in the `retract` directives. Default is false.
198- retract-allow-no-explanation: false
199- # Forbid the use of the `exclude` directives. Default is false.
200- exclude-forbidden: false
201-
202- gosec:
203- # To select a subset of rules to run.
204- # Available rules: https://github.com/securego/gosec#available-rules
205- includes:
206- - G401
207- - G306
208- - G101
209- # To specify a set of rules to explicitly exclude.
210- # Available rules: https://github.com/securego/gosec#available-rules
211- excludes:
212- - G204
213- # To specify the configuration of rules.
214- # The configuration of rules is not fully documented by gosec:
215- # https://github.com/securego/gosec#configuration
216- # https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102
217- config:
218- G306: "0600"
219- G101:
220- pattern: "(?i)example"
221- ignore_entropy: false
222- entropy_threshold: "80.0"
223- per_char_threshold: "3.0"
224- truncate: "32"
225-
226- gosimple:
227- # https://staticcheck.io/docs/options#checks
228- checks:
229- - all
230-
231- govet:
232- # settings per analyzer
233- settings:
234- printf: # analyzer name, run `go tool vet help` to see all analyzers
235- funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
236- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
237- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
238- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
239- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
240-
241- enable-all: true
242- disable:
243- - shadow
244-
245- lll:
246- # max line length, lines longer will be reported. Default is 120.
247- # '\t' is counted as 1 character by default, and can be changed with the tab-width option
248- line-length: 128
249- # tab width in spaces. Default to 1.
250- tab-width: 1
251-
252- makezero:
253- # Allow only slices initialized with a length of zero. Default is false.
254- always: false
255-
256- misspell:
257- # Correct spellings using locale preferences for US or UK.
258- # Default is to use a neutral variety of English.
259- # Setting locale to US will correct the British spelling of 'colour' to 'color'.
260- locale: US
261-
262- nakedret:
263- # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
264- max-func-lines: 30
265-
266- nolintlint:
267- # Enable to ensure that nolint directives are all used. Default is true.
268- allow-unused: false
269- # Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
270- require-specific: true
271-
272-
273- prealloc:
274- # XXX: we don't recommend using this linter before doing performance profiling.
275- # For most programs usage of prealloc will be a premature optimization.
276-
277- # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
278- # True by default.
279- simple: true
280- range-loops: true # Report preallocation suggestions on range loops, true by default
281- for-loops: false # Report preallocation suggestions on for loops, false by default
282-
283- promlinter:
284- # Promlinter can't infer all metrics name in static analysis.
285- # Enable strict mode will also include the errors caused by failing to parse the args.
286- strict: false
287- # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
288- disabled-linters: []
289- # - "Help"
290- # - "MetricUnits"к
291-
292- # - "Counter"
293- # - "HistogramSummaryReserved"
294- # - "MetricTypeInName"
295- # - "ReservedChars"
296- # - "CamelCase"
297- # - "lintUnitAbbreviations"
298-
299- predeclared:
300- # comma-separated list of predeclared identifiers to not report on
301- ignore: ""
302- # include method names and field names (i.e., qualified names) in checks
303- q: false
304-
305- revive:
306- enable-all-rules: true
307-
308- rules:
309- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
310- - name: add-constant
311- severity: warning
312- disabled: true
313- arguments:
314- - maxLitCount: "3"
315- allowStrs: '""'
316- allowInts: "0,1,2"
317- allowFloats: "0.0,0.,1.0,1.,2.0,2."
318- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#argument-limit
319- - name: argument-limit
320- severity: warning
321- disabled: true
322- arguments: [4]
323- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic
324- - name: atomic
325- severity: warning
326- disabled: false
327- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters
328- - name: banned-characters
329- severity: warning
330- disabled: false
331- arguments: ["Ω", "Σ", "σ", "7"]
332- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return
333- - name: bare-return
334- severity: warning
335- disabled: true
336- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports
337- - name: blank-imports
338- severity: warning
339- disabled: false
340- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
341- - name: bool-literal-in-expr
342- severity: warning
343- disabled: false
344- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#call-to-gc
345- - name: call-to-gc
346- severity: warning
347- disabled: false
348- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity
349- - name: cognitive-complexity
350- severity: warning
351- disabled: true
352- arguments: [7]
353- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming
354- - name: confusing-naming
355- severity: warning
356- disabled: true
357- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results
358- - name: confusing-results
359- severity: warning
360- disabled: false
361- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
362- - name: constant-logical-expr
363- severity: warning
364- disabled: false
365- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
366- - name: context-as-argument
367- severity: warning
368- disabled: false
369- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
370- - name: context-keys-type
371- severity: warning
372- disabled: true
373- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic
374- - name: cyclomatic
375- severity: warning
376- disabled: true
377- arguments: [3]
378- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace
379- - name: datarace
380- severity: warning
381- disabled: false
382- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit
383- - name: deep-exit
384- severity: warning
385- disabled: true
386- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer
387- - name: defer
388- severity: warning
389- disabled: false
390- arguments:
391- - ["call-chain", "loop"]
392- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports
393- - name: dot-imports
394- severity: warning
395- disabled: false
396- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports
397- - name: duplicated-imports
398- severity: warning
399- disabled: false
400- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
401- - name: early-return
402- severity: warning
403- disabled: true
404- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
405- - name: empty-block
406- severity: warning
407- disabled: false
408- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
409- - name: empty-lines
410- severity: warning
411- disabled: false
412- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
413- - name: error-naming
414- severity: warning
415- disabled: false
416- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return
417- - name: error-return
418- severity: warning
419- disabled: false
420- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
421- - name: error-strings
422- severity: warning
423- disabled: false
424- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf
425- - name: errorf
426- severity: warning
427- disabled: false
428- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
429- - name: exported
430- severity: warning
431- disabled: true
432- arguments:
433- - "checkPrivateReceivers"
434- - "sayRepetitiveInsteadOfStutters"
435- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
436- - name: file-header
437- severity: warning
438- disabled: true
439- arguments:
440- - This is the text that must appear at the top of source files.
441- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
442- - name: flag-parameter
443- severity: warning
444- disabled: true
445- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit
446- - name: function-result-limit
447- severity: warning
448- disabled: true
449- arguments: [2]
450- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length
451- - name: function-length
452- severity: warning
453- disabled: true
454- arguments: [10, 0]
455- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return
456- - name: get-return
457- severity: warning
458- disabled: true
459- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches
460- - name: identical-branches
461- severity: warning
462- disabled: false
463- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
464- - name: if-return
465- severity: warning
466- disabled: true
467- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement
468- - name: increment-decrement
469- severity: warning
470- disabled: false
471- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow
472- - name: indent-error-flow
473- severity: warning
474- disabled: false
475- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing
476- - name: import-shadowing
477- severity: warning
478- disabled: false
479- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit
480- - name: line-length-limit
481- severity: warning
482- disabled: true
483- arguments: [80]
484- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs
485- - name: max-public-structs
486- severity: warning
487- disabled: false
488- arguments: [3]
489- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-parameter
490- - name: modifies-parameter
491- severity: warning
492- disabled: false
493- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-value-receiver
494- - name: modifies-value-receiver
495- severity: warning
496- disabled: false
497- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs
498- - name: nested-structs
499- severity: warning
500- disabled: true
501- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order
502- - name: optimize-operands-order
503- severity: warning
504- disabled: false
505- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
506- - name: package-comments
507- severity: warning
508- disabled: true
509- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range
510- - name: range
511- severity: warning
512- disabled: false
513- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure
514- - name: range-val-in-closure
515- severity: warning
516- disabled: false
517- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address
518- - name: range-val-address
519- severity: warning
520- disabled: false
521- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#receiver-naming
522- - name: receiver-naming
523- severity: warning
524- disabled: false
525- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
526- - name: redefines-builtin-id
527- severity: warning
528- disabled: false
529- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-of-int
530- - name: string-of-int
531- severity: warning
532- disabled: false
533- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format
534- - name: string-format
535- severity: warning
536- disabled: false
537- arguments:
538- - - "core.WriteError[1].Message"
539- - "/^([^A-Z]|$)/"
540- - must not start with a capital letter
541- - - "fmt.Errorf[0]"
542- - '/(^|[^\.!?])$/'
543- - must not end in punctuation
544- - - panic
545- - '/^[^\n]*$/'
546- - must not contain line breaks
547- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
548- - name: struct-tag
549- severity: warning
550- disabled: true
551- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else
552- - name: superfluous-else
553- severity: warning
554- disabled: false
555- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
556- - name: time-equal
557- severity: warning
558- disabled: false
559- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-naming
560- - name: time-naming
561- severity: warning
562- disabled: false
563- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
564- - name: var-naming
565- severity: warning
566- disabled: false
567- arguments:
568- - ["ID"] # AllowList
569- - ["VM"] # DenyList
570- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
571- - name: var-declaration
572- severity: warning
573- disabled: false
574- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion
575- - name: unconditional-recursion
576- severity: warning
577- disabled: false
578- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming
579- - name: unexported-naming
580- severity: warning
581- disabled: true
582- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
583- - name: unexported-return
584- severity: warning
585- disabled: true
586- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
587- - name: unhandled-error
588- severity: warning
589- disabled: true
590- arguments:
591- - "fmt.Printf"
592- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
593- - name: unnecessary-stmt
594- severity: warning
595- disabled: true
596- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unreachable-code
597- - name: unreachable-code
598- severity: warning
599- disabled: false
600- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
601- - name: unused-parameter
602- severity: warning
603- disabled: true
604- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver
605- - name: unused-receiver
606- severity: warning
607- disabled: true
608- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
609- - name: useless-break
610- severity: warning
611- disabled: false
612- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
613- - name: waitgroup-by-value
614- severity: warning
615- disabled: false
616-
617- staticcheck:
618- # https://staticcheck.io/docs/options#checks
619- checks:
620- - all
621-
622- stylecheck:
623- # https://staticcheck.io/docs/options#checks
624- checks:
625- - all
626- - -ST1000
627- - -ST1003
628- - -ST1016
629- - -ST1017
630- - -ST1020
631- - -ST1021
632- - -ST1022
633- # https://staticcheck.io/docs/options#dot_import_whitelist
634- dot-import-whitelist:
635- - fmt
636- # https://staticcheck.io/docs/options#initialisms
637- initialisms:
638- - ACL
639- - API
640- - ASCII
641- - CPU
642- - CSS
643- - DNS
644- - EOF
645- - GUID
646- - HTML
647- - HTTP
648- - HTTPS
649- - ID
650- - IP
651- - JSON
652- - QPS
653- - RAM
654- - RPC
655- - SLA
656- - SMTP
657- - SQL
658- - SSH
659- - TCP
660- - TLS
661- - TTL
662- - UDP
663- - UI
664- - GID
665- - UID
666- - UUID
667- - URI
668- - URL
669- - UTF8
670- - VM
671- - XML
672- - XMPP
673- - XSRF
674- - XSS
675- # https://staticcheck.io/docs/options#http_status_code_whitelist
676- http-status-code-whitelist:
677- - "200"
678- - "400"
679- - "404"
680- - "500"
681-
682- tagliatelle:
683- # check the struck tag name case
684- case:
685- # use the struct field name to check the name of the struct tag
686- use-field-name: false
687- rules:
688- # any struct tag type can be used.
689- # support string case:
690- # `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`
691- json: snake
692- yaml: snake
693-
694- testifylint:
695- enable-all: true
696- disable:
697- - require-error
698-
699- testpackage:
700- # regexp pattern to skip files
701- skip-regexp: (export|internal)_test\.go
702-
703- thelper:
704- # The following configurations enable all checks. It can be omitted because all checks are enabled by default.
705- # You can enable only required checks deleting unnecessary checks.
706- test:
707- first: true
708- name: true
709- begin: true
710- benchmark:
711- first: true
712- name: true
713- begin: true
714- tb:
715- first: true
716- name: true
717- begin: true
718-
719- unparam:
720- # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
721- # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
722- # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
723- # with golangci-lint call it on a directory with the changed file.
724- check-exported: false
725-
726- whitespace:
727- multi-if: false # Enforces newlines (or comments) after every multi-line if statement
728- multi-func: false # Enforces newlines (or comments) after every multi-line function signature
729-
730- wrapcheck:
731- # An array of strings that specify substrings of signatures to ignore.
732- # If this set, it will override the default set of ignored signatures.
733- # See https://github.com/tomarrell/wrapcheck#configuration for more information.
734- ignoreSigs:
735- - .Errorf(
736- - errors.New(
737- - errors.Unwrap(
738- - .Wrap(
739- - .Wrapf(
740- - .WithMessage(
741- - .WithMessagef(
742- - .WithStack(
743- ignoreSigRegexps:
744- - \.New.*Error\(
745- ignorePackageGlobs:
746- - context
747- - encoding/*
748- - github.com/pkg/*
749- - github.com/helmwave/helmwave/*
750-
751- wsl:
752- # See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for
753- # documentation of available settings. These are the defaults for
754- # `golangci-lint`.
755- allow-assign-and-anything: false
756- allow-assign-and-call: true
757- allow-cuddle-declarations: false
758- allow-multiline-assign: true
759- allow-separated-leading-comment: false
760- allow-trailing-comment: false
761- force-case-trailing-whitespace: 0
762- force-err-cuddling: false
763- force-short-decl-cuddling: false
764- strict-append: true
765-
766-issues:
767- exclude-rules:
768- - path: pkg/version/
769- linters:
770- - lll
771- - wrapcheck
772- - path: config\.go
773- linters:
774- - lll
775- - path: _test\.go
776- linters:
777- - containedctx
778- - dupl
779- - dupword
780- - forcetypeassert
781- - funlen
782- - goconst
783- - godot
784- - lll
785- - revive
786- - wrapcheck
787- - dupword
788-
789- - path: cmd/
790- linters:
791- - forbidigo
792- - dupword
793-
794-
795- # Independently from option `exclude` we use default exclude patterns,
796- # it can be disabled by this option. To list all
797- # excluded by default patterns execute `golangci-lint run --help`.
798- # Default value for this option is true.
799- exclude-use-default: false
800-
801- # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
802- max-issues-per-linter: 0
803-
804- # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
805- max-same-issues: 0
806-
807- # Show only new issues: if there are unstaged changes or untracked files,
808- # only those changes are analyzed, else only changes in HEAD~ are analyzed.
809- # It's a super-useful option for integration of golangci-lint into existing
810- # large codebase. It's not practical to fix all existing issues at the moment
811- # of integration: much better don't allow issues in new code.
812- # Default is false.
813- new: false
814-
815-severity:
816- # Default value is empty string.
817- # Set the default severity for issues. If severity rules are defined and the issues
818- # do not match or no severity is provided to the rule this will be the default
819- # severity applied. Severities should match the supported severity names of the
820- # selected out format.
821- # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
822- # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
823- # - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
824- default-severity: error
825-
826- # The default value is false.
827- # If set to true severity-rules regular expressions become case-sensitive.
828- case-sensitive: false
829-
830- # Default value is empty list.
831- # When a list of severity rules are provided, severity information will be added to lint
832- # issues. Severity rules have the same filtering capability as exclude rules except you
833- # are allowed to specify one matcher per severity rule.
834- # Only affects out formats that support setting severity information.
835- rules:
836- - severity: warning
837- linters:
838- - forcetypeassert
839- - funlen
840- - paralleltest
841- - severity: notice
842- linters:
843- - godox
844-