Skip to content

ci: fix count-no-docs jobs failing on every PR - #3294

Merged
ipdae merged 2 commits into
developmentfrom
bugfix/lint-count-no-docs-build
Jul 1, 2026
Merged

ci: fix count-no-docs jobs failing on every PR#3294
ipdae merged 2 commits into
developmentfrom
bugfix/lint-count-no-docs-build

Conversation

@ipdae

@ipdae ipdae commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

The count-no-docs-on-baseref / count-no-docs-on-headref lint jobs currently fail on every PR — including on baseref (plain development) and on unrelated PRs (e.g. #3291). They used to pass (~1 min builds); they now abort in ~15–25s.

Root cause

Both jobs run:

set -ev
count=$(dotnet build -p GenerateDocumentationFile=true -p 'DocumentationFile=docs.xml' -consoleloggerparameters:WarningsOnly | grep -c -E "CS(1573|1591)")

-p GenerateDocumentationFile=true promotes CS1591 (missing XML doc) to a build error in the projects that set <TreatWarningsAsErrors>true</TreatWarningsAsErrors> (Lib9c, Lib9c.Abstractions, Lib9c.MessagePack, Lib9c.Proposer, .Lib9c.Tests). Once an undocumented public member landed in one of those projects (currently Lib9c.Proposer, ~102 error CS1591), the documentation build fails. With -consoleloggerparameters:WarningsOnly the errors are hidden and no CS15xx warnings reach grep, so grep -c returns 0 and exits 1 — and set -e fails the step. Because it's a build-level failure it reproduces on baseref too, so it's independent of any individual PR's diff.

Fix

  • Add -p TreatWarningsAsErrors=false so the documentation build completes and the missing-doc occurrences stay warnings that can be counted.
  • Append || true to grep -c so a legitimate zero count no longer trips set -e.

Verification

Locally, before: clean doc build fails with error CS1591 (Build FAILED). After: build succeeds and the warning count is produced (count=12070), which is what the downstream check-items-without-docs-increased comparison needs.

No application code changed — CI only.

🤖 Generated with Claude Code

ipdae and others added 2 commits July 1, 2026 17:43
The count-no-docs-on-baseref/headref jobs build with
`-p GenerateDocumentationFile=true`, which promotes CS1591 (missing XML
doc) to build errors in the projects that set TreatWarningsAsErrors
(Lib9c, Lib9c.Abstractions, Lib9c.MessagePack, Lib9c.Proposer,
.Lib9c.Tests). Once an undocumented public member landed in one of those
projects (e.g. Lib9c.Proposer), the documentation build started failing,
so `grep -c` matched nothing and, under `set -e`, the step exited 1 —
failing the docs gate on every PR (baseref included) regardless of the
diff.

Add `-p TreatWarningsAsErrors=false` so the doc build completes and the
missing-doc warnings can be counted, and append `|| true` to the
`grep -c` so a legitimate zero count no longer trips `set -e`.

Verified locally: the doc build now succeeds and the warning count is
reported instead of the job aborting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploying lib9c with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b23bde
Status: ✅  Deploy successful!
Preview URL: https://3b716079.lib9c.pages.dev
Branch Preview URL: https://bugfix-lint-count-no-docs-bu.lib9c.pages.dev

View logs

@ipdae
ipdae merged commit 0cb4999 into development Jul 1, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant