Skip to content

Commit fd8a908

Browse files
authored
[CI] Extend linter suppression markers check with checks for 'IWYU pragma' (#409)
1 parent f966489 commit fd8a908

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/static-analysis-pr.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-24.04
7575
steps:
7676
- uses: actions/checkout@v4
77-
- name: Search for NOLINT
77+
- name: Search for linter suppression markers
7878
run: |
7979
export BASE_REF=${{ github.event.pull_request.base.ref }}
8080
export CHANGED_FILES="$(git diff --name-only origin/$BASE_REF HEAD | grep '^tasks/')"
@@ -87,5 +87,9 @@ jobs:
8787
echo "::error::Found 'NOLINT' in $file."
8888
exit 1
8989
fi
90+
if grep -En 'IWYU[[:space:]]+pragma' "$file"; then
91+
echo "::error::Found 'IWYU pragma' in $file."
92+
exit 1
93+
fi
9094
done
91-
echo "No 'NOLINT' markers found in changed files."
95+
echo "No linter suppression markers found in changed files."

0 commit comments

Comments
 (0)