Skip to content

Commit cd8d965

Browse files
committed
feat(rule): preferred alternative for 0-day
1 parent 20a2ffa commit cd8d965

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

Diff for: compris/PreferredAlternatives.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: substitution
2+
message: "Prefer '%s' over '%s'."
3+
level: warning
4+
ignorecase: true
5+
action:
6+
name: replace
7+
swap:
8+
0-day: zero-day

Diff for: fixtures/PreferredAlternatives/.vale.ini

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
StylesPath = ../../
2+
3+
MinAlertLevel = suggestion
4+
5+
[*.md]
6+
compris.PreferredAlternatives = YES

Diff for: fixtures/PreferredAlternatives/test.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Preferred Alternatives
2+
3+
<!-- 0-day -->
4+
A hacker forum was found selling a 0-day exploit for a popular web browser.

Diff for: test/expectations/PreferredAlternatives.log

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test.md:4:36:compris.PreferredAlternatives:Prefer 'Zero-day' over '0-day'.

0 commit comments

Comments
 (0)