ci: fix count-no-docs jobs failing on every PR - #3294
Merged
Conversation
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>
Deploying lib9c with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
count-no-docs-on-baseref/count-no-docs-on-headreflint jobs currently fail on every PR — including onbaseref(plaindevelopment) 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:
-p GenerateDocumentationFile=truepromotesCS1591(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 (currentlyLib9c.Proposer, ~102error CS1591), the documentation build fails. With-consoleloggerparameters:WarningsOnlythe errors are hidden and noCS15xxwarnings reachgrep, sogrep -creturns 0 and exits 1 — andset -efails the step. Because it's a build-level failure it reproduces onbasereftoo, so it's independent of any individual PR's diff.Fix
-p TreatWarningsAsErrors=falseso the documentation build completes and the missing-doc occurrences stay warnings that can be counted.|| truetogrep -cso a legitimate zero count no longer tripsset -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 downstreamcheck-items-without-docs-increasedcomparison needs.No application code changed — CI only.
🤖 Generated with Claude Code