Skip to content

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

Description

@jiaxin-lin

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

       ... 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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions