CFL Field Sensitivity #1406
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: Phasar clang-format review runner | |
| on: | |
| pull_request: | |
| branches: [ master, development ] | |
| jobs: | |
| format: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tool: [ clang-format ] | |
| include: | |
| - tool: clang-format | |
| install: | | |
| sudo apt-get update | |
| sudo apt-get -y install --no-install-recommends clang-format-19 | |
| regex: \.(h|c|hpp|cpp)$ | |
| command: clang-format-19 --style=file -i | |
| continue-on-error: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies | |
| shell: bash | |
| run: ${{ matrix.install }} | |
| - name: Fetch Base Branch | |
| shell: bash | |
| run: | | |
| git fetch --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} | |
| - name: Run Tool | |
| shell: bash | |
| run: | | |
| FILES=$(git diff --name-only --diff-filter=AM origin/${{ github.base_ref }} HEAD | egrep "${{ matrix.regex }}" || true) | |
| [ -z "$FILES" ] || (${{ matrix.command }} $FILES && git diff --diff-filter=M $FILES) | |
| - name: Add Suggestions | |
| uses: reviewdog/action-suggester@v1 | |
| with: | |
| tool_name: ${{ matrix.tool }} | |
| filter_mode: diff_context | |
| level: warning |