mirror of
https://github.com/golangci/golangci-lint-action-plugin-example
synced 2026-07-22 16:33:42 +00:00
No description
- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| .plugins | ||
| .gitignore | ||
| .golangci.yml | ||
| go.mod | ||
| main.go | ||
| main_test.go | ||
| readme.md | ||
Golangci-lint-action and Plugins Example
This repository is an example to explain how to use custom linters (plugins) with the GitHub Action of golangci-lint.
Build and Install Plugins
- name: Build and install plugins
run: |
git clone https://github.com/golangci/example-plugin-linter.git
cd example-plugin-linter
go build -o '${{ github.workspace }}/.plugins/example.so' -buildmode=plugin plugin/example.go
working-directory: ${{ runner.temp }}
env:
CGO_ENABLED: 1
Install and Run golangci-lint
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: v2.1.1
# The installation mode `goinstall` always uses `CGO_ENABLED=1`.
install-mode: goinstall
Full Example
The Workflow.