mirror of https://github.com/istio/istio.io.git
Automator: update common-files@master in istio/istio.io@master (#16401)
This commit is contained in:
parent
b2a860ed1c
commit
f1e92bcfb8
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "istio build-tools",
|
"name": "istio build-tools",
|
||||||
"image": "gcr.io/istio-testing/build-tools:master-3a91dee3a2fe2662a8f6c29f82d06d0b705d8e88",
|
"image": "gcr.io/istio-testing/build-tools:master-fcd42145fc132acd1e8f607e9e7aca15058e9fb9",
|
||||||
"privileged": true,
|
"privileged": true,
|
||||||
"remoteEnv": {
|
"remoteEnv": {
|
||||||
"USE_GKE_GCLOUD_AUTH_PLUGIN": "True",
|
"USE_GKE_GCLOUD_AUTH_PLUGIN": "True",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
7ae681fbe157f8a5ba0c2851dd351a58b1a1ca5f
|
a1d5c4198ab79a14c09c034f2d95245efa3e2bcb
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
# WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY
|
|
||||||
#
|
|
||||||
# The original version of this file is located in the https://github.com/istio/common-files repo.
|
|
||||||
# If you're looking at this file in a different repo and want to make a change, please go to the
|
|
||||||
# common-files repo, make the change there and check it in. Then come back to this repo and run
|
|
||||||
# "make update-common".
|
|
||||||
|
|
||||||
run:
|
|
||||||
# Timeout for analysis, e.g. 30s, 5m.
|
|
||||||
# Default: 1m
|
|
||||||
timeout: 20m
|
|
||||||
build-tags:
|
|
||||||
- integ
|
|
||||||
- integfuzz
|
|
||||||
linters:
|
|
||||||
disable-all: true
|
|
||||||
enable:
|
|
||||||
- goimports
|
|
||||||
- gofumpt
|
|
||||||
- gci
|
|
||||||
fast: false
|
|
||||||
linters-settings:
|
|
||||||
gci:
|
|
||||||
sections:
|
|
||||||
- standard # Captures all standard packages if they do not match another section.
|
|
||||||
- default # Contains all imports that could not be matched to another section type.
|
|
||||||
- prefix(istio.io/) # Groups all imports with the specified Prefix.
|
|
||||||
goimports:
|
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
|
||||||
# it's a comma-separated list of prefixes
|
|
||||||
local-prefixes: istio.io/
|
|
||||||
issues:
|
|
||||||
# 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"
|
|
||||||
# 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
|
|
|
@ -1,147 +1,39 @@
|
||||||
# WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY
|
version: "2"
|
||||||
#
|
|
||||||
# The original version of this file is located in the https://github.com/istio/common-files repo.
|
|
||||||
# If you're looking at this file in a different repo and want to make a change, please go to the
|
|
||||||
# common-files repo, make the change there and check it in. Then come back to this repo and run
|
|
||||||
# "make update-common".
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
# Timeout for analysis, e.g. 30s, 5m.
|
|
||||||
# Default: 1m
|
|
||||||
timeout: 20m
|
|
||||||
build-tags:
|
build-tags:
|
||||||
- integ
|
- integ
|
||||||
- integfuzz
|
- integfuzz
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- errcheck
|
|
||||||
- copyloopvar
|
- copyloopvar
|
||||||
- depguard
|
- depguard
|
||||||
|
- errcheck
|
||||||
- gocritic
|
- gocritic
|
||||||
- gofumpt
|
- gosec
|
||||||
- goimports
|
|
||||||
- revive
|
|
||||||
- gosimple
|
|
||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- lll
|
- lll
|
||||||
- misspell
|
- misspell
|
||||||
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
|
||||||
- typecheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
- unused
|
- unused
|
||||||
- gci
|
settings:
|
||||||
- gosec
|
depguard:
|
||||||
fast: false
|
|
||||||
linters-settings:
|
|
||||||
errcheck:
|
|
||||||
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
|
|
||||||
# default is false: such cases aren't reported by default.
|
|
||||||
check-type-assertions: false
|
|
||||||
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
|
|
||||||
# default is false: such cases aren't reported by default.
|
|
||||||
check-blank: false
|
|
||||||
govet:
|
|
||||||
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/
|
|
||||||
misspell:
|
|
||||||
# Correct spellings using locale preferences for US or UK.
|
|
||||||
# Default is to use a neutral variety of English.
|
|
||||||
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
|
|
||||||
locale: US
|
|
||||||
ignore-words:
|
|
||||||
- cancelled
|
|
||||||
lll:
|
|
||||||
# max line length, lines longer will be reported. Default is 120.
|
|
||||||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
|
|
||||||
line-length: 160
|
|
||||||
# tab width in spaces. Default to 1.
|
|
||||||
tab-width: 1
|
|
||||||
revive:
|
|
||||||
ignore-generated-header: false
|
|
||||||
severity: "warning"
|
|
||||||
confidence: 0.0
|
|
||||||
rules:
|
rules:
|
||||||
- name: blank-imports
|
DenyGogoProtobuf:
|
||||||
- name: context-keys-type
|
files:
|
||||||
- name: time-naming
|
- $all
|
||||||
- name: var-declaration
|
deny:
|
||||||
- name: unexported-return
|
- pkg: github.com/gogo/protobuf
|
||||||
- name: errorf
|
desc: gogo/protobuf is deprecated, use golang/protobuf
|
||||||
- name: context-as-argument
|
errcheck:
|
||||||
- name: dot-imports
|
check-type-assertions: false
|
||||||
- name: error-return
|
check-blank: false
|
||||||
- name: error-strings
|
|
||||||
- name: error-naming
|
|
||||||
- name: increment-decrement
|
|
||||||
- name: var-naming
|
|
||||||
- name: package-comments
|
|
||||||
- name: range
|
|
||||||
- name: receiver-naming
|
|
||||||
- name: indent-error-flow
|
|
||||||
- name: superfluous-else
|
|
||||||
- name: modifies-parameter
|
|
||||||
- name: unreachable-code
|
|
||||||
- name: struct-tag
|
|
||||||
- name: constant-logical-expr
|
|
||||||
- name: bool-literal-in-expr
|
|
||||||
- name: redefines-builtin-id
|
|
||||||
- name: imports-blocklist
|
|
||||||
- name: range-val-in-closure
|
|
||||||
- name: range-val-address
|
|
||||||
- name: waitgroup-by-value
|
|
||||||
- name: atomic
|
|
||||||
- name: call-to-gc
|
|
||||||
- name: duplicated-imports
|
|
||||||
- name: string-of-int
|
|
||||||
- name: defer
|
|
||||||
arguments:
|
|
||||||
- - "call-chain"
|
|
||||||
- name: unconditional-recursion
|
|
||||||
- name: identical-branches
|
|
||||||
# the following rules can be enabled in the future
|
|
||||||
# - name: empty-lines
|
|
||||||
# - name: confusing-results
|
|
||||||
# - name: empty-block
|
|
||||||
# - name: get-return
|
|
||||||
# - name: confusing-naming
|
|
||||||
# - name: unexported-naming
|
|
||||||
# - name: early-return
|
|
||||||
# - name: unused-parameter
|
|
||||||
# - name: unnecessary-stmt
|
|
||||||
# - name: deep-exit
|
|
||||||
# - name: import-shadowing
|
|
||||||
# - name: modifies-value-receiver
|
|
||||||
# - name: unused-receiver
|
|
||||||
# - name: bare-return
|
|
||||||
# - name: flag-parameter
|
|
||||||
# - name: unhandled-error
|
|
||||||
# - name: if-return
|
|
||||||
unparam:
|
|
||||||
# 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
|
|
||||||
# with golangci-lint call it on a directory with the changed file.
|
|
||||||
check-exported: false
|
|
||||||
gci:
|
|
||||||
sections:
|
|
||||||
- standard # Captures all standard packages if they do not match another section.
|
|
||||||
- default # Contains all imports that could not be matched to another section type.
|
|
||||||
- prefix(istio.io/) # Groups all imports with the specified Prefix.
|
|
||||||
gocritic:
|
gocritic:
|
||||||
# Disable all checks.
|
|
||||||
# Default: false
|
|
||||||
disable-all: true
|
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:
|
enabled-checks:
|
||||||
- appendCombine
|
- appendCombine
|
||||||
- argOrder
|
- argOrder
|
||||||
|
@ -187,76 +79,143 @@ linters-settings:
|
||||||
- unslice
|
- unslice
|
||||||
- valSwap
|
- valSwap
|
||||||
- weakCond
|
- weakCond
|
||||||
depguard:
|
|
||||||
rules:
|
|
||||||
DenyGogoProtobuf:
|
|
||||||
files:
|
|
||||||
- $all
|
|
||||||
deny:
|
|
||||||
- pkg: github.com/gogo/protobuf
|
|
||||||
desc: "gogo/protobuf is deprecated, use golang/protobuf"
|
|
||||||
gosec:
|
gosec:
|
||||||
includes:
|
includes:
|
||||||
- G401
|
- G401
|
||||||
- G402
|
- G402
|
||||||
- G404
|
- G404
|
||||||
issues:
|
govet:
|
||||||
# List of regexps of issue texts to exclude, empty list by default.
|
disable:
|
||||||
# But independently from this option we use default exclude patterns,
|
- shadow
|
||||||
# it can be disabled by `exclude-use-default: false`. To list all
|
lll:
|
||||||
# excluded by default patterns execute `golangci-lint run --help`
|
line-length: 160
|
||||||
exclude:
|
tab-width: 1
|
||||||
- composite literal uses unkeyed fields
|
misspell:
|
||||||
# Which dirs to exclude: issues from them won't be reported.
|
locale: US
|
||||||
# Can use regexp here: `generated.*`, regexp is applied on full path,
|
ignore-rules:
|
||||||
# including the path prefix if one is set.
|
- cancelled
|
||||||
# Default dirs are skipped independently of this option's value (see exclude-dirs-use-default).
|
revive:
|
||||||
# "/" will be replaced by current OS file path separator to properly work on Windows.
|
confidence: 0
|
||||||
# Default: []
|
severity: warning
|
||||||
exclude-dirs:
|
rules:
|
||||||
- genfiles$
|
- name: blank-imports
|
||||||
- vendor$
|
- name: context-keys-type
|
||||||
# Which files to exclude: they will be analyzed, but issues from them won't be reported.
|
- name: time-naming
|
||||||
# There is no need to include all autogenerated files,
|
- name: var-declaration
|
||||||
# we confidently recognize autogenerated files.
|
- name: unexported-return
|
||||||
# If it's not, please let us know.
|
- name: errorf
|
||||||
# "/" will be replaced by current OS file path separator to properly work on Windows.
|
- name: context-as-argument
|
||||||
# Default: []
|
- name: dot-imports
|
||||||
exclude-files:
|
- name: error-return
|
||||||
- ".*\\.pb\\.go"
|
- name: error-strings
|
||||||
- ".*\\.gen\\.go"
|
- name: error-naming
|
||||||
exclude-rules:
|
- name: increment-decrement
|
||||||
# Exclude some linters from running on test files.
|
- name: var-naming
|
||||||
- path: _test\.go$|^tests/|^samples/
|
- name: package-comments
|
||||||
linters:
|
- name: range
|
||||||
|
- name: receiver-naming
|
||||||
|
- name: indent-error-flow
|
||||||
|
- name: superfluous-else
|
||||||
|
- name: modifies-parameter
|
||||||
|
- name: unreachable-code
|
||||||
|
- name: struct-tag
|
||||||
|
- name: constant-logical-expr
|
||||||
|
- name: bool-literal-in-expr
|
||||||
|
- name: redefines-builtin-id
|
||||||
|
- name: imports-blocklist
|
||||||
|
- name: range-val-in-closure
|
||||||
|
- name: range-val-address
|
||||||
|
- name: waitgroup-by-value
|
||||||
|
- name: atomic
|
||||||
|
- name: call-to-gc
|
||||||
|
- name: duplicated-imports
|
||||||
|
- name: string-of-int
|
||||||
|
- name: defer
|
||||||
|
arguments:
|
||||||
|
- - call-chain
|
||||||
|
- name: unconditional-recursion
|
||||||
|
- name: identical-branches
|
||||||
|
unparam:
|
||||||
|
check-exported: false
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
rules:
|
||||||
|
- linters:
|
||||||
- errcheck
|
- errcheck
|
||||||
- maligned
|
- maligned
|
||||||
|
path: _test\.go$|tests/|samples/
|
||||||
- path: _test\.go$
|
- path: _test\.go$
|
||||||
text: "dot-imports: should not use dot imports"
|
text: 'dot-imports: should not use dot imports'
|
||||||
# We need to use the deprecated module since the jsonpb replacement is not backwards compatible.
|
- linters:
|
||||||
- linters: [staticcheck]
|
- staticcheck
|
||||||
text: "SA1019: package github.com/golang/protobuf/jsonpb"
|
text: 'SA1019: package github.com/golang/protobuf/jsonpb'
|
||||||
- linters: [staticcheck]
|
- linters:
|
||||||
|
- staticcheck
|
||||||
text: 'SA1019: "github.com/golang/protobuf/jsonpb"'
|
text: 'SA1019: "github.com/golang/protobuf/jsonpb"'
|
||||||
# This is not helpful. The new function is not very usable and the current function will not be removed
|
- linters:
|
||||||
- linters: [staticcheck]
|
- staticcheck
|
||||||
text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
|
text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
|
||||||
- linters: [staticcheck]
|
- linters:
|
||||||
|
- staticcheck
|
||||||
text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
|
text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
|
||||||
- linters: [staticcheck]
|
- linters:
|
||||||
text: "SA1019: grpc.WithBlock is deprecated"
|
- staticcheck
|
||||||
- linters: [staticcheck]
|
text: 'SA1019: grpc.WithBlock is deprecated'
|
||||||
text: "SA1019: grpc.FailOnNonTempDialError"
|
- linters:
|
||||||
- linters: [staticcheck]
|
- staticcheck
|
||||||
text: "SA1019: grpc.WithReturnConnectionError"
|
text: 'SA1019: grpc.FailOnNonTempDialError'
|
||||||
# Independently from option `exclude` we use default exclude patterns,
|
- linters:
|
||||||
# it can be disabled by this option. To list all
|
- staticcheck
|
||||||
# excluded by default patterns execute `golangci-lint run --help`.
|
text: 'SA1019: grpc.WithReturnConnectionError'
|
||||||
# Default value for this option is true.
|
- path: (.+)\.go$
|
||||||
exclude-use-default: true
|
text: composite literal uses unkeyed fields
|
||||||
# Maximum issues count per one linter.
|
# TODO: remove following rule in the future
|
||||||
# Set to 0 to disable.
|
- linters:
|
||||||
# Default: 50
|
- staticcheck
|
||||||
|
text: 'QF'
|
||||||
|
- linters:
|
||||||
|
- staticcheck
|
||||||
|
text: 'ST1005'
|
||||||
|
- linters:
|
||||||
|
- staticcheck
|
||||||
|
text: 'S1007'
|
||||||
|
paths:
|
||||||
|
- .*\.pb\.go
|
||||||
|
- .*\.gen\.go
|
||||||
|
- genfiles$
|
||||||
|
- vendor$
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
issues:
|
||||||
max-issues-per-linter: 0
|
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
|
max-same-issues: 0
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- gci
|
||||||
|
- gofumpt
|
||||||
|
- goimports
|
||||||
|
settings:
|
||||||
|
gci:
|
||||||
|
sections:
|
||||||
|
- standard
|
||||||
|
- default
|
||||||
|
- prefix(istio.io/)
|
||||||
|
goimports:
|
||||||
|
local-prefixes:
|
||||||
|
- istio.io/
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- .*\.pb\.go
|
||||||
|
- .*\.gen\.go
|
||||||
|
- genfiles$
|
||||||
|
- vendor$
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|
|
@ -140,3 +140,6 @@ allowlisted_modules:
|
||||||
|
|
||||||
# Apache 2.0
|
# Apache 2.0
|
||||||
- github.com/aws/smithy-go
|
- github.com/aws/smithy-go
|
||||||
|
|
||||||
|
# Simplified BSD License: https://github.com/gomarkdown/markdown/blob/master/LICENSE.txt
|
||||||
|
- github.com/gomarkdown/markdown
|
||||||
|
|
|
@ -21,4 +21,4 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
golangci-lint run --fix -c ./common/config/.golangci-format.yml
|
golangci-lint run --fix -c ./common/config/.golangci.yml
|
||||||
|
|
|
@ -21,8 +21,10 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
GOLANGCILINT_RUN_ARGS=(--output.text.path stdout --output.junit-xml.path "${ARTIFACTS}"/junit-lint.xml)
|
||||||
|
|
||||||
if [[ "${ARTIFACTS}" != "" ]]; then
|
if [[ "${ARTIFACTS}" != "" ]]; then
|
||||||
golangci-lint run -v -c ./common/config/.golangci.yml --out-format colored-line-number,junit-xml:"${ARTIFACTS}"/junit-lint.xml
|
golangci-lint run -v -c ./common/config/.golangci.yml "${GOLANGCILINT_RUN_ARGS[@]}"
|
||||||
else
|
else
|
||||||
golangci-lint run -v -c ./common/config/.golangci.yml
|
golangci-lint run -v -c ./common/config/.golangci.yml
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -75,7 +75,7 @@ fi
|
||||||
TOOLS_REGISTRY_PROVIDER=${TOOLS_REGISTRY_PROVIDER:-gcr.io}
|
TOOLS_REGISTRY_PROVIDER=${TOOLS_REGISTRY_PROVIDER:-gcr.io}
|
||||||
PROJECT_ID=${PROJECT_ID:-istio-testing}
|
PROJECT_ID=${PROJECT_ID:-istio-testing}
|
||||||
if [[ "${IMAGE_VERSION:-}" == "" ]]; then
|
if [[ "${IMAGE_VERSION:-}" == "" ]]; then
|
||||||
IMAGE_VERSION=master-3a91dee3a2fe2662a8f6c29f82d06d0b705d8e88
|
IMAGE_VERSION=master-fcd42145fc132acd1e8f607e9e7aca15058e9fb9
|
||||||
fi
|
fi
|
||||||
if [[ "${IMAGE_NAME:-}" == "" ]]; then
|
if [[ "${IMAGE_NAME:-}" == "" ]]; then
|
||||||
IMAGE_NAME=build-tools
|
IMAGE_NAME=build-tools
|
||||||
|
|
Loading…
Reference in New Issue