From f4f820ad65f2100a4a6a00bbd6ae66fb3044f607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Wanzenb=C3=B6ck?= Date: Tue, 9 Apr 2024 08:19:37 +0200 Subject: [PATCH] ci: update lint configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Moritz Wanzenböck --- .github/workflows/lints.yml | 1 + .golangci.yml | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 74979b00..7b8abc7a 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -14,6 +14,7 @@ jobs: uses: golangci/golangci-lint-action@v4 with: only-new-issues: true + args: --timeout=15m pre-commit: runs-on: ubuntu-latest env: diff --git a/.golangci.yml b/.golangci.yml index f6881579..abba194e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,12 +1,13 @@ # options for analysis running run: - # timeout for analysis, e.g. 30s, 5m, default is 1m - deadline: 15m + timeout: 15m # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" - format: line-number + formats: + - path: stdout + format: line-number # all available settings of specific linters linters-settings: @@ -14,7 +15,10 @@ linters-settings: exhaustive: default-signifies-exhaustive: true gci: - local-prefixes: github.com/piraeusdatastore/linstor-csi + sections: + - standard + - default + - prefix(github.com/piraeusdatastore/linstor-csi) gocritic: # Which checks should be enabled; can't be combined with 'disabled-checks'; # See https://go-critic.github.io/overview#checks-overview @@ -27,13 +31,11 @@ linters-settings: - emptyStringTest - nestingReduce - paramTypeCombine - - singleCaseSwitch - stringXbytes - typeAssertChain - typeUnparen - unlabelStmt - unnecessaryBlock - - valSwap - yodaStyleExpr - appendCombine - equalFold