Skip to content

Commit e5c1f08

Browse files
committed
Implement basic actions
1 parent ce7a882 commit e5c1f08

19 files changed

+72
-11
lines changed

Microsoft/Adverbs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: "Consider removing '%s'."
33
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences
44
ignorecase: true
55
level: warning
6+
action:
7+
name: remove
68
tokens:
79
- abnormally
810
- absentmindedly

Microsoft/Auto.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ message: "In general, don’t hyphenate '%s'."
33
link: 'https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/auto'
44
ignorecase: true
55
level: error
6+
action:
7+
name: convert
8+
params:
9+
- simple
610
tokens:
711
- 'auto-\w+'

Microsoft/Avoid.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ link: https://docs.microsoft.com/en-us/style-guide
44
ignorecase: true
55
level: error
66
tokens:
7+
- abortion
78
- and so on
89
- and/or
910
- app developer
11+
- app(?:lication)? file
1012
- application developer
1113
- application program
1214
- applications developer
13-
- app(?:lication)? file
1415
- as well as
1516
- ask
1617
- backbone
17-
- abortion
18+
- backend

Microsoft/Backend.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ link: 'https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collectio
55
# Use 'back end' (noun) or 'back-end' (adj).
66
pos: 'back-end/NN|backend/(?:JJ|NN)|back/\w+ end/JJ|back/(?:JJ|RB) end/\w+'
77
ignorecase: true
8+
action:
9+
name: replace
810
swap:
911
back-end: "'back end'"
1012
back end: "'back-end'"
11-
backend: "'back end' or 'back-end'"

Microsoft/Contractions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: 'Use "%s" instead of "%s".'
33
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-contractions
44
level: error
55
ignorecase: true
6+
action:
7+
name: replace
68
swap:
79
are not: aren't
810
cannot: can't

Microsoft/Dashes.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ link: https://docs.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/em
44
ignorecase: true
55
nonword: true
66
level: error
7+
action:
8+
name: edit
9+
params:
10+
- remove
11+
- ' '
712
tokens:
813
- '\s[—–]\s'

Microsoft/Ellipses.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ message: "In general, don’t use an ellipsis."
33
link: https://docs.microsoft.com/en-us/style-guide/punctuation/ellipses
44
nonword: true
55
level: warning
6+
action:
7+
name: remove
68
tokens:
79
- '\.\.\.'

Microsoft/Foreign.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-a
44
ignorecase: true
55
level: error
66
nonword: true
7+
action:
8+
name: replace
79
swap:
810
'\b(?:eg|e\.g\.)[\s,]': for example
911
'\b(?:ie|i\.e\.)[\s,]': that is

Microsoft/GeneralURL.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@ extends: existence
22
message: For a general audience, use 'address' rather than 'URL'.
33
link: https://docs.microsoft.com/en-us/style-guide/urls-web-addresses
44
level: warning
5+
action:
6+
name: replace
7+
params:
8+
- URL
9+
- address
510
tokens:
611
- URL

Microsoft/HeadingPunctuation.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods
44
nonword: true
55
level: warning
66
scope: heading
7+
action:
8+
name: edit
9+
params:
10+
- remove
11+
- '.?!'
712
tokens:
813
- '[a-z0-9][.?!](?:\s|$)'

0 commit comments

Comments
 (0)