Skip to content

[Enhancement]: Allow downstream users to add project specific acronyms #51

Description

@JC-DSIT

What should change?

The rule needs to remain the same, however there may be local/project/industry specific acronyms that could be included

User need

as above

Proposed solution

use vocab rules instead

✅ Pattern: one vocab per rule
In your gem
styles/config/vocabularies/
MyRule/
accept.txt
AnotherRule/
accept.txt

✅ Example
Rule 1
styles/MyRules/PassiveVoice.yml

YAMLextends: existencetokens: - '\bwas\b'Show more lines
styles/config/vocabularies/PassiveVoice/accept.txt

was approved
was signed off

Rule 2
styles/MyRules/BrandTerms.yml

YAMLextends: substitutionswap: utilise: useShow more lines
styles/config/vocabularies/BrandTerms/accept.txt

utilise-case

✅ .vale.ini
INIStylesPath = stylesVocab = PassiveVoice, BrandTerms[*]BasedOnStyles = MyRulesShow more lines

✅ Downstream extension
Users extend per rule:
styles/config/vocabularies/PassiveVoice/accept.txt

was deployed

styles/config/vocabularies/BrandTerms/accept.txt

utilise API

✅ Your rake task (unchanged)
Same as before — just include both style dirs:
Rubystyles_path = [project_styles, gem_styles] .select { |p| Dir.exist?(p) } .join(",")sh "vale --config='#{config}' --styles-path='#{styles_path}' ."Show more lines

✅ What happens
Each vocab is merged independently:
PassiveVoice:
gem → was approved
user → was deployed

BrandTerms:
gem → utilise-case
user → utilise API

✅ clean separation
✅ no cross-contamination
✅ no overrides

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions