diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ee5d0933ed..5d4bf34866 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -33,10 +33,10 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v8 with: - version: v1.64 - args: -v --exclude-dirs cf --exclude-dirs fixtures --exclude-dirs plugin --exclude-dirs command/plugin + version: v2.1 + args: -v format: name: Run go fmt runs-on: ubuntu-latest diff --git a/.golangci.json b/.golangci.json index ef9807d244..6ff9c8c9c4 100644 --- a/.golangci.json +++ b/.golangci.json @@ -1,26 +1,47 @@ { + "version": 2, "run": { "concurrency": 4, "timeout": "20m" }, + "formaters": { + "default": "none", + "enable": [ + "goimports" + ], + "exclusions": { + "paths": [ + "cf", + "fixtures", + "plugin", + "command/plugin", + "integration/helpers/fake_server.go", + "command/plugin/*.go$" + ] + } + }, "linters": { - "disable-all": true, + "default": "none", "enable": [ "govet", - "goimports", "errcheck", "staticcheck", "unused", "ineffassign" - ] + ], + "exclusions": { + "paths": [ + "cf", + "fixtures", + "plugin", + "command/plugin", + "integration/helpers/fake_server.go", + "command/plugin/*.go$" + ] + } }, - "linters-settings": {}, "issues": { "max-same-issues": 0, - "exclude-files": [ - "integration/helpers/fake_server.go", - "command/plugin/*.go$" - ], "exclude": [ "Error return value of `client.GetApplicationTasks` is not checked", "Error return value of `logger.output.Stop` is not checked",