Skip to content

Commit d867e2d

Browse files
Automator: update common-files@master in istio/api@master (#3146)
1 parent d7ab31a commit d867e2d

File tree

2 files changed

+34
-57
lines changed

2 files changed

+34
-57
lines changed

Diff for: common/.commonfiles.sha

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0d85ad5c87d38bd06ea5d08814df61e747e9135a
1+
6943246e9954e4ba267186479cae64173ca0d102

Diff for: common/config/.golangci.yml

+33-56
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,13 @@
55
# common-files repo, make the change there and check it in. Then come back to this repo and run
66
# "make update-common".
77

8-
service:
9-
# When updating this, also update the version stored in docker/build-tools/Dockerfile in the istio/tools repo.
10-
golangci-lint-version: 1.57.x # use the fixed version to not introduce new linters unexpectedly
118
run:
12-
# timeout for analysis, e.g. 30s, 5m, default is 1m
13-
deadline: 20m
9+
# Timeout for analysis, e.g. 30s, 5m.
10+
# Default: 1m
11+
timeout: 20m
1412
build-tags:
1513
- integ
1614
- integfuzz
17-
# which dirs to skip: they won't be analyzed;
18-
# can use regexp here: generated.*, regexp is applied on full path;
19-
# default value is empty list, but next dirs are always skipped independently
20-
# from this option's value:
21-
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
22-
skip-dirs:
23-
- genfiles$
24-
- vendor$
25-
# which files to skip: they will be analyzed, but issues from them
26-
# won't be reported. Default value is empty list, but there is
27-
# no need to include all autogenerated files, we confidently recognize
28-
# autogenerated files. If it's not please let us know.
29-
skip-files:
30-
- ".*\\.pb\\.go"
31-
- ".*\\.gen\\.go"
3215
linters:
3316
disable-all: true
3417
enable:
@@ -62,15 +45,13 @@ linters-settings:
6245
# default is false: such cases aren't reported by default.
6346
check-blank: false
6447
govet:
65-
# report about shadowed variables
66-
check-shadowing: false
48+
disable:
49+
# report about shadowed variables
50+
- shadow
6751
goimports:
6852
# put imports beginning with prefix after 3rd-party packages;
6953
# it's a comma-separated list of prefixes
7054
local-prefixes: istio.io/
71-
maligned:
72-
# print struct with more effective memory layout or not, false by default
73-
suggest-new: true
7455
misspell:
7556
# Correct spellings using locale preferences for US or UK.
7657
# Default is to use a neutral variety of English.
@@ -88,8 +69,6 @@ linters-settings:
8869
ignore-generated-header: false
8970
severity: "warning"
9071
confidence: 0.0
91-
error-code: 2
92-
warning-code: 1
9372
rules:
9473
- name: blank-imports
9574
- name: context-keys-type
@@ -146,16 +125,7 @@ linters-settings:
146125
# - name: flag-parameter
147126
# - name: unhandled-error
148127
# - name: if-return
149-
unused:
150-
# treat code as a program (not a library) and report unused exported identifiers; default is false.
151-
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
152-
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
153-
# with golangci-lint call it on a directory with the changed file.
154-
check-exported: false
155128
unparam:
156-
# call graph construction algorithm (cha, rta). In general, use cha for libraries,
157-
# and rta for programs with main packages. Default is cha.
158-
algo: cha
159129
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
160130
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
161131
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
@@ -167,6 +137,11 @@ linters-settings:
167137
- default # Contains all imports that could not be matched to another section type.
168138
- prefix(istio.io/) # Groups all imports with the specified Prefix.
169139
gocritic:
140+
# Disable all checks.
141+
# Default: false
142+
disable-all: true
143+
# Which checks should be enabled in addition to default checks. Since we don't want
144+
# all of the default checks, we do the disable-all first.
170145
enabled-checks:
171146
- appendCombine
172147
- argOrder
@@ -212,24 +187,6 @@ linters-settings:
212187
- unslice
213188
- valSwap
214189
- weakCond
215-
# Unused
216-
# - yodaStyleExpr
217-
# - appendAssign
218-
# - commentFormatting
219-
# - emptyStringTest
220-
# - exitAfterDefer
221-
# - ifElseChain
222-
# - hugeParam
223-
# - importShadow
224-
# - nestingReduce
225-
# - paramTypeCombine
226-
# - ptrToRefParam
227-
# - rangeValCopy
228-
# - singleCaseSwitch
229-
# - sloppyReassign
230-
# - unlabelStmt
231-
# - unnamedResult
232-
# - wrapperFunc
233190
depguard:
234191
rules:
235192
DenyGogoProtobuf:
@@ -250,6 +207,24 @@ issues:
250207
# excluded by default patterns execute `golangci-lint run --help`
251208
exclude:
252209
- composite literal uses unkeyed fields
210+
# Which dirs to exclude: issues from them won't be reported.
211+
# Can use regexp here: `generated.*`, regexp is applied on full path,
212+
# including the path prefix if one is set.
213+
# Default dirs are skipped independently of this option's value (see exclude-dirs-use-default).
214+
# "/" will be replaced by current OS file path separator to properly work on Windows.
215+
# Default: []
216+
exclude-dirs:
217+
- genfiles$
218+
- vendor$
219+
# Which files to exclude: they will be analyzed, but issues from them won't be reported.
220+
# There is no need to include all autogenerated files,
221+
# we confidently recognize autogenerated files.
222+
# If it's not, please let us know.
223+
# "/" will be replaced by current OS file path separator to properly work on Windows.
224+
# Default: []
225+
exclude-files:
226+
- ".*\\.pb\\.go"
227+
- ".*\\.gen\\.go"
253228
exclude-rules:
254229
# Exclude some linters from running on test files.
255230
- path: _test\.go$|^tests/|^samples/
@@ -270,7 +245,9 @@ issues:
270245
# excluded by default patterns execute `golangci-lint run --help`.
271246
# Default value for this option is true.
272247
exclude-use-default: true
273-
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
274-
max-per-linter: 0
248+
# Maximum issues count per one linter.
249+
# Set to 0 to disable.
250+
# Default: 50
251+
max-issues-per-linter: 0
275252
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
276253
max-same-issues: 0

0 commit comments

Comments
 (0)