Skip to content

Commit 064d3cf

Browse files
committed
Fix Google.Spacing
See #6. Signed-off-by: Joseph Kato <joseph@jdkato.io>
1 parent 41884f7 commit 064d3cf

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Google/Spacing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ link: 'https://developers.google.com/style/sentence-spacing'
44
level: error
55
nonword: true
66
tokens:
7-
- '[.?!] {2,}[A-Z]'
8-
- '[.?!][A-Z]'
7+
- '[a-z][.?!] {2,}[A-Z]'
8+
- '[a-z][.?!][A-Z]'

features/rules.feature

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Feature: Rules
3232
test.md:29:21:Google.WordList:Use 'preceding' instead of 'above'.
3333
test.md:31:1:Google.FirstPerson:Avoid first-person pronouns such as 'I '.
3434
test.md:31:8:Google.FirstPerson:Avoid first-person pronouns such as 'my'.
35-
test.md:31:11:Google.WordList:Use 'phone or mobile phone' instead of 'cell phone'.
35+
test.md:31:11:Google.WordList:Use 'phone' or 'mobile phone' instead of 'cell phone'.
3636
"""
3737

3838
Scenario: Use of contractions
@@ -98,6 +98,8 @@ Feature: Rules
9898
test.md:27:44:Google.Exclamation:Don't use exclamation points in text.
9999
test.md:29:1:Google.OxfordComma:Use the Oxford comma in 'Apples, pears or'.
100100
test.md:33:5:Google.Exclamation:Don't use exclamation points in text.
101+
test.md:37:21:Google.Spacing:'y. T' should have one space.
102+
test.md:39:42:Google.Exclamation:Don't use exclamation points in text.
101103
"""
102104

103105
Scenario: Foreign words

fixtures/Punctuation/.vale.ini

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ Google.LyHyphens = YES
1515
Google.Parens = YES
1616
Google.Quotes = YES
1717
Google.Semicolons = YES
18+
Google.Spacing = YES

fixtures/Punctuation/test.md

+6
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ Apples, pears or bananas
3131
![An image](../my-image.png)
3232

3333
Hello!
34+
35+
this is a sentence. so is this one.
36+
37+
This sentence is okay. This one is not.
38+
39+
The latest version of .NET Core is awesome!

0 commit comments

Comments
 (0)