diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 7ec9229..4a9d102 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -26,12 +26,12 @@ jobs: - name: Install Go uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 with: - go-version: 1.23.x + go-version: 1.24.x - name: Create empty resource directory run: | mkdir -p static && touch static/.gitkeep - name: Lint - uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 + uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 with: args: --verbose - version: v1.62.0 + version: v2.0.2 diff --git a/.golangci.yml b/.golangci.yml index 95a1cb8..ccd3c1a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,22 +1,37 @@ ---- +version: "2" linters: enable: - - forbidigo - - goimports - - misspell - # - revive - - whitespace - -issues: - exclude-rules: - - path: _test.go - linters: - - errcheck - -linters-settings: - forbidigo: - forbid: - - p: ^fmt\.Print.*$ - msg: Do not commit print statements. Use logger package. - - p: ^log\.(Fatal|Panic|Print)(f|ln)?.*$ - msg: Do not commit log statements. Use logger package. + - forbidigo + - misspell + - whitespace + settings: + forbidigo: + forbid: + - pattern: ^fmt\.Print.*$ + msg: Do not commit print statements. Use logger package. + - pattern: ^log\.(Fatal|Panic|Print)(f|ln)?.*$ + msg: Do not commit log statements. Use logger package. + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - errcheck + path: _test.go + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$