reviewdog / action-golangci-lint

Run golangci-lint with reviewdog
https://github.com/marketplace?type=actions&query=reviewdog
MIT License
214 stars 41 forks source link

golangci-lint panic on Go 1.18 doesn't fail check #249

Open derekperkins opened 2 years ago

derekperkins commented 2 years ago

There are known issues in golangci-lint around 1.18 compatibility, listed below. The real issue is that this action reports success even when the underlying code fails.

Related Issues

Config

      - name: golangci-lint
        uses: reviewdog/action-golangci-lint@master
        with:
          tool_name: golangci-lint
          golangci_lint_version: v1.44.0
          reviewdog_version: v0.13.1
          go_version: '1.18.0'
          # we're not having reviewdog cache for us because we're caching across multiple actions here
          cache: false
          level: error
          fail_on_error: true
          reporter: github-pr-review
          filter_mode: diff_context

Error Output

Running golangci-lint with reviewdog 🐶 ...
  /home/runner/work/_temp/reviewdog-gvywRD/golangci-lint-1.44.0-nz1-linux-amd64/golangci-lint run --out-format line-number
  panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

  goroutine 1 [running]:
  github.com/go-critic/go-critic/checkers.init.22()
    /home/dlaird/go/pkg/mod/github.com/go-critic/go-critic@v0.6.2/checkers/embedded_rules.go:46 +0x4b4
  /home/runner/work/_temp/reviewdog-gvywRD/reviewdog -f=golangci-lint -name=golangci-lint -reporter=github-pr-review -filter-mode=diff_context -fail-on-error=true -level=error
image
oliver-anz commented 1 month ago

Is there any progress or a known workaround for this? Thanks!