Sync Vale styles when .vale.ini changes - #3126
Merged
Merged
Conversation
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:29 — 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.
Follow-up to #3125.
The
vale synchook was gated ontypes_or: [rst], so a commit that only touched.vale.ini(bumping the pinned ClearProse package, say) never triggered a sync. The gitignoredstyles/tree could stay on the old rules until the next reStructuredText change, meaning local Vale runs applied rules that did not match the committed config.The hook now matches
.rstfiles and.vale.ini, so a package bump takes effect straight away.Verified locally:
prek run vale-sync --files .vale.iniruns the hook rather than skipping it, and it still runs for.rstfiles.🤖 Generated with Claude Code
Note
Low Risk
Pre-commit hook selection only; no runtime app or security impact.
Overview
The
vale-syncpre-commit hook no longer relies only ontypes_or: [rst]. It now uses afilesregex so it runs when.rstfiles or.vale.iniare in the commit.That way a ClearProse (or other package) bump in
.vale.inirefreshes the gitignoredstyles/tree immediately, instead of leaving local Vale on stale rules until the next RST edit. Comments in.pre-commit-config.yamldocument this behavior.Reviewed by Cursor Bugbot for commit 489724b. Bugbot is set up for automated code reviews on this repo. Configure here.