Skip to content

Commit 99bc076

Browse files
committed
github: add header guard check
1 parent 8f85f28 commit 99bc076

File tree

2 files changed

+466
-1
lines changed

2 files changed

+466
-1
lines changed

.github/workflows/pr-linter.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ jobs:
4242
- name: Check commit messages
4343
run: python3 ./.github/automation/commit-msg-check.py "${{ github.event.pull_request.head.sha }}" "${{ github.event.pull_request.base.sha }}"
4444

45+
pr-header-guards:
46+
name: Header guards
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
with:
52+
fetch-depth: 0
53+
- name: Check header guards
54+
run: ./scripts/fix_header_guards.py $(git diff --name-only "${{ github.event.pull_request.head.sha }}" "${{ github.event.pull_request.base.sha }}")
55+
4556
pr-clang-format:
4657
name: Clang-Format
4758
runs-on: ubuntu-22.04
@@ -95,4 +106,4 @@ jobs:
95106
needs: [ pr-commits, pr-clang-format, pr-format-tags ]
96107
steps:
97108
- name: Print success
98-
run: echo "Success"
109+
run: echo "Success"

0 commit comments

Comments
 (0)