From 6a9032ee3f06e9d30ea538c0a75907753b3cdbab Mon Sep 17 00:00:00 2001 From: Jiun Lee Date: Wed, 17 Jul 2024 15:03:19 +0800 Subject: [PATCH] Update .golangci.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```sh run golangci-lint Running [/root/golangci-lint-1.59.1-linux-amd64/golangci-lint run --out-format=github-actions] in [] ... level=warning msg="[config_reader] The configuration option `run.skip-files` is deprecated, please use `issues.exclude-files`." level=warning msg="[config_reader] The configuration option `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`." level=warning msg="[config_reader] The configuration option `output.format` is deprecated, please use `output.formats`" level=warning msg="[lintersdb] The linter \"deadcode\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle" ``` 这些配置已经过时了, 需要改为推荐项 --- .golangci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index ec7a899..d8844c7 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -2,13 +2,10 @@ run: # include `vendor` `third_party` `testdata` `examples` `Godeps` `builtin` skip-dirs-use-default: true - skip-dirs: - skip-files: - - ".*\\.mock\\.go$" # output configuration options output: # Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions - format: colored-line-number + formats: colored-line-number # All available settings of specific linters. # Refer to https://golangci-lint.run/usage/linters linters-settings: @@ -34,3 +31,6 @@ linters: - staticcheck issues: exclude-use-default: true + exclude-files: + - ".*\\.mock\\.go$" + exclude-dirs: