1- # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY
2- #
3- # The original version of this file is located in the https://github.com/istio/common-files repo.
4- # If you're looking at this file in a different repo and want to make a change, please go to the
5- # common-files repo, make the change there and check it in. Then come back to this repo and run
6- # "make update-common".
1+ version : " 2"
72run :
83 build-tags :
9- - integ
10- - integfuzz
11-
12-
4+ - integ
5+ - integfuzz
136linters :
14- disable-all : true
7+ default : none
158 enable :
16- - errcheck
17- - gocritic
18- - gofumpt
19- - goimports
20- - gosimple
21- - govet
22- - ineffassign
23- - lll
24- - misspell
25- - staticcheck
26- - stylecheck
27- - typecheck
28- - unconvert
29- - unparam
30- fast : false
31-
32- linters-settings :
33- errcheck :
34- # report about not checking of errors in type assetions: `a := b.(MyStruct)`;
35- # default is false: such cases aren't reported by default.
36- check-type-assertions : false
37-
38- # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
39- # default is false: such cases aren't reported by default.
40- check-blank : false
41- goimports :
42- # put imports beginning with prefix after 3rd-party packages;
43- # it's a comma-separated list of prefixes
44- local-prefixes : github.com/baizeai/kube-snapshot
45- misspell :
46- # Correct spellings using locale preferences for US or UK.
47- # Default is to use a neutral variety of English.
48- # Setting locale to US will correct the British spelling of 'colour' to 'color'.
49- locale : US
50- ignore-words :
51- - cancelled
52- lll :
53- # max line length, lines longer will be reported. Default is 120.
54- # '\t' is counted as 1 character by default, and can be changed with the tab-width option
55- line-length : 160
56- # tab width in spaces. Default to 1.
57- tab-width : 1
58- gocritic :
59- enabled-checks :
60- - appendCombine
61- - boolExprSimplify
62- - builtinShadow
63- - commentedOutCode
64- - commentedOutImport
65- - docStub
66- - emptyFallthrough
67- - equalFold
68- - hexLiteral
69- - indexAlloc
70- - initClause
71- - methodExprCall
72- - nilValReturn
73- - octalLiteral
74- - rangeExprCopy
75- - stringXbytes
76- - typeAssertChain
77- - typeUnparen
78- - unnecessaryBlock
79- - weakCond
80-
81- # Unused
82- # - yodaStyleExpr
83- # - appendAssign
84- # - commentFormatting
85- # - emptyStringTest
86- # - exitAfterDefer
87- # - ifElseChain
88- # - hugeParam
89- # - importShadow
90- # - nestingReduce
91- # - paramTypeCombine
92- # - ptrToRefParam
93- # - rangeValCopy
94- # - singleCaseSwitch
95- # - sloppyReassign
96- # - unlabelStmt
97- # - unnamedResult
98- # - wrapperFunc
99-
100- issues :
101- # List of regexps of issue texts to exclude, empty list by default.
102- # But independently from this option we use default exclude patterns,
103- # it can be disabled by `exclude-use-default: false`. To list all
104- # excluded by default patterns execute `golangci-lint run --help`
105- exclude :
106- - composite literal uses unkeyed fields
107-
108- exclude-files :
109- - " .*\\ .pb\\ .go"
110- - " .*\\ .gen\\ .go"
111-
112- exclude-dirs :
113- - vendor$
114- - genfiles$
115-
116- exclude-rules :
117- # Exclude some linters from running on test files.
118- - path : _test\.go$|^tests/|^samples/
119- linters :
120- - errcheck
121-
122- # TODO(https://github.com/dominikh/go-tools/issues/732) remove this once we update
123- - linters :
124- - staticcheck
125- text : " SA1019: package github.com/golang/protobuf"
126-
127- # Independently from option `exclude` we use default exclude patterns,
128- # it can be disabled by this option. To list all
129- # excluded by default patterns execute `golangci-lint run --help`.
130- # Default value for this option is true.
131- exclude-use-default : true
9+ - errcheck
10+ - gocritic
11+ - govet
12+ - ineffassign
13+ - lll
14+ - misspell
15+ - staticcheck
16+ - unconvert
17+ - unparam
18+ settings :
19+ errcheck :
20+ check-type-assertions : false
21+ check-blank : false
22+ gocritic :
23+ enabled-checks :
24+ - appendCombine
25+ - boolExprSimplify
26+ - builtinShadow
27+ - commentedOutCode
28+ - commentedOutImport
29+ - docStub
30+ - emptyFallthrough
31+ - equalFold
32+ - hexLiteral
33+ - indexAlloc
34+ - initClause
35+ - methodExprCall
36+ - nilValReturn
37+ - octalLiteral
38+ - rangeExprCopy
39+ - stringXbytes
40+ - typeAssertChain
41+ - typeUnparen
42+ - unnecessaryBlock
43+ - weakCond
44+ lll :
45+ line-length : 160
46+ tab-width : 1
47+ misspell :
48+ locale : US
49+ ignore-rules :
50+ - cancelled
51+ exclusions :
52+ generated : lax
53+ presets :
54+ - comments
55+ - common-false-positives
56+ - legacy
57+ - std-error-handling
58+ rules :
59+ - linters :
60+ - errcheck
61+ path : _test\.go$|^tests/|^samples/
62+ - linters :
63+ - staticcheck
64+ text : ' SA1019: package github.com/golang/protobuf'
65+ - path : (.+)\.go$
66+ text : composite literal uses unkeyed fields
67+ paths :
68+ - .*\.pb\.go
69+ - .*\.gen\.go
70+ - vendor$
71+ - genfiles$
72+ - third_party$
73+ - builtin$
74+ - examples$
75+ formatters :
76+ enable :
77+ - gofumpt
78+ - goimports
79+ settings :
80+ goimports :
81+ local-prefixes :
82+ - github.com/baizeai/kube-snapshot
83+ exclusions :
84+ generated : lax
85+ paths :
86+ - .*\.pb\.go
87+ - .*\.gen\.go
88+ - vendor$
89+ - genfiles$
90+ - third_party$
91+ - builtin$
92+ - examples$
0 commit comments