vale-at-red-hat
vale-at-red-hat copied to clipboard
Figure out how to ignore a subset of a style's rules in a parent folder and turn it on in a child folder
Context: The Red Hat Supplementary Style Guide has specific rules for release notes. The user wants these rules to apply to release notes, but avoid false flags in general content.
Approach: While it might be possible to solve this problem using scoping, the OpenShift docs repo already has release notes in a separate folder from the main documentation. I will try to create a .vale.ini for the parent folder that ignores the ReleaseNotes.yml rules. The .vale.ini for the the release notes folder will include the ReleaseNotes.yml rules.
Best case scenario: the release notes AsciiDoc files use consistently a certain pattern, like a prefix or suffix. Then we can implement matching rules in one unique vale.ini.
Other possible scenario: no file patterns, but identifiable directories. Use the directories pattern to build the matching rule in vale in.
Worst case scenario: no patterns. Use different vale.ini. It adds complexity to continuous integration, or you keep skipping release notes rules in ci.
Considering that rule precisely: https://github.com/Vale-at-Red-Hat/vale-at-red-hat/blob/main/.vale/styles/RedHat/ReleaseNotes.yml, I consider the present situation as acceptable.
- The alert level is
suggestion, meaning the author has to verify the alert depending on the context. See https://vale-at-red-hat.github.io/vale-at-red-hat/docs/end-user-guide/understanding-vale-output/ - The message defines precisely the context:
For release notes, consider using '%s' instead of '%s'