Skip to content

Commit

Permalink
Set filter_mode: nofilter and fail_on_error: true for reviewdog linters
Browse files Browse the repository at this point in the history
- `nofilter` means it will check the entire repository not just the stuff added in the most recent commit of the PR
- `fail_on_error` means the github action fails (e.g. shows up red instead of green)
  • Loading branch information
phrdang committed Jun 18, 2024
1 parent 7100772 commit 30ef534
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
# GitHub Status Check won't become failure with warning.
level: warning
glob_pattern: "**/*.py"
filter_mode: nofilter
fail_on_error: true

black:
name: runner / black
Expand All @@ -29,11 +31,13 @@ jobs:
id: action_black
with:
black_args: "."
fail_on_error: true
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
with:
tool_name: blackfmt
# NOTE: the reviewdog filter_mode is diff_context - this is the only thing supported by GitHub suggestions

markdownlint:
name: runner / markdownlint
Expand All @@ -45,6 +49,8 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
filter_mode: nofilter
fail_on_error: true

rubocop:
name: runner / rubocop
Expand All @@ -62,3 +68,5 @@ jobs:
reporter: github-pr-check
skip_install: true
use_bundler: true
filter_mode: nofilter
fail_on_error: true

0 comments on commit 30ef534

Please sign in to comment.