Skip to content

Commit

Permalink
Check tidy entirely on PR & diff on push
Browse files Browse the repository at this point in the history
This addresses the issue where missing includes are not caught until
being merged. For a single push, we check the diff to ensure it doesn't
introduce serious tidy issues. The diff check is relatively lightweight.
For a PR, we perform a thorough check on the entire program to ensure
everything is fine before merging into the codebase.
  • Loading branch information
Lai-YT committed Jun 22, 2024
1 parent 10f19db commit cf0247e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
sudo apt-get update
sudo apt-get install -q -y clang-tidy-18
- name: static checks on diff
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'push' }}
run: |
export CLANG_TIDY_DIFF=clang-tidy-diff-18.py
scripts/check-tidy-diff.sh
- name: static checks
if : ${{ github.event_name == 'push' }}
if : ${{ github.event_name == 'pull_request' }}
run: |
export CLANG_TIDY=clang-tidy-18
make tidy
Expand Down

0 comments on commit cf0247e

Please sign in to comment.