Lint reStructuredText prose with Vale to ban em dashes - #2428
Merged
Conversation
Ban em dashes in reStructuredText using the pinned ClearProse Vale style package. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
adamtheturtle
temporarily deployed
to
development
August 6, 2026 17:13 — with
GitHub Actions
Inactive
Gating ``vale sync`` on reStructuredText files alone meant a commit that only bumped the pinned ClearProse package left the gitignored ``styles`` directory on the old rules until the next reStructuredText change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
adamtheturtle
temporarily deployed
to
development
August 6, 2026 17:18 — with
GitHub Actions
Inactive
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.
Adds Vale as a pre-commit hook so em dashes cannot creep into our reStructuredText.
The rules come from the pinned ClearProse style package (v1.1.0) rather than a hand-written local rule, configured in a new
.vale.ini;vale syncdownloads it into a gitignoredstyles/directory before the lint runs. That release ships as a Vale config package, so it carries theTokenIgnorespattern that keeps Sphinx role targets such as:ref:out of the prose check.vale==3.13.0.0is pinned in the dev extra, and.vale.iniis added to thecheck-manifestignores.Verified locally:
valereports no alerts across the tracked.rstfiles, andprek runover the changed files passes.Note that the
valePyPI wrapper is behind the upstream binary (3.13.0 against 3.17.1), and 3.13.0 drops the occasional alert: on the ClearProse fixture with seven em dashes it reports six, where 3.17.1 reports all seven. The ban still holds, because a file with an em dash is still reported, but the pin is worth bumping when the wrapper publishes a newer Vale.🤖 Generated with Claude Code