Skip to content

Commit 4ebf37d

Browse files
committedMar 31, 2024
feat(rule): preferred alternatives - phone
1 parent 35cc07b commit 4ebf37d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
 

‎Prim/PreferredAlternatives.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ swap:
1414
anti-virus: antivirus
1515
chat ?bot?: chatbot
1616
open-source: open source
17+
(?:cell ?phone|smart ?phone): phone|mobile phone

‎test/fixtures/PreferredAlternatives/test.md

+4
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ She used a chat bot to proofread her paper.
2727

2828
<!-- open-source -->
2929
I contributed a new feature to an open-source project.
30+
31+
<!-- phone -->
32+
Have you seen my cell phone?
33+
My smartphone is running low on battery.

‎test/snapshots/PreferredAlternatives.log

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ test.md:17:12:Prim.PreferredAlternatives:Prefer using 'antimalware' over 'anti-m
77
test.md:20:36:Prim.PreferredAlternatives:Prefer using 'antispyware' over 'anti-spyware'.
88
test.md:23:16:Prim.PreferredAlternatives:Prefer using 'antivirus' over 'anti-virus'.
99
test.md:26:12:Prim.PreferredAlternatives:Prefer using 'chatbot' over 'chat bot'.
10-
test.md:29:35:Prim.PreferredAlternatives:Prefer using 'open source' over 'open-source'.
10+
test.md:29:35:Prim.PreferredAlternatives:Prefer using 'open source' over 'open-source'.
11+
test.md:32:18:Prim.PreferredAlternatives:Prefer using 'phone' or 'mobile phone' over 'cell phone'.
12+
test.md:33:4:Prim.PreferredAlternatives:Prefer using 'phone' or 'mobile phone' over 'smartphone'.

0 commit comments

Comments
 (0)