Skip to content

Commit eb5bfad

Browse files
Automator: update common-files@master in istio/api@master (#2742)
1 parent e5c70bb commit eb5bfad

File tree

3 files changed

+84
-96
lines changed

3 files changed

+84
-96
lines changed

common/.commonfiles.sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
81eb95e520db4dc8decb267d574288dae41eed68
1+
089b253613e7e6728815f0721d306cba50b35261

common/Makefile.common.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ update-common:
104104
fi
105105
@cp -a $(TMP)/common-files/files/* $(shell pwd)
106106
@rm -fr $(TMP)/common-files
107+
@$(or $(COMMONFILES_POSTPROCESS), true)
107108

108109
check-clean-repo:
109110
@common/scripts/check_clean_repo.sh

common/config/.golangci.yml

Lines changed: 82 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ run:
1212
# timeout for analysis, e.g. 30s, 5m, default is 1m
1313
deadline: 20m
1414
build-tags:
15-
- integ
16-
- integfuzz
15+
- integ
16+
- integfuzz
1717
# which dirs to skip: they won't be analyzed;
1818
# can use regexp here: generated.*, regexp is applied on full path;
1919
# default value is empty list, but next dirs are always skipped independently
@@ -22,46 +22,42 @@ run:
2222
skip-dirs:
2323
- genfiles$
2424
- vendor$
25-
2625
# which files to skip: they will be analyzed, but issues from them
2726
# won't be reported. Default value is empty list, but there is
2827
# no need to include all autogenerated files, we confidently recognize
2928
# autogenerated files. If it's not please let us know.
3029
skip-files:
3130
- ".*\\.pb\\.go"
3231
- ".*\\.gen\\.go"
33-
3432
linters:
3533
disable-all: true
3634
enable:
37-
- errcheck
38-
- exportloopref
39-
- depguard
40-
- gocritic
41-
- gofumpt
42-
- goimports
43-
- revive
44-
- gosimple
45-
- govet
46-
- ineffassign
47-
- lll
48-
- misspell
49-
- staticcheck
50-
- stylecheck
51-
- typecheck
52-
- unconvert
53-
- unparam
54-
- unused
55-
- gci
56-
- gosec
35+
- errcheck
36+
- exportloopref
37+
- depguard
38+
- gocritic
39+
- gofumpt
40+
- goimports
41+
- revive
42+
- gosimple
43+
- govet
44+
- ineffassign
45+
- lll
46+
- misspell
47+
- staticcheck
48+
- stylecheck
49+
- typecheck
50+
- unconvert
51+
- unparam
52+
- unused
53+
- gci
54+
- gosec
5755
fast: false
58-
5956
linters-settings:
6057
errcheck:
6158
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
6259
# default is false: such cases aren't reported by default.
6360
check-type-assertions: false
64-
6561
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
6662
# default is false: such cases aren't reported by default.
6763
check-blank: false
@@ -81,7 +77,7 @@ linters-settings:
8177
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
8278
locale: US
8379
ignore-words:
84-
- cancelled
80+
- cancelled
8581
lll:
8682
# max line length, lines longer will be reported. Default is 120.
8783
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
@@ -95,60 +91,61 @@ linters-settings:
9591
error-code: 2
9692
warning-code: 1
9793
rules:
98-
- name: blank-imports
99-
- name: context-keys-type
100-
- name: time-naming
101-
- name: var-declaration
102-
- name: unexported-return
103-
- name: errorf
104-
- name: context-as-argument
105-
- name: dot-imports
106-
- name: error-return
107-
- name: error-strings
108-
- name: error-naming
109-
- name: increment-decrement
110-
- name: var-naming
111-
- name: package-comments
112-
- name: range
113-
- name: receiver-naming
114-
- name: indent-error-flow
115-
- name: superfluous-else
116-
- name: modifies-parameter
117-
- name: unreachable-code
118-
- name: struct-tag
119-
- name: constant-logical-expr
120-
- name: bool-literal-in-expr
121-
- name: redefines-builtin-id
122-
- name: imports-blacklist
123-
- name: range-val-in-closure
124-
- name: range-val-address
125-
- name: waitgroup-by-value
126-
- name: atomic
127-
- name: call-to-gc
128-
- name: duplicated-imports
129-
- name: string-of-int
130-
- name: defer
131-
arguments: [["call-chain"]]
132-
- name: unconditional-recursion
133-
- name: identical-branches
134-
# the following rules can be enabled in the future
135-
# - name: empty-lines
136-
# - name: confusing-results
137-
# - name: empty-block
138-
# - name: get-return
139-
# - name: confusing-naming
140-
# - name: unexported-naming
141-
# - name: early-return
142-
# - name: unused-parameter
143-
# - name: unnecessary-stmt
144-
# - name: deep-exit
145-
# - name: import-shadowing
146-
# - name: modifies-value-receiver
147-
# - name: unused-receiver
148-
# - name: bare-return
149-
# - name: flag-parameter
150-
# - name: unhandled-error
151-
# - name: if-return
94+
- name: blank-imports
95+
- name: context-keys-type
96+
- name: time-naming
97+
- name: var-declaration
98+
- name: unexported-return
99+
- name: errorf
100+
- name: context-as-argument
101+
- name: dot-imports
102+
- name: error-return
103+
- name: error-strings
104+
- name: error-naming
105+
- name: increment-decrement
106+
- name: var-naming
107+
- name: package-comments
108+
- name: range
109+
- name: receiver-naming
110+
- name: indent-error-flow
111+
- name: superfluous-else
112+
- name: modifies-parameter
113+
- name: unreachable-code
114+
- name: struct-tag
115+
- name: constant-logical-expr
116+
- name: bool-literal-in-expr
117+
- name: redefines-builtin-id
118+
- name: imports-blacklist
119+
- name: range-val-in-closure
120+
- name: range-val-address
121+
- name: waitgroup-by-value
122+
- name: atomic
123+
- name: call-to-gc
124+
- name: duplicated-imports
125+
- name: string-of-int
126+
- name: defer
127+
arguments:
128+
- - "call-chain"
129+
- name: unconditional-recursion
130+
- name: identical-branches
131+
# the following rules can be enabled in the future
132+
# - name: empty-lines
133+
# - name: confusing-results
134+
# - name: empty-block
135+
# - name: get-return
136+
# - name: confusing-naming
137+
# - name: unexported-naming
138+
# - name: early-return
139+
# - name: unused-parameter
140+
# - name: unnecessary-stmt
141+
# - name: deep-exit
142+
# - name: import-shadowing
143+
# - name: modifies-value-receiver
144+
# - name: unused-receiver
145+
# - name: bare-return
146+
# - name: flag-parameter
147+
# - name: unhandled-error
148+
# - name: if-return
152149
unused:
153150
# treat code as a program (not a library) and report unused exported identifiers; default is false.
154151
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
@@ -159,7 +156,6 @@ linters-settings:
159156
# call graph construction algorithm (cha, rta). In general, use cha for libraries,
160157
# and rta for programs with main packages. Default is cha.
161158
algo: cha
162-
163159
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
164160
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
165161
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
@@ -216,7 +212,6 @@ linters-settings:
216212
- unslice
217213
- valSwap
218214
- weakCond
219-
220215
# Unused
221216
# - yodaStyleExpr
222217
# - appendAssign
@@ -237,46 +232,38 @@ linters-settings:
237232
# - wrapperFunc
238233
depguard:
239234
packages-with-error-message:
240-
- github.com/gogo/protobuf: "gogo/protobuf is deprecated, use golang/protobuf"
241-
- golang.org/x/net/http2/h2c: "h2c.NewHandler is unsafe; use wrapper istio.io/istio/pkg/h2c"
242-
- github.com/golang/protobuf/jsonpb: "don't use the jsonpb package directly; use util/protomarshal instead"
243-
- google.golang.org/protobuf/encoding/protojson: "don't use the protojson package directly; use util/protomarshal instead"
235+
- github.com/gogo/protobuf: "gogo/protobuf is deprecated, use golang/protobuf"
244236
gosec:
245237
includes:
246-
- G401
247-
- G402
248-
- G404
238+
- G401
239+
- G402
240+
- G404
249241
issues:
250242
# List of regexps of issue texts to exclude, empty list by default.
251243
# But independently from this option we use default exclude patterns,
252244
# it can be disabled by `exclude-use-default: false`. To list all
253245
# excluded by default patterns execute `golangci-lint run --help`
254246
exclude:
255247
- composite literal uses unkeyed fields
256-
257248
exclude-rules:
258249
# Exclude some linters from running on test files.
259250
- path: _test\.go$|^tests/|^samples/
260251
linters:
261252
- errcheck
262253
- maligned
263-
264254
# We need to use the deprecated module since the jsonpb replacement is not backwards compatible.
265255
- linters:
266256
- staticcheck
267257
text: "SA1019: package github.com/golang/protobuf/jsonpb"
268258
- linters:
269259
- staticcheck
270260
text: 'SA1019: "github.com/golang/protobuf/jsonpb"'
271-
272261
# Independently from option `exclude` we use default exclude patterns,
273262
# it can be disabled by this option. To list all
274263
# excluded by default patterns execute `golangci-lint run --help`.
275264
# Default value for this option is true.
276265
exclude-use-default: true
277-
278266
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
279267
max-per-linter: 0
280-
281268
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
282269
max-same-issues: 0

0 commit comments

Comments
 (0)