Prune parameter-free subtrees; reach param_source through the children hook #563
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Formatting | |
| on: | |
| push: | |
| branches: [main, development] | |
| pull_request: | |
| branches: [main, development] | |
| jobs: | |
| format: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install clang-format | |
| run: brew install clang-format || true | |
| # Fail loudly if clang-format is missing — otherwise the check below | |
| # would pass vacuously on empty output. | |
| - name: Verify clang-format is available | |
| run: clang-format --version | |
| # The \( ... \) grouping matters: without it, -print0 binds only to | |
| # the *.h branch and .c files are never checked. | |
| - name: Check C formatting | |
| run: | | |
| misformatted=$(find . \( -name '*.c' -o -name '*.h' \) -print0 | xargs -0 clang-format -style=file -output-replacements-xml | grep "<replacement " || true) | |
| if [ -n "$misformatted" ]; then | |
| echo "ERROR: Some files are not properly formatted. Run clang-format -i." | |
| exit 1 | |
| else | |
| echo "All files are properly formatted." | |
| exit 0 | |
| fi |