Skip to content

Commit

Permalink
Automator: update common-files@master in istio/api@master (#3146)
Browse files Browse the repository at this point in the history
  • Loading branch information
istio-testing authored Apr 4, 2024
1 parent d7ab31a commit d867e2d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 57 deletions.
2 changes: 1 addition & 1 deletion common/.commonfiles.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0d85ad5c87d38bd06ea5d08814df61e747e9135a
6943246e9954e4ba267186479cae64173ca0d102
89 changes: 33 additions & 56 deletions common/config/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,13 @@
# common-files repo, make the change there and check it in. Then come back to this repo and run
# "make update-common".

service:
# When updating this, also update the version stored in docker/build-tools/Dockerfile in the istio/tools repo.
golangci-lint-version: 1.57.x # use the fixed version to not introduce new linters unexpectedly
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 20m
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 20m
build-tags:
- integ
- integfuzz
# which dirs to skip: they won't be analyzed;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs:
- genfiles$
- vendor$
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
skip-files:
- ".*\\.pb\\.go"
- ".*\\.gen\\.go"
linters:
disable-all: true
enable:
Expand Down Expand Up @@ -62,15 +45,13 @@ linters-settings:
# default is false: such cases aren't reported by default.
check-blank: false
govet:
# report about shadowed variables
check-shadowing: false
disable:
# report about shadowed variables
- shadow
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: istio.io/
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
Expand All @@ -88,8 +69,6 @@ linters-settings:
ignore-generated-header: false
severity: "warning"
confidence: 0.0
error-code: 2
warning-code: 1
rules:
- name: blank-imports
- name: context-keys-type
Expand Down Expand Up @@ -146,16 +125,7 @@ linters-settings:
# - name: flag-parameter
# - name: unhandled-error
# - name: if-return
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# call graph construction algorithm (cha, rta). In general, use cha for libraries,
# and rta for programs with main packages. Default is cha.
algo: cha
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
Expand All @@ -167,6 +137,11 @@ linters-settings:
- default # Contains all imports that could not be matched to another section type.
- prefix(istio.io/) # Groups all imports with the specified Prefix.
gocritic:
# Disable all checks.
# Default: false
disable-all: true
# Which checks should be enabled in addition to default checks. Since we don't want
# all of the default checks, we do the disable-all first.
enabled-checks:
- appendCombine
- argOrder
Expand Down Expand Up @@ -212,24 +187,6 @@ linters-settings:
- unslice
- valSwap
- weakCond
# Unused
# - yodaStyleExpr
# - appendAssign
# - commentFormatting
# - emptyStringTest
# - exitAfterDefer
# - ifElseChain
# - hugeParam
# - importShadow
# - nestingReduce
# - paramTypeCombine
# - ptrToRefParam
# - rangeValCopy
# - singleCaseSwitch
# - sloppyReassign
# - unlabelStmt
# - unnamedResult
# - wrapperFunc
depguard:
rules:
DenyGogoProtobuf:
Expand All @@ -250,6 +207,24 @@ issues:
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- composite literal uses unkeyed fields
# Which dirs to exclude: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
# Default dirs are skipped independently of this option's value (see exclude-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
# Default: []
exclude-dirs:
- genfiles$
- vendor$
# Which files to exclude: they will be analyzed, but issues from them won't be reported.
# There is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not, please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
# Default: []
exclude-files:
- ".*\\.pb\\.go"
- ".*\\.gen\\.go"
exclude-rules:
# Exclude some linters from running on test files.
- path: _test\.go$|^tests/|^samples/
Expand All @@ -270,7 +245,9 @@ issues:
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: true
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0
# Maximum issues count per one linter.
# Set to 0 to disable.
# Default: 50
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0

0 comments on commit d867e2d

Please sign in to comment.