vale-at-red-hat icon indicating copy to clipboard operation
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

Open michaelryanpeter opened this issue 4 years ago • 3 comments

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.

michaelryanpeter avatar Jul 16 '21 17:07 michaelryanpeter

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.

themr0c avatar Oct 21 '21 09:10 themr0c

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.

themr0c avatar Oct 21 '21 09:10 themr0c

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'

themr0c avatar Dec 03 '21 14:12 themr0c