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

c-ares / c-ares / 28741068773
90%

Build:
DEFAULT BRANCH: main
Ran 05 Jul 2026 12:42PM UTC
Jobs 1
Files 176
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

05 Jul 2026 12:39PM UTC coverage: 89.868% (-0.001%) from 89.869%
28741068773

push

github

web-flow
ci: diff clang-format against the PR merge commit's first parent (#1226)

## Problem

The clang-format check diffs `github.event.pull_request.base.sha`
against the checked-out PR **merge ref**. `base.sha` is pinned to the
base-branch tip at the time the PR was opened, while the merge ref is
the PR merged into the **current** base tip. For a branch opened weeks
ago, the diff therefore contains every main-side change made since — and
`clang-format-diff` flags lines the PR never touched.

This is amplified by #1185 having changed `.clang-format`
(`AlignConsecutiveDeclarations` → `AlignFunctionDeclarations: false`)
without reformatting the tree: pre-#1185 code swept into a stale diff
window gets evaluated under rules it was never written for.

Observed on #1147's check run, which flagged hunks in `ares_dns_name.c`,
`ares_dns_write.c`, `ares_dns_parse.c`, `ares_dns_mapping.c`,
`ares_dns_private.h`, `ares_sysconfig_win.c`, and `ares_nameser.h` —
none touched by that PR. Reproduced locally byte-for-byte with the
workflow's exact pipeline (clang-format 22.1.8, LLVM 22
`clang-format-diff.py`, stale base), and confirmed the same PR's diff is
clean when based correctly.

## Fix

Diff against `HEAD^1` instead: on the merge ref, the first parent is by
definition the current base-branch tip, so the diff is exactly the lines
the PR changes — regardless of branch staleness — evaluated under the
base branch's current `.clang-format`. Requires `fetch-depth: 2` so the
parent commit is available; the separate `git fetch` of `BASE_SHA` goes
away.

Signed-off-by: Brad House <brad@brad-house.com>

24081 of 26796 relevant lines covered (89.87%)

16221.23 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
88.28
-0.09% src/lib/record/ares_dns_record.c
Jobs
ID Job ID Ran Files Coverage
1 28741068773.1 05 Jul 2026 12:42PM UTC 176
89.87
GitHub Action Run
Source Files on build 28741068773
  • Tree
  • List 176
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28741068773
  • fa474543 on github
  • Prev Build on main (#28740348742)
  • Next Build on main (#28745845168)
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