Skip to content

Commit a8f3a27

Browse files
committed
improve vale rules for 'actors' and 'actor'
1 parent c8f65a7 commit a8f3a27

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/styles/Apify/Capitalization.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ message: "The word '%s' should always be capitalized."
33
ignorecase: false
44
level: error
55
tokens:
6-
- '(?<!\W)\bactor\b'
7-
- '(?<!\W)\bactors\b'
6+
# Before the word there should be no: /, -, #, word character
7+
# (avoids anchors, URLs, identifiers, and words like 'factors')
8+
#
9+
# After the word there should be no: /, } (avoids paths or URLs)
10+
# Also no . followed by a word character (avoids 'actors.md')
11+
- '(?<![\/\-#\w])actors(?![\/\}])(?!\.\w)'
12+
13+
# Before the word there should be no: /, -, #, ., word character
14+
# (avoids anchors, URLs, identifiers, code, and words like 'factors')
15+
#
16+
# After the word there should be no: /, }, -, word character (avoids paths or URLs)
17+
# Also no " =" (avoids code like "actor = ...")
18+
# Also no . followed by a word character (avoids 'actor.md' or 'actor.update()')
19+
- '(?<![\/\-#\.\w`])actor(?![\/\}\-\w])(?! =)(?!\.\w)'
820
nonword: false

0 commit comments

Comments
 (0)