diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index d4a716b..3b7b7b3 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -34,3 +34,4 @@ jobs: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} timeout_minutes: "60" + allowed_tools: "Bash(golangci-lint run --verbose)" diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index e4b20a9..a768c08 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,8 +18,9 @@ jobs: go-version: "1.24" cache: false - uses: actions/checkout@v4 + - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v8 with: - version: v2.0.2 - args: --timeout 5m --verbose + version: "v2.1.0" + args: --timeout 10m --verbose diff --git a/.golangci.yml b/.golangci.yml index 4f760ef..5bd5c75 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,4 +1,22 @@ version: "2" +formatters: + enable: + - gofmt + - gci + settings: + gci: + sections: + - standard + - default + - prefix(github.com/sgnl-ai) + - localmodule + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ + linters: default: none enable: @@ -9,6 +27,7 @@ linters: - durationcheck - forcetypeassert - goconst + - gocritic - godot - goheader - ineffassign @@ -22,44 +41,36 @@ linters: - predeclared - promlinter - reassign - - revive - # TODO Enable staticcheck - # - staticcheck - unconvert - unparam - unused - usestdlibvars - wastedassign - wsl - settings: - goheader: - values: - const: - COMPANY: SGNL.ai, Inc. - template: Copyright {{ YEAR }} {{ COMPANY }} - nestif: - min-complexity: 10 exclusions: generated: lax + rules: + - path: (.+)_test.go + linters: + - dupl presets: - comments - common-false-positives - legacy - std-error-handling - rules: - - linters: - - dupl - path: (.+)_test.go - paths: - - third_party$ - - builtin$ - - examples$ -formatters: - enable: - - gofmt - exclusions: - generated: lax paths: - third_party$ - builtin$ - examples$ + settings: + nestif: + min-complexity: 10 + gocritic: + disable-all: true + enabled-checks: + - dupImport + goheader: + values: + const: + COMPANY: SGNL.ai, Inc. + template: Copyright {{ YEAR }} {{ COMPANY }}