golangci/Golangci-lint

Official golangci-lint action with line-attached annotations for found issues, caching, and parallel execution.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 1, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
versionThe version of golangci-lint to use. When `install-mode` is: - `binary` (default): the value can be v2.3, v2.3.4, or `latest` to use the latest version. - `goinstall`: the value can be v2.3.4, `latest`, or the hash of a commit. - `none`: the value is ignored. no
version-fileGets the version of golangci-lint to use from a file. The path must be relative to the root of the project, or the `working-directory` if defined. This parameter supports `.golangci-lint-version`, and `.tool-versions` files. Only works with `install-mode: binary` (the default). no
install-modeThe mode to install golangci-lint. It can be 'binary', 'goinstall', or 'none'.nobinary
install-onlyOnly install golangci-lint. It does not run golangci-lint.nofalse
working-directorygolangci-lint working directory. The default is the project root.no
github-tokenThe token is used for fetching the patch of a pull request to show only new issues.no${{ github.token }}
verifyIf set to true, the action verifies the configuration file against the JSONSchema.notrue
only-new-issuesIf set to true and the action runs on a pull request, the action outputs only newly found issues.nofalse
argsgolangci-lint command line arguments.no""
skip-cacheIf set to true, all caching functionality will be completely disabled. This takes precedence over all other caching options. nofalse
skip-save-cacheIf set to true, the action will not save any caches, but it may still restore existing caches, subject to other options. nofalse
cache-invalidation-intervalPeriodically invalidate a cache when new code is added (number of days).no7
problem-matchersForce the usage of the embedded problem matchers.nofalse
debugDebug options for the action. List of comma separated options, the values are `cache`, `clean`. example: "cache,clean" no""
experimentalExperimental options for the action. List of comma separated options. Available options: `automatic-module-directories`, `no-run-logs-group` no""

no outputs