Skip to content

[CI] Extend linter suppression markers check with checks for 'IWYU pragma' #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/static-analysis-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Search for NOLINT
- name: Search for linter suppression markers
run: |
export BASE_REF=${{ github.event.pull_request.base.ref }}
export CHANGED_FILES="$(git diff --name-only origin/$BASE_REF HEAD | grep '^tasks/')"
Expand All @@ -87,5 +87,9 @@ jobs:
echo "::error::Found 'NOLINT' in $file."
exit 1
fi
if grep -En 'IWYU[[:space:]]+pragma' "$file"; then
echo "::error::Found 'IWYU pragma' in $file."
exit 1
fi
done
echo "No 'NOLINT' markers found in changed files."
echo "No linter suppression markers found in changed files."
Loading