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

c-ares / c-ares / 28802494904
90%

Build:
DEFAULT BRANCH: main
Ran 06 Jul 2026 03:26PM UTC
Jobs 1
Files 176
Run time 3min
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

06 Jul 2026 03:19PM UTC coverage: 89.953% (-0.02%) from 89.975%
28802494904

push

github

web-flow
clang-format: reformat src/ and include/, and stop changed-lines false positives on bulk reformats (#1238)

Two commits: a full-tree reformat, plus a CI robustness fix so the
changed-lines check doesn't false-positive on bulk reformats. **No
functional change.**

## 1. clang-format: reformat src/ and include/ .c/.h files
Runs `clang-format` over tracked `.c`/`.h` under `src/` and `include/`,
excluding `src/lib/thirdparty` (matching the CI's own exclusion) and
`test/`. 66 files.

Most of the churn is **removal of function-declaration alignment**: the
config sets `AlignConsecutiveDeclarations.AlignFunctionDeclarations:
false` (a clang-format ≥20 option), but a lot of code predates that
option and still carried the old aligned style. This brings the tree in
line with the config so the changed-lines `clang-format` check stops
flagging pre-existing formatting in unrelated PRs.

## 2. ci: skip the changed-lines check for whole-file-clean files
The changed-lines check (`clang-format-diff`) can **false-positive on a
bulk reformat**: when a reformatted line's alignment column is anchored
by a neighboring line the PR didn't touch, `clang-format-diff` (which
only sees the changed lines) computes a *different* alignment than a
whole-file format. This PR itself tripped it on exactly one enum in
`src/lib/util/ares_iface_ips.h`, even though the file is fully
`clang-format`-clean.

Fix: a file that is `clang-format` clean **as a whole** is, by
definition, clean on the lines the PR changed too — so the check now
skips any changed file that passes `clang-format --dry-run -Werror`, and
only runs `clang-format-diff` on files that are not whole-file clean.
Incremental PRs touching an unclean file still get their changed lines
validated, and a genuinely mis-formatted edit still fails (it makes the
file whole-file dirty).

## Verification
- All 135 in-scope files are whole-file `clang-format` clean
(idempotent).
- Simulated the new CI logic locally against this PR's diff: *... (continued)

66 of 66 new or added lines in 19 files covered. (100.0%)

6 existing lines in 2 files now uncovered.

24317 of 27033 relevant lines covered (89.95%)

24404.37 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
89.75
-1.77% src/lib/record/ares_dns_name.c
1
68.41
-0.15% src/lib/record/ares_dns_mapping.c
Jobs
ID Job ID Ran Files Coverage
1 28802494904.1 06 Jul 2026 03:26PM UTC 176
89.95
GitHub Action Run
Source Files on build 28802494904
  • Tree
  • List 176
  • Changed 30
  • Source Changed 30
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28802494904
  • a13b89cc on github
  • Prev Build on main (#28796095331)
  • Next Build on main (#28830262268)
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