|
5 | 5 | clang-format: |
6 | 6 | runs-on: ubuntu-24.04 |
7 | 7 | steps: |
| 8 | + # `submodules: recursive` is intentionally omitted: faster checkout, and |
| 9 | + # the formatter source list does not include lib/, so vendored submodule |
| 10 | + # sources are not formatted regardless. |
8 | 11 | - uses: actions/checkout@v4 |
9 | 12 | with: |
10 | 13 | fetch-depth: 0 |
| 14 | + - name: Verify Vendored Submodule Is Absent 🚫 |
| 15 | + # Hard-asserts the no-submodule precondition. If a future change starts checking out |
| 16 | + # submodules, the formatter exclusion filters in build-aux/.run-format.zsh become the |
| 17 | + # only line of defense and a regression there would silently format vendored sources |
| 18 | + # in CI but not locally. Catch the drift early. |
| 19 | + run: | |
| 20 | + if [ -e lib/obs-websocket/lib/obs-websocket-api.h ]; then |
| 21 | + echo "::error::lib/obs-websocket/ submodule is present in the format-check checkout but should not be." >&2 |
| 22 | + echo "::error::Either remove 'submodules' from the checkout step or update this guard." >&2 |
| 23 | + exit 1 |
| 24 | + fi |
11 | 25 | - name: clang-format check 🐉 |
12 | 26 | id: clang-format |
13 | 27 | uses: ./.github/actions/run-clang-format |
|
17 | 31 | cmake-format: |
18 | 32 | runs-on: ubuntu-22.04 |
19 | 33 | steps: |
| 34 | + # `submodules: recursive` is intentionally omitted: faster checkout, and |
| 35 | + # the formatter source list does not include lib/, so vendored submodule |
| 36 | + # sources are not formatted regardless. |
20 | 37 | - uses: actions/checkout@v4 |
21 | 38 | with: |
22 | 39 | fetch-depth: 0 |
| 40 | + - name: Verify Vendored Submodule Is Absent 🚫 |
| 41 | + # Hard-asserts the no-submodule precondition. If a future change starts checking out |
| 42 | + # submodules, the formatter exclusion filters in build-aux/.run-format.zsh become the |
| 43 | + # only line of defense and a regression there would silently format vendored sources |
| 44 | + # in CI but not locally. Catch the drift early. |
| 45 | + run: | |
| 46 | + if [ -e lib/obs-websocket/lib/obs-websocket-api.h ]; then |
| 47 | + echo "::error::lib/obs-websocket/ submodule is present in the format-check checkout but should not be." >&2 |
| 48 | + echo "::error::Either remove 'submodules' from the checkout step or update this guard." >&2 |
| 49 | + exit 1 |
| 50 | + fi |
23 | 51 | - name: cmake-format check 🎛️ |
24 | 52 | id: cmake-format |
25 | 53 | uses: ./.github/actions/run-cmake-format |
|
0 commit comments