• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / 28684607716
90%

Build:
DEFAULT BRANCH: main
Ran 03 Jul 2026 09:45PM UTC
Jobs 1
Files 177
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2026 09:43PM UTC coverage: 91.55% (+0.004%) from 91.546%
28684607716

push

github

web-flow
ci: validate clang-format on PR-changed lines (#1185)

## Summary

Adds a `clang-format` workflow that validates formatting of **only the
lines actually changed by the PR**, using `clang-format-diff` fed by
`git diff -U0` against the PR base. Pre-existing style drift elsewhere
in a touched file never blocks an unrelated change.

Also updates `.clang-format` to set
`AlignConsecutiveDeclarations.AlignFunctionDeclarations: false` (added
in clang-format 20 by llvm/llvm-project#108241), so consecutive function
prototypes are no longer padded into column alignment. Variable
declaration alignment is unchanged — the previous
`AcrossEmptyLinesAndComments` shorthand is expanded to its equivalent
explicit form with the new sub-option added.

## clang-format version

The workflow discovers the **latest stable LLVM release at runtime** by
parsing `CURRENT_LLVM_STABLE` from apt.llvm.org's `llvm.sh` (currently
22), then installs just `clang-format-NN` from the matching apt repo —
no toolchain bloat, and the check tracks new LLVM releases
automatically. Since only changed lines are checked, a
formatting-behavior change in a new release has minimal blast radius.

## Details

- Scope matches DEVELOPER-NOTES.md: `*.c` / `*.h`, excluding
`src/lib/thirdparty`.
- On failure the suggested fix is printed to the log, published as a
```diff``` block in the job step summary, and surfaced via a `::error::`
annotation.
- `paths` filter skips the workflow entirely for PRs not touching C
sources or the format config (skips count as passing for the **All
Checks** aggregator from #1182).
- `clang-format-diff` exits non-zero when it emits a diff; that's
neutralized (`|| true`) so the explicit patch-size check controls
failure and the diagnostics always print.
- Verified locally with clang-format 22.1.8: the updated `.clang-format`
parses, and a synthetic bad-format change is flagged while untouched
lines in the same file are left alone.

🤖 Generated with [Claude Code](https://claude.c... (continued)

23748 of 25940 relevant lines covered (91.55%)

12440.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28684607716.1 03 Jul 2026 09:45PM UTC 935
61.6
GitHub Action Run
Source Files on build 28684607716
  • Tree
  • List 177
  • Changed 54
  • Source Changed 0
  • Coverage Changed 54
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9fb88588 on github
  • Prev Build on main (#28673989834)
  • Next Build on main (#28687659894)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc