From 2ce6f491336194d52e6e3e255d5aa92ae11df019 Mon Sep 17 00:00:00 2001 From: Ben Fuller Date: Fri, 30 May 2025 09:21:17 -0600 Subject: [PATCH 1/3] update golangci and it's action to latest --- .github/workflows/golangci-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ee5d0933ed..0ca8e55556 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -33,9 +33,9 @@ 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 + version: v2.1 args: -v --exclude-dirs cf --exclude-dirs fixtures --exclude-dirs plugin --exclude-dirs command/plugin format: name: Run go fmt From 4e7ad56df8ad504fe5cf56fc48b855a740e4f7b4 Mon Sep 17 00:00:00 2001 From: Ben Fuller Date: Fri, 30 May 2025 09:45:20 -0600 Subject: [PATCH 2/3] change exclude dirs --- .github/workflows/golangci-lint.yml | 2 +- .golangci.json | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 0ca8e55556..5d4bf34866 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -36,7 +36,7 @@ jobs: uses: golangci/golangci-lint-action@v8 with: version: v2.1 - args: -v --exclude-dirs cf --exclude-dirs fixtures --exclude-dirs plugin --exclude-dirs command/plugin + args: -v format: name: Run go fmt runs-on: ubuntu-latest diff --git a/.golangci.json b/.golangci.json index ef9807d244..9287c97a87 100644 --- a/.golangci.json +++ b/.golangci.json @@ -12,7 +12,15 @@ "staticcheck", "unused", "ineffassign" - ] + ], + "exclusions": { + "paths": [ + "cf", + "fixtures", + "plugin", + "command/plugin" + ] + } }, "linters-settings": {}, "issues": { From 217c649f7712a66ed8ef6bb66e51a7f01726f423 Mon Sep 17 00:00:00 2001 From: Ben Fuller Date: Fri, 30 May 2025 10:07:13 -0600 Subject: [PATCH 3/3] update config --- .golangci.json | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.golangci.json b/.golangci.json index 9287c97a87..6ff9c8c9c4 100644 --- a/.golangci.json +++ b/.golangci.json @@ -1,13 +1,29 @@ { + "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", @@ -18,17 +34,14 @@ "cf", "fixtures", "plugin", - "command/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",