Closed rohennes closed 2 months ago
The Vocab
key should be defined globally (not per syntax):
Packages = RedHat, AsciiDoc, OpenShiftAsciiDoc
Vocab = OpenShiftDocs
# Ignore files in dirs starting with `.` to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files
[[!.]*.adoc]
BasedOnStyles = RedHat, AsciiDoc, OpenShiftAsciiDoc
Thanks Joseph. That's good to know.
If I have Vocab in the modules/.vale.ini
in the same format as your comment, the OpenShiftAsciiDoc.NoXrefInModules
rule does not alert.
If I delete the Vocab line in the modules/.vale.ini
the OpenShiftAsciiDoc.NoXrefInModules
rule does alert.
Why would the presence of Vocab be affecting this rule?
The answer in such a case is always going to be that one of your vocab entries is matching what you expect the rule to alert against. In this case, it's your first entry:
(.*/)+
In general, you can add vocab: false
to a rule to avoid this. However, this pattern looks like it isn't doing what you expect -- so I'd either remove it entirely or make it more specific.
Check for existing issues
Environment
vale version 3.0.7 Fedora Workstation 39 Installed from the repo
Describe the bug / provide steps to reproduce it
I cannot get the Vocab accept/reject rules working at the same time as raw scoped rules from rule set.
See here for test case: https://github.com/rohennes/vale-test
The structure of our repo has a top level .vale.ini file, with some rules disabled, and a lower level modules folder featuring a .vale.ini with all the rules.
It looks like when I set this order, the raw-scoped rules work but the Vocab doesn't work:
But when I set this order, the Vocab works and the raw-scoped rules stop working:
Thanks for your help.