#2258·reviewdog

Reviewdog file filter mode works on PR but not after checking into main branch

Author: jiaxin-linCreated Sep 16, 2025Updated Sep 17, 2025

First of all thanks for this package, it has been very helpful for us.

We are able to get reviewdog working on our PR in a github action, with something similar to the following

bash
       ... run linter and produce lint.txt with lint issues
       cat ../lint.txt \
          | reviewdog \
              -efm="%f:%l:%c: %m" \
              -reporter=github-pr-review \
              -name="somename" \
              -filter-mode=file \
              -fail-level=warning

It was able to produce the correct check errors constraint to the list of files changed in the PR.

However, when the action is triggered again on main branch after the pr is checked in (exactly the same command as above, only with reporter changed to github-check), reviewdog would fail and basically reporting on all the errors in lint.txt, not just constraint to the files in the commit (our PRs are squashed checked in so it'd result in one commit on the main branch)

Are we using the incorrect filter? We have also changed to diff_context but it did not solve the issue.

Thanks!