Add clang-format config tuned to KLayout C++ style #1
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: clang-format | |
| # Verifies that all C/C++ sources are formatted according to .clang-format. | |
| # Fails if any tracked source would be changed by clang-format. | |
| # | |
| # Uses the community jidicula/clang-format-action. The clang-format version is | |
| # pinned to match .clang-format / local tooling, since output drifts across | |
| # major versions. testdata (golden fixtures) and src/gsiqt (machine-emitted Qt | |
| # bindings) are excluded, mirroring .clang-format-ignore. | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: clang-format-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| formatting-check: | |
| name: Check C++ formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Run clang-format style check | |
| uses: jidicula/clang-format-action@v4 | |
| with: | |
| exclude-regex: "(testdata|gsiqt)/" |