Skip to content

Treat developer guide vale and asciidoc warnings as build errors#4971

Merged
shai-almog merged 4 commits into
masterfrom
dev-guide-vale-zero-warnings
May 17, 2026
Merged

Treat developer guide vale and asciidoc warnings as build errors#4971
shai-almog merged 4 commits into
masterfrom
dev-guide-vale-zero-warnings

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • Drives the docs/developer-guide Vale report to zero findings at every severity level (was 362 errors + 2,778 warnings + 8,906 suggestions).
  • Promotes any future Vale or Asciidoctor warning to a build-breaking failure in the Build Developer Guide Docs workflow — captures the status from each linter, uploads the reports on always(), and adds a final quality-gate step that fails the job when either tool reports anything.
  • Splits cleanup into real prose corrections (heading colon capitalization, stale E.g. rewrites, British → American spelling, punctuation inside quotes, broken pre-existing prose like tools in the market. it's a tool…) and documented rule disables in docs/developer-guide/.vale.ini for default checks that systematically misfire on a long-form developer guide (passive voice, sentence-length cap, acronym-definition requirements, the disabled accessibility flag, etc.). Each disable has a per-rule rationale comment.
  • Adds 4 narrow // vale-skip: exceptions where the rule was generally correct but the specific instance was a technical false positive (XXX placeholder inside a verbatim TeaVM error message, vs. abbreviation in headings, the parser misclassifying a paragraph as part of a heading, Very High Res as a labelled DPI bucket).
  • Tracks a project Vocab file at docs/developer-guide/styles/config/vocabularies/CodenameOne/accept.txt (refined .gitignore keeps synced style packages ignored).

Test plan

  • Run Asciidoctor lint step still passes (no warnings produced by the document conversion).
  • Run Vale style linter step reports Issues: 0 at --minAlertLevel=suggestion.
  • Fail build on developer guide quality issues step prints the "passed" message on a clean run.
  • Artifact uploads (HTML, PDF, AsciiDoc lint, Vale report, unused image report) still appear on the workflow run.
  • PR-comment update with artifact links posts as before.
  • Introduce a deliberate violation locally (e.g. a sentence starting with "Hopefully" in any .adoc) → confirm Vale flags it and the quality-gate step fails the job.

🤖 Generated with Claude Code

Drives the docs/developer-guide vale report to zero findings at every
severity level, then promotes any future vale/asciidoctor warning to
a build-breaking failure in the Build Developer Guide Docs workflow.
Fixes are split between real prose corrections (heading colon
capitalization, stale "e.g." / "E.g." rewrites, British → American
spelling, punctuation inside quotes, broken pre-existing prose) and
documented rule disables in docs/developer-guide/.vale.ini covering
default checks that misfire systematically on a long-form developer
guide (passive voice, sentence length, acronym definitions, the
"disabled" accessibility flag, etc.). The styles directory remains
gitignored, with an exception that tracks the project vocabulary so
CI sees the same accept list as local contributors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Image references: No unused images detected (report)

@github-actions
Copy link
Copy Markdown
Contributor

Cloudflare Preview

shai-almog and others added 3 commits May 16, 2026 20:35
Splits the find_unused_images.py check into a real quality gate:
- ignore non-image files in the image tree so .gitkeep placeholders
  no longer flash as orphans
- exit non-zero when at least one unused image is found so the new
  quality-gate step at the end of the developer-guide workflow can
  fail the build with the other linters

Also removes docs/developer-guide/img/cn1libs-refresh.png, which was
orphaned by #4952 when the matching image:: directive was deleted
alongside the other cn1lib screenshots.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Critically re-examines each previously-disabled vale rule and keeps
only the ones whose recommendation is *wrong* for a developer-facing
reference, with a written rationale for each. The rest are now back on
as build-failing checks and the existing prose has been rewritten to
match.

Real defects that the re-enabled rules caught and that the prose now
fixes:
- write-good.Illusions found "IntelliJ IDEA IDEA" and "Eclipse IDE
  IDE" (the kind of LLM-generated repetition we want to keep catching).
- write-good.ThereIs cleared 44 "There is..." / "There are..."
  sentence openers in favour of stronger verb phrases.
- Microsoft.FirstPerson / Microsoft.We replaced ~190 instances of
  authorial "I", "we", and "let's" with second-person or imperative
  voice consistent with the rest of the guide.
- Microsoft.Contractions normalised 70+ "they are" / "is not" / "what
  is" forms to the contractions the rule prefers (and fixed a real
  "where is says" typo on Push-Notifications.asciidoc).
- Microsoft.Adverbs cut about 40 redundant softeners; the remaining
  precise adverbs (`lazily` on `LazyValue`, `gracefully` on fallback
  degradation, etc.) carry per-line vale-skip rationale.
- Microsoft.Auto switched generic "auto-X" hyphenations to the
  unhyphenated Microsoft form, while keeping Apple/Google product
  terms ("Auto-Renewable subscriptions") behind per-line skips.
- Microsoft.OxfordComma, Microsoft.Wordiness, Microsoft.Percentages,
  proselint.Skunked, and write-good.So were each driven to zero by
  rewrites.
- proselint.Needless additions to the project Vocab keep Android's
  "Lollipop" codename and "extensible" / "oversized" from being
  spell-corrected to "lollypop" / "extendable" / "oversize".

Vocab additions cover Java ME / Java SE / Java EE platform names so
they no longer trip Microsoft.FirstPerson on the trailing "ME".

The rules that remain off carry a paragraph in `.vale.ini` describing
*why* their recommendation is inappropriate for this guide (E-Prime
banning "to be", Microsoft.GeneralURL turning "URL" into "address",
Microsoft.Spacing firing on dotted code identifiers, Microsoft.Ranges
rewriting ISO 639-1 / ISO 3166-1 standard codes, Microsoft.Semicolon
firing on Java statement terminators inside `[source,java]` blocks,
and so on).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bulk "auto-snap" -> "autosnap" rewrite that satisfied
Microsoft.Auto in prose accidentally also renamed the image:: target
to a path that doesn't exist on disk (the image file is still
guibuilder-2-smart-insets-auto-snap-checkboxes.png). That broke both
the website's lychee link check and the developer guide workflow's
unused-image gate. The image filename is inside an image:: directive
that vale's adoc parser excludes from prose, so restoring the hyphen
keeps the rule clean while pointing readers at the file that
actually ships in img/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shai-almog shai-almog merged commit 45a3c89 into master May 17, 2026
8 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