A GitHub Action that runs golangci-lint with reviewdog to automatically lint Go code in pull requests.
reviewdog/action-golangci-lint is a GitHub Action that automatically runs golangci-lint, a fast Go linters runner, with reviewdog to analyze code in pull requests. It posts linting results as review comments or status checks, helping teams catch bugs, style issues, and security vulnerabilities before merging code. The action simplifies CI/CD setup by handling Go installation, caching, and linter execution in a single step.
Go developers and teams using GitHub for version control who want to enforce code quality standards through automated linting in their pull request workflow.
Developers choose this action because it seamlessly integrates two powerful tools—golangci-lint for comprehensive Go analysis and reviewdog for automated code review—reducing manual review effort. Its built-in caching and configuration flexibility make it faster and more adaptable than manual setup.
Run golangci-lint with reviewdog
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The action automatically sets up Go and caches dependencies and lint results by default, reducing manual workflow configuration and speeding up runs, as highlighted in the migration guide and cache input.
Supports custom golangci-lint flags, configuration files, and multiple linter setups (e.g., golint, errcheck), allowing tailored linting rules, shown in the advanced usage examples with golangci_lint_flags.
Posts linting findings as review comments or status checks in GitHub pull requests via reviewdog, improving code review efficiency with visual annotations and check tabs, as demonstrated in the README screenshots.
Enables running multiple linters in parallel jobs with different configurations and tool names, facilitating comprehensive static analysis without serial bottlenecks, illustrated in the example workflows.
The action is designed exclusively for GitHub Actions, making it unsuitable for projects on other version control systems or CI/CD platforms, which restricts its adoption in mixed environments.
As noted in the README, golangci-lint doesn't report multiple errors on the same line from different linters, which can obscure some issues and reduce the comprehensiveness of feedback in complex code.
Requires specifying exact commit hashes for actions and managing versions of Go, reviewdog, and golangci-lint, leading to maintenance complexity and potential breaking changes, as seen in the v1 to v2 migration.