Skip to content

Commit

Permalink
Make Negative more restrictive
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Feb 19, 2024
1 parent a6e3b7e commit eb50174
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Microsoft/Negative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ action:
- "-"
- ""
tokens:
- '-\d+(?:\.\d+)?'
- '(?<=\s)-\d+(?:\.\d+)?\b'
5 changes: 3 additions & 2 deletions features/rules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ Feature: Rules
When I test "Numbers"
Then the output should contain exactly:
"""
test.md:1:15:Microsoft.Ranges:In most cases, use 'from' or 'through' to describe a range of numbers.
test.md:4:48:Microsoft.RangeTime:Use 'to' instead of a dash in 'AM - 2:00 PM'.
test.md:3:48:Microsoft.RangeTime:Use 'to' instead of a dash in 'AM - 2:00 PM'.
test.md:7:16:Microsoft.Negative:Form a negative number with an en dash, not a hyphen.
test.md:7:33:Microsoft.Negative:Form a negative number with an en dash, not a hyphen.
"""

Scenario: Date Formatting
Expand Down
1 change: 1 addition & 0 deletions fixtures/Numbers/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ MinAlertLevel = suggestion
Microsoft.Ranges = YES
Microsoft.RangeFormat = YES
Microsoft.RangeTime = YES
Microsoft.Negative = YES
5 changes: 4 additions & 1 deletion fixtures/Numbers/test.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Look at pages 3 – 5.


Use to in a range of times. For example, 10:00 AM - 2:00 PM.

The event was on 2023-04.

The result was -4. I calculated -9.99.

0 comments on commit eb50174

Please sign in to comment.