Microsoft icon indicating copy to clipboard operation
Microsoft copied to clipboard

Oxford comma mistakenly suggested

Open felicitymay opened this issue 5 years ago • 3 comments

Sometimes, Vale suggests an Oxford comma when it isn't needed. For an example, see: https://gist.github.com/felicity-semmle/05e45ca77f168865819e70c47d7eee69.

I've tried rewording this to reduce the chances that Vale will flag it (previously it started: "In this case,") but that didn't work. I'm not sure that it's going to be possible to remove this false positive result, but thought I'd ask just in case. Feel free to close this if it's just not possible.

felicitymay avatar Jul 29 '19 14:07 felicitymay

Hmm -- I'm not sure.

It's possible we could employ some pattern-based heuristic, but it's not immediately clear to me what that might be. I've created a Regex101 test suite, if anyone wants to play around with the pattern.

That said, if you'd like to exclude these false positives without disabling the rule altogether, you can use an in-document comment.

jdkato avatar Aug 02 '19 04:08 jdkato

Note the Oxford comma rule in the referenced commit above only catches errors at the end of the sentence. See https://github.com/redhat-documentation/vale-at-red-hat/pull/569/files#diff-4d1c06a8fa11acc150e3e25b3ba89b4438b7650bbccd180de752d8aacfb0534fR8

https://regex101.com/r/Qav0Jg/1

aireilly avatar Jun 16 '23 14:06 aireilly

Updated in https://github.com/errata-ai/Microsoft/pull/53

aireilly avatar Jun 16 '23 14:06 aireilly