From 3b0c707b265bc8c76a345888c4eadffb80f1048a Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Thu, 17 Mar 2022 15:37:55 +0100 Subject: [PATCH 01/13] Add rules to find incorrectly formatted units --- scripts/validation/rules/rules-spelling.yml | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 8490076af3..bbbe45ef51 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -5,7 +5,56 @@ format: markdown errorMessage: Megabytes should be either written as 'megabytes' or abbreviated as 'MB' + +# MHz / GHz spacing +- regex: "(? Date: Wed, 30 Mar 2022 14:41:43 +0200 Subject: [PATCH 02/13] Add rule for Mbps / Gbps spelling --- scripts/validation/rules/rules-spelling.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index bbbe45ef51..abcab2cea7 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -27,6 +27,13 @@ format: markdown errorMessage: Space between unit and value required +# Mbps / Gbps spelling +- regex: "(? Date: Thu, 14 Apr 2022 11:38:07 +0200 Subject: [PATCH 03/13] Catch mhz ghz misspelling --- scripts/validation/rules/rules-spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index abcab2cea7..0863202a07 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -14,7 +14,7 @@ errorMessage: Space between unit and value required # MHz / GHz spelling -- regex: "(? Date: Thu, 14 Apr 2022 11:50:28 +0200 Subject: [PATCH 04/13] Fix Kb and KB rule --- scripts/validation/rules/rules-spelling.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 0863202a07..df35a8685e 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -41,12 +41,12 @@ format: markdown errorMessage: Space between unit and value required -# kB spelling -- regex: "(? Date: Thu, 14 Apr 2022 13:21:59 +0200 Subject: [PATCH 05/13] Improve error message Co-authored-by: Josefine Hansson <66409231+jhansson-ard@users.noreply.github.com> --- scripts/validation/rules/rules-spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index df35a8685e..373667c50b 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -32,7 +32,7 @@ shouldMatch: false type: warning format: markdown - errorMessage: Megabit per second shout be abbreviated mbps, Gigabit per second gbps + errorMessage: 'Megabit per second' should be abbreviated Mbps, 'Gigabit per second' Gbps # kB / MB spacing - regex: "(? Date: Thu, 14 Apr 2022 13:22:12 +0200 Subject: [PATCH 06/13] Improve error message Co-authored-by: Josefine Hansson <66409231+jhansson-ard@users.noreply.github.com> --- scripts/validation/rules/rules-spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 373667c50b..b6c1a59a97 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -18,7 +18,7 @@ shouldMatch: false type: warning format: markdown - errorMessage: Megahertz/Gigahertz should be abbreviated as MHz/GHz + errorMessage: 'Megahertz'/'Gigahertz' should be abbreviated as MHz/GHz # Mbps / Gbps spacing - regex: "(? Date: Thu, 14 Apr 2022 13:22:24 +0200 Subject: [PATCH 07/13] Improve error message Co-authored-by: Josefine Hansson <66409231+jhansson-ard@users.noreply.github.com> --- scripts/validation/rules/rules-spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index b6c1a59a97..5b975876ab 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -53,7 +53,7 @@ shouldMatch: false type: warning format: markdown - errorMessage: Megabyte should be abbreviated as MB, Megabit as Mb. + errorMessage: 'Megabyte' should be abbreviated as MB, 'Megabit' as Mb. # μm / mm spacing - regex: "(? Date: Thu, 14 Apr 2022 13:22:38 +0200 Subject: [PATCH 08/13] Improve error message Co-authored-by: Josefine Hansson <66409231+jhansson-ard@users.noreply.github.com> --- scripts/validation/rules/rules-spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 5b975876ab..3a5570f0c6 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -46,7 +46,7 @@ shouldMatch: false type: warning format: markdown - errorMessage: Kilobyte should be abbreviated as KB, Kilobit as Kb. + errorMessage: 'Kilobyte' should be abbreviated as KB, 'Kilobit' as Kb. # MB spelling - regex: "(? Date: Thu, 14 Apr 2022 15:19:06 +0200 Subject: [PATCH 09/13] Properly escape messages --- scripts/validation/rules/rules-spelling.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 3a5570f0c6..56cb4a7bec 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -3,22 +3,22 @@ shouldMatch: false type: warning format: markdown - errorMessage: Megabytes should be either written as 'megabytes' or abbreviated as - 'MB' + errorMessage: "Megabytes should be either written as 'megabytes' or abbreviated as + 'MB'" # MHz / GHz spacing -- regex: "(? Date: Thu, 14 Apr 2022 15:24:30 +0200 Subject: [PATCH 10/13] moved MB up a line --- scripts/validation/rules/rules-spelling.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 56cb4a7bec..4530ed47bd 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -3,8 +3,7 @@ shouldMatch: false type: warning format: markdown - errorMessage: "Megabytes should be either written as 'megabytes' or abbreviated as - 'MB'" + errorMessage: "Megabytes should be either written as 'megabytes' or abbreviated as 'MB'" # MHz / GHz spacing - regex: "(? Date: Thu, 14 Apr 2022 15:53:46 +0200 Subject: [PATCH 11/13] added aditional rules --- scripts/validation/rules/rules-spelling.yml | 30 +++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 4530ed47bd..f0ccd75a5c 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -5,8 +5,8 @@ format: markdown errorMessage: "Megabytes should be either written as 'megabytes' or abbreviated as 'MB'" -# MHz / GHz spacing -- regex: "(? Date: Thu, 14 Apr 2022 16:20:37 +0200 Subject: [PATCH 12/13] updated __ per second --- scripts/validation/rules/rules-spelling.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index f0ccd75a5c..3f4f431e05 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -33,12 +33,12 @@ format: markdown errorMessage: Space between unit and value required -# Kbps/ Mbps / Gbps spelling -- regex: "(? Date: Thu, 14 Apr 2022 16:24:19 +0200 Subject: [PATCH 13/13] Update scripts/validation/rules/rules-spelling.yml --- scripts/validation/rules/rules-spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/rules/rules-spelling.yml b/scripts/validation/rules/rules-spelling.yml index 3f4f431e05..ff424d5ec6 100644 --- a/scripts/validation/rules/rules-spelling.yml +++ b/scripts/validation/rules/rules-spelling.yml @@ -27,7 +27,7 @@ errorMessage: "'Kilohertz' should be abbreviated as kHz" # Mbps / Gbps spacing -- regex: "(?