From ba6501b4099f6e927ab29a1c84e31e8ca147db70 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 20:08:06 +0000 Subject: [PATCH] Add clang-format-19 reviewdog workflow Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/97007c65-a5f6-4ee8-82e2-0c8e361443f7 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com> --- .github/workflows/clang-format.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/clang-format.yml diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml new file mode 100644 index 0000000..38a328a --- /dev/null +++ b/.github/workflows/clang-format.yml @@ -0,0 +1,40 @@ +name: Clang-format check + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + checks: write + issues: write + pull-requests: write + +jobs: + clang-format-check: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Install clang-format + run: sudo apt-get install -y clang-format-19 + + - name: Run clang-format + run: > + git ls-files '*.cpp' '*.c' '*.hpp' '*.h' | + xargs -r clang-format-19 -i + + - name: Suggest clang-format fixes + if: github.event_name == 'pull_request' + uses: reviewdog/action-suggester@v1 + with: + tool_name: clang-format-19 + fail_level: any + level: warning + + - name: Verify no formatting changes are needed + run: git --no-pager diff --exit-code -- .