reviewdog error: all golangci-lint checks skipped, no files matched
Fixes reviewdog reporting that every golangci-lint check was skipped because no files matched its filter. Use it when a reviewdog golangci-lint run completes with zero findings and a no-files-matched message on a PR that clearly changed Go code. Key trigger: the skipped message appears even though the diff contains .go files.
TL;DR
Point reviewdog at the actual PR diff and make sure golangci-lint can see the changed Go files. The skip message means the file filter matched nothing, so either the diff was empty, the checkout was wrong, or the include pattern excluded every file. Fix the diff source and the filter, and the checks will run.
Verbatim error
reviewdog error: all golangci-lint checks skipped, no files matchedSteps
Confirm the PR actually changed Go files. Run
git diff --name-only origin/main...HEAD(use your real base branch) and look for.gofiles in the output. Expected: at least one.gopath listed. If the list is empty, the skip message is correct and there is nothing to fix.Check how reviewdog gets the diff. If the step uses
-diff="git diff"with no arguments, it diffs the working tree, which is usually clean in CI. Change it to diff against the PR base, for example-diff="git diff origin/main...HEAD". Expected: re-running reviewdog now reports real findings or "no issues found" instead of the skip message.Run golangci-lint by hand on one changed file from the repo root, for example
golangci-lint run path/to/file.go, and confirm it works. Expected: exit 0 with findings, or findings listed. If it errors about missing modules, rungo mod downloadfirst in the same step.Check the filter flags. reviewdog flags like
-filter-mode=diff_contextneed the full diff with context lines; a shallow--depth=1checkout can break this. Make the checkout fetch enough history (fetch-depth: 0for full history is the safe option). Expected: with full history the filter matches the changed files and checks run.
Use this when
- reviewdog logs the all-checks-skipped message but the PR changed Go files.
- golangci-lint findings never appear as reviewdog annotations.
- The same reviewdog setup works on other repos but skips on this one.
Not for this skill when
- golangci-lint itself crashes or reports a config error (that is a golangci-lint problem, not a file filter problem).
- The PR genuinely has no Go files (then the skip is correct behavior).
- Annotations fail to post with a permissions error (see the reviewdog annotation permission skill instead).
Variant phrasings
- reviewdog golangci-lint: no files matched, all checks skipped
- reviewdog reports 0 findings on Go PR with obvious lint issues
- golangci-lint via reviewdog does nothing on pull request
Why it happens
reviewdog only lints files its filter selects from the diff you hand it. In CI the two classic breakages are (1) the diff command produces nothing because the working tree is clean and no base ref was given, and (2) a shallow checkout means the base ref does not exist so the diff is empty. With zero files through the filter, reviewdog skips every check and says so.
Edge cases
- Monorepos: if the workflow runs reviewdog from a subdirectory, the diff paths will not line up. Run it from the repo root or set the working directory explicitly.
- Draft PRs opened from a fork: the base ref may not be fetched at all. Fetch the base branch before diffing.
filter-mode=nofilterruns the linter on everything, which fixes the skip but posts findings on unchanged lines too. Prefer fixing the diff source over switching to nofilter.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_7hFqUNTTp2GyCTLQlQcysA