Skip to content

Sync Vale styles when .vale.ini changes - #3126

Merged
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vale-sync-on-config
Aug 6, 2026
Merged

Sync Vale styles when .vale.ini changes#3126
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vale-sync-on-config

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Aug 6, 2026

Copy link
Copy Markdown
Member

Follow-up to #3125.

The vale sync hook was gated on types_or: [rst], so a commit that only touched .vale.ini (bumping the pinned ClearProse package, say) never triggered a sync. The gitignored styles/ 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 .rst files and .vale.ini, so a package bump takes effect straight away.

Verified locally: prek run vale-sync --files .vale.ini runs the hook rather than skipping it, and it still runs for .rst files.

🤖 Generated with Claude Code


Note

Low Risk
Pre-commit hook selection only; no runtime app or security impact.

Overview
The vale-sync pre-commit hook no longer relies only on types_or: [rst]. It now uses a files regex so it runs when .rst files or .vale.ini are in the commit.

That way a ClearProse (or other package) bump in .vale.ini refreshes the gitignored styles/ tree immediately, instead of leaving local Vale on stale rules until the next RST edit. Comments in .pre-commit-config.yaml document this behavior.

Reviewed by Cursor Bugbot for commit 489724b. Bugbot is set up for automated code reviews on this repo. Configure here.

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
adamtheturtle merged commit b4b20be into main Aug 6, 2026
14 checks passed
@adamtheturtle
adamtheturtle deleted the adamtheturtle/vale-sync-on-config branch August 6, 2026 23:22
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