Repository navigation
feat: Load rules from .yaml files as well as .yml - #1232
Merged
Merged
Conversation
|
Before this is reviewed, please read the AI-Assisted Contributions section of the contributing guide and make sure this change meets it: you can explain every line, the description is your own and brief, it fixes a bug you hit or a feature agreed in an issue, it does not touch undocumented options, and any substantial tool use is noted. |
|
The license agreement is signed. |
Contributor
Author
|
I have read the CLA and I agree to it |
A style's rules were found by the `.yml` suffix, so a rule saved as `Rule.yaml` was skipped without a word. The same suffix was fixed where a rule is turned on by name (`Style.Rule = YES`), where `extends: Style.Rule` finds its parent, and where a spelling rule is read back for suggestions. All four now accept either extension through core.RuleExtensions. If a style holds both `Rule.yml` and `Rule.yaml`, the rule is read from `Rule.yml`, which is the file Vale loaded before; the other is ignored rather than failing with a duplicate rule name. Fixes vale-cli#1217 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seragAhmed
force-pushed
the
feat/1217-yaml-extension
branch
from
November 20, 2026 20:46
a4a2081 to
2091bd5
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
A style's rules were found by the
.ymlsuffix, so a rule saved asRule.yamlwas skipped without any message. The same suffix was hard-coded where a rule is turned on by name (Style.Rule = YES), whereextends: Style.Rulefinds its parent, and where a spelling rule is read back for suggestions. All four now accept either extension (core.RuleExtensions).If a style holds both
Rule.ymlandRule.yaml, the rule is read fromRule.yml, the file Vale already loaded, and the.yamlcopy is ignored. It doesn't matter which file the directory walk finds first. Vocabularies, scopes and test files already accepted both extensions, so they're unchanged.Tests: two e2e cases in
config.yaml(a.yamlrule loaded with its style, by name, and as a parent; and a.yml/.yamlpair) plus a unit test forresolveRule.Fixes #1217
Assisted-by: Claude Code
🤖 Generated with Claude Code