diff --git a/common/.commonfiles.sha b/common/.commonfiles.sha index 1abd9eae..a725a6cd 100644 --- a/common/.commonfiles.sha +++ b/common/.commonfiles.sha @@ -1 +1 @@ -4a3f8a746a01511edc343386516b08ac84d0a454 +0fb04a469bfc93ac7466cb401ee46c84d58cb23c diff --git a/common/config/.golangci-format.yml b/common/config/.golangci-format.yml index 7ad96e15..16b8b1c0 100644 --- a/common/config/.golangci-format.yml +++ b/common/config/.golangci-format.yml @@ -5,32 +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.56.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: @@ -38,7 +19,6 @@ linters: - gofumpt - gci fast: false - linters-settings: gci: sections: @@ -49,11 +29,28 @@ linters-settings: # put imports beginning with prefix after 3rd-party packages; # it's a comma-separated list of prefixes local-prefixes: istio.io/ - issues: - - # Maximum issues count per one linter. Set to 0 to disable. Default is 50. - max-per-linter: 0 - + # 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