From f1fb99330122673dbb9f430249f717f844e9de0d Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Wed, 1 Jul 2026 17:43:02 +0900 Subject: [PATCH] ci: fix count-no-docs jobs failing on every PR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f307799cc..c150a4e5b7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -44,7 +44,7 @@ jobs: - id: count-no-docs run: | set -ev - count=$(dotnet build -p GenerateDocumentationFile=true -p 'DocumentationFile=docs.xml' -consoleloggerparameters:WarningsOnly | grep -c -E "CS(1573|1591)") + count=$(dotnet build -p GenerateDocumentationFile=true -p 'DocumentationFile=docs.xml' -p TreatWarningsAsErrors=false -consoleloggerparameters:WarningsOnly | grep -c -E "CS(1573|1591)" || true) echo "count=$count" >> "$GITHUB_OUTPUT" count-no-docs-on-headref: runs-on: ubuntu-latest @@ -59,7 +59,7 @@ jobs: - id: count-no-docs run: | set -ev - count=$(dotnet build -p GenerateDocumentationFile=true -p 'DocumentationFile=docs.xml' -consoleloggerparameters:WarningsOnly | grep -c -E "CS(1573|1591)") + count=$(dotnet build -p GenerateDocumentationFile=true -p 'DocumentationFile=docs.xml' -p TreatWarningsAsErrors=false -consoleloggerparameters:WarningsOnly | grep -c -E "CS(1573|1591)" || true) echo "count=$count" >> "$GITHUB_OUTPUT" check-items-without-docs-increased: runs-on: ubuntu-latest