Skip to content

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

@derekperkins

Description

@derekperkins

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/[email protected]/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions