From d0cd5d8fe40a4490348b995e4a4e4a7a6f45306a Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Thu, 9 May 2024 23:49:32 +0200 Subject: [PATCH] pin golangci-lint version to latest available, fix reported errors --- .github/workflows/ci-backend.yml | 4 ++-- backend/.golangci.yml | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml index ab4101b5ff..90784bcc0c 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -54,13 +54,13 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: latest + version: v1.58 working-directory: backend/app - name: golangci-lint on example directory uses: golangci/golangci-lint-action@v3 with: - version: latest + version: v1.58 args: --config ../../.golangci.yml working-directory: backend/_example/memory_store diff --git a/backend/.golangci.yml b/backend/.golangci.yml index 9c94c15f36..2fd8e75df2 100644 --- a/backend/.golangci.yml +++ b/backend/.golangci.yml @@ -1,15 +1,10 @@ run: timeout: 5m - output: - format: tab - skip-dirs: - - vendor linters-settings: govet: - check-shadowing: true - maligned: - suggest-new: true + enable: + - shadow goconst: min-len: 2 min-occurrences: 2 @@ -31,7 +26,9 @@ linters-settings: linters: enable: - bodyclose - - megacheck + - gosimple + - staticcheck + - unused - revive - govet - unconvert @@ -54,6 +51,8 @@ linters: disable-all: true issues: + exclude-dirs: + - vendor exclude-rules: - text: "at least one file in a package should have a package comment" linters: