diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..a854e574 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,12 @@ +# Revisions for `git blame` to skip (mechanical changes, no authorship signal). +# +# Enable locally: git config blame.ignoreRevsFile .git-blame-ignore-revs +# GitHub honors this file automatically on the default branch. +# +# IMPORTANT: each SHA must be the commit as it lands on `main`. These entries +# assume the PR merges with a *merge commit* (which preserves the SHA). A squash +# or rebase merge rewrites the SHA and would make the entry silently match +# nothing. + +# Tree-wide clang-format (clang-format 22.1.5; see scripts/ci/clang-format.sh). +906d1088483418bbe347993fd909af054893fcd8 diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml new file mode 100644 index 00000000..fee45475 --- /dev/null +++ b/.github/workflows/clang-format.yml @@ -0,0 +1,24 @@ +name: clang-format + +on: + pull_request: + branches: [main] + push: + branches: [main] + +# Supersede in-flight runs on the same ref. +concurrency: + group: clang-format-${{ github.ref }} + cancel-in-progress: true + +jobs: + clang-format: + runs-on: blacksmith-2vcpu-ubuntu-2404 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/setup-uv@v8.2.0 + - name: clang-format gate + # Our C/C++ must match the pinned clang-format. Scope (vendored excluded) + # and the pinned version both live in scripts/ci/clang-format.sh. + run: scripts/ci/clang-format.sh --check diff --git a/AGENTS.md b/AGENTS.md index f8655732..c1bf31ed 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,6 +24,21 @@ uv run --project scripts/envs/ scripts/