redhat-documentation / vale-at-red-hat

Vale config files, styles, and docs to help individuals and teams roll out Vale
https://redhat-documentation.github.io/vale-at-red-hat/
MIT License
38 stars 58 forks source link

'by using' not detected, and is incorrectly flagged as a RH style suggestion #208

Open michelle-purcell opened 2 years ago

michelle-purcell commented 2 years ago

Describe the bug

vale-at-red-hat flags a suggestion for content that is already style guide compliant.

' by using' triggers an illegitimate vale suggestion to use 'by using'

To Reproduce Steps to reproduce the behavior:

  1. Add this word or expression: 'by using'
  2. Vale reports an illegitimate alert: error, warning, suggestion.

image

Expected behavior A clear and concise description of what you expected to happen. the linter should ignore this line because 'by' already precedes 'using'.

rohennes commented 1 year ago

I wasn't able to replicate this one @michelle-purcell , is it still an issue?

michelle-purcell commented 1 year ago

Thanks, @rohennes for testing. I just retested this one and it's OK now. I think we can put this down to an intermittent issue with the VS Code extension as I can no longer reproduce it. I'll reopen if it reoccurs. :+1:

michelle-purcell commented 1 year ago

@rohennes -I spoke too soon!

It's back in VS Code V 1.71.2 with Vale extension v0.15.2.

image

rohennes commented 1 year ago

Something odd going on there. I think it's related to the environment where by using occurs. I can replicate this by shuffling the sentences around in the testvalid.adoc: image image Moving the content around moves the error to different instances of by using. However if I change the style to add . at the beginning of the regex, it fixes the issue: `".(?<!by) using": by using|that uses` image I'll open a PR and see if others can test it.

michelle-purcell commented 1 year ago

@rohennes - Thanks Ronan :+1:

rohennes commented 1 year ago

362 - still being weird so had to rollback the change I made :-(

aireilly commented 1 year ago

Think we need a sequence rule for this one: https://vale.sh/docs/topics/styles/#sequence

rohennes commented 1 year ago

Opened a Vale issue: https://github.com/errata-ai/vale/issues/674