errata-ai / Microsoft

A Vale-compatible implementation of the Microsoft Writing Style Guide.
https://github.com/errata-ai/vale
MIT License
85 stars 46 forks source link

Microsoft.Units error on Minutes #17

Closed markekraus closed 5 years ago

markekraus commented 5 years ago

Per https://docs.microsoft.com/en-us/style-guide/numbers

Spell out zero through nine and use numerals for 10 or greater for days, weeks, and other units of time. Examples seven years 28 days 12 hrs

Which means 0-9 minutes should be words and not numerals.

echo 'It takes three minutes to cook ramen noodles.' | vale --no-wrap -ext='.md'

Output

 stdin.md
 1:10  error  Use a numeral plus the units.  Microsoft.Units 

✖ 1 error, 0 warnings and 0 suggestions in stdin.
jdkato commented 5 years ago

Thanks for the report.

It looks like 'minutes' should be removed from the rule and the link should be changed to Units of measure:

Use numerals for measurements of distance, temperature, volume, size, weight, pixels, points, and so on—even if the number is less than 10. Add a zero before the decimal point for decimal fractions less than one, unless the customer is asked to enter the value.