Skip to content

Avoid false positive for '1st'

Sarah German requested to merge sarahgerman-vale-unit-fix into master

What does this MR do and why?

The vale rule that asks for a space between 1 and s (to mean "1 second") is showing a false positive in this file. The text reads 1st April.

This MR updates the regex to make an exception for 1s if there is a "t" after the "s".

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Check out this branch
  2. Run Vale against a file that previously had false positives: vale --config .vale.ini doc/ci/pipelines/cicd_minutes.md
  3. You should not get a gitlab.Units warning.
  4. Edit cicd_minutes.md and add something that should warn (e.g, 1s)
  5. Run the check again: vale --config .vale.ini doc/ci/pipelines/cicd_minutes.md
  6. This time, you should get a gitlab.Units warning.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah German

Merge request reports