action-golangci-lint
action-golangci-lint copied to clipboard
Module Plugin System support
Just wanted to check how to use this action with golangci-lint's Module Plugin System?
More context:
I have a project that is currently using reviewdog/action-golangci-lint@v2
to run golangci-lint. Everything is fine.
go-lint:
name: "Lint Go"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: versions
id: versions
run: |
cat go.mod | grep "^go" | awk '{print "go="$2}' >> $GITHUB_OUTPUT
cat go.mod | grep golangci-lint | awk '{print "golangci-lint="$2}' >> $GITHUB_OUTPUT
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
go_version: ${{ steps.versions.outputs.go }}
golangci_lint_version: ${{ steps.versions.outputs.golangci-lint }}
reporter: github-pr-review
filter_mode: nofilter
golangci_lint_flags: '--config=.golangci.yml --timeout=9m --new-from-rev=HEAD~1'
fail_on_error: true
Now I'm integrating uber-go/nilaway into our golangci-lint as per documentation here.
So locally, instead of simply use golangci-lint run ./...
, I will need to use a custom gcl like this:
-
golangci-lint custom
-
./custom-gcl run ./...
How can I utilize reviewdog/action-golangci-lint
to run custom-gcl on GitHub Actions?