Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c97cc82

Browse files
added aditional rules
1 parent 6993046 commit c97cc82

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

‎scripts/validation/rules/rules-spelling.yml‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
format: markdown
66
errorMessage: "Megabytes should be either written as 'megabytes' or abbreviated as 'MB'"
77

8-
# MHz / GHz spacing
9-
- regex: "(?<!\\S)\\b\\d+[MmGg][hH]z\\b"
8+
# MHz / GHz / kHz spacing
9+
- regex: "(?<!\\S)\\b\\d+[MmGgk][hH]z\\b"
1010
shouldMatch: false
1111
type: warning
1212
format: markdown
@@ -19,22 +19,29 @@
1919
format: markdown
2020
errorMessage: "'Megahertz'/'Gigahertz' should be abbreviated as MHz/GHz"
2121

22+
# kHz spelling
23+
- regex: "(?<!\\S)\\b\\d+\\s?[Kk]hz\\b"
24+
shouldMatch: false
25+
type: warning
26+
format: markdown
27+
errorMessage: "'Kilohertz' should be abbreviated as kHz"
28+
2229
# Mbps / Gbps spacing
2330
- regex: "(?<!\\S)\\b\\d+[MG]bps\\b"
2431
shouldMatch: false
2532
type: warning
2633
format: markdown
2734
errorMessage: Space between unit and value required
2835

29-
# Mbps / Gbps spelling
30-
- regex: "(?<!\\S)\\b\\d+\\s?[mg]bps\\b"
36+
# Kbps/ Mbps / Gbps spelling
37+
- regex: "(?<!\\S)\\b\\d+\\s?[mgk]bps\\b"
3138
shouldMatch: false
3239
type: warning
3340
format: markdown
34-
errorMessage: "'Megabit per second' should be abbreviated Mbps, 'Gigabit per second' Gbps"
41+
errorMessage: "'Kilobit per second' should be abbreviated as Kbps, 'Megabit per second' as Mbps and 'Gigabit per second' Gbps"
3542

36-
# kB / MB spacing
37-
- regex: "(?<!\\S)\\b\\d+[mMkK][bB]\\b"
43+
# kB / KB / Mb / MB / Gb / GB spacing
44+
- regex: "(?<!\\S)\\b\\d+[gBmMkK][bB]\\b"
3845
shouldMatch: false
3946
type: warning
4047
format: markdown
@@ -47,13 +54,20 @@
4754
format: markdown
4855
errorMessage: "'Kilobyte' should be abbreviated as KB, 'Kilobit' as Kb."
4956

50-
# MB spelling
57+
# MB / Mb spelling
5158
- regex: "(?<!\\S)\\b\\d+\\s?m[bB]\\b"
5259
shouldMatch: false
5360
type: warning
5461
format: markdown
5562
errorMessage: "'Megabyte' should be abbreviated as MB, 'Megabit' as Mb."
5663

64+
# GB / Gb spelling
65+
- regex: "(?<!\\S)\\b\\d+\\s?g[bB]\\b"
66+
shouldMatch: false
67+
type: warning
68+
format: markdown
69+
errorMessage: "'Gigabyte' should be abbreviated as GB, 'Gigabit' as Gb."
70+
5771
# μm / mm spacing
5872
- regex: "(?<!\\S)\\b\\d+[μm]m\\b"
5973
shouldMatch: false

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /