Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions styles/Canonical/005-Industry-product-names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends: substitution
message: "Use '%s' instead of '%s'"
link: https://docs.ubuntu.com/styleguide/en/#other-commonly-referenced-products/projects
ignorecase: true
level: error
level: warning
scope:
- sentence
- list
Expand All @@ -20,7 +20,8 @@ swap:
Mysql : 'MySQL'
docker : 'Docker'
KubeFlow : 'Kubeflow'
Google cloud : 'Google Cloud Platform'
Google cloud platform : 'Google Cloud Platform'
Google cloud(?! platform) : 'Google Cloud Platform'
Influxdb : 'InfluxDB'
mattermost : 'Mattermost'

2 changes: 1 addition & 1 deletion styles/Canonical/007-Headings-sentence-case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ extends: capitalization
# Fork of Google style guide rule
message: "'%s' should use sentence-style capitalisation."
link: "https://docs.ubuntu.com/styleguide/en/#sentence-case"
level: error
level: warning
scope: heading
match: $sentence
6 changes: 3 additions & 3 deletions styles/Canonical/008-Headings-no-period.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ extends: existence
message: "Don't use end punctuation in headings."
link: https://docs.ubuntu.com/styleguide/en#headings
nonword: true
level: warning
level: suggestion
scope: heading
action:
name: edit
params:
- remove
- '.'
- '[.!?,]'
tokens:
- '[a-z0-9][.](?:\s|$)'
- '[.!?,](?:\s|$)'
5 changes: 2 additions & 3 deletions styles/Canonical/010-Punctuation-double-spaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ message: "'%s' should have one space."
link:
level: warning
scope:
- sentence
- list
- raw
nonword: true
tokens:
- '[a-z][.?!] {2,}[A-Z]'
- '[.?!] {2,}$'

# Reasoning:
# We appreciate that you may have been taught to put two spaces after a
Expand Down
2 changes: 1 addition & 1 deletion styles/Canonical/013-Spell-out-numbers-below-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ scope:
- sentence
- table.header
- table.cell
level: warning
level: suggestion
swap:
(?<![\-\.\,:\/*-+#]|Day )0(?![\-\.\,:\/*-+]): zero
(?<![\-\.\,:\/*-+#]|Day )1(?![\-\.\,:\/*-+])(?! Jan(?!uary)?| Feb(?!ruary)?| Mar(?!ch)?| Apr(?!il)?| May| Jun(?:e)?| Jul(?:y)?| Aug(?:ust)?| Sep(?:tember)?| Oct(?:ober)?| Nov(?:ember)?| Dec(?:ember)?): one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ scope:
- table.header
- table.cell
ignorecase: true
level: warning
level: suggestion
tokens:
- ten
- eleven
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ scope:
- table.header
- table.cell
ignorecase: true
level: warning
level: suggestion
tokens:
- ([\d]{5,})
10 changes: 5 additions & 5 deletions styles/Canonical/016-No-inline-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ extends: existence
message: "Avoid inline comments in code blocks."
scope: raw
nonword: true
level: warning
level: suggestion
tokens:
- ^```[^\n\{\}]*\n(([^\n`][^\n#]*\n|\n))*([^\n#]+ +#.*\n)+([^\n`]*\n)*```
- ^```[^\n\{\}]*\n([^\n`][^\n]*\n|\n)*([^\n\/][^\n\/]+ +\/\/.*\n)+([^\n`]*\n)*```
- '\.\. (code-block|code|sourcecode)::.*\n( {3,}:\w+:\n)*(\s+.* +#.*\n)+'
- '\.\. (code-block|code|sourcecode)::.*\n( {3,}:\w+:\n)*(\s+.* +\/\/.*\n)+'
- ^```[^\n\{\}]*\n(([^\n`][^\n#]*\n|\n))*([^\n#]+ +#.*\n)+([^\n`]*\n)*```$
- ^```[^\n\{\}]*\n([^\n`][^\n]*\n|\n)*([^\n\/][^\n\/]+ +\/\/.*\n)+([^\n`]*\n)*```$
- '\.\. (?:code-block|code|sourcecode):: ?.*\n(?: {3,}:\w+:\n)*(?:\n| {3,}[^\n#]+\n)*( {3,}[^\n]*#[^\n]*\n)(?:\n| {3,}[^\n#]+\n)*'
- '\.\. (?:code-block|code|sourcecode):: ?.*\n(?: {3,}:\w+:\n)*(?:\n| {3,}[^\n\/\/]+\n)*( {3,}[^\n]*\/\/[^\n]*\n)(?:\n| {3,}[^\n\/\/]+\n)*'
2 changes: 1 addition & 1 deletion styles/Canonical/019-no-google-drive-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extends: existence
message: "Don't use images from Google Drive. Use the asset manager."
scope: raw
nonword: true
level: warning
level: error
tokens:
- '!\[[^\n]*\]\([\w\.:\/\-=\? \"]+(drive.google|drive.usercontent.google)[\w\.:\/\-=\? \"]+\)'
- '<[\w\.:\/-=? "]+(drive.google|drive.usercontent.google)[\w\.:\/\-=? "]+>'
Expand Down
19 changes: 7 additions & 12 deletions styles/Canonical/025a-latinisms-with-english-equivalents.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# 025 - Latinisms that have English equivalents

extends: substitution
message: "Instead of '%[2]s', use %[1]s."
link: https://docs.ubuntu.com/styleguide/en#latin-words-and-phrases
level: error
scope:
- sentence
- list
- heading
- table.header
- table.cell
level: suggestion
nonword: true
ignorecase: true
swap: # Multiple word terms need to use "this\\sword" to match properly
"a\\spriori": "'self-evident', 'presupposed', 'presumed', or 'assumed'"
swap:
\ba\spriori\b: "'self-evident', 'presupposed', 'presumed', or 'assumed'"
\bad\shoc\b: "'unscheduled', 'unexpected', 'improvised', 'temporary', or 'bespoke'"
\bad\sinfinitum\b: "'and so on', 'to the fullest extent', or 'recursively'"
\bcf\.?\b: "'refer to'"
Expand All @@ -24,7 +21,6 @@ swap: # Multiple word terms need to use "this\\sword" to match properly
\b(?:id\sest\b|ie\b|i\.e\.(?!\w)|i\.e(?![\.\w])): "'that is' or 'in other words'"
\bin\ssitu\b: "'in place'"
\b(?:nota\sbene\b|nb\b|n\.b\.(?!\w)|n\.b(?![\.\w])): "'note', 'notice', 'observe', 'pay attention to', or 'keep your eye on'"
\bper\b: "'each', 'every', or 'according to'"
\bper\sdiem\b: "'every day'"
\bper\scapita\b: "'every/each person'"
\bper\sse\b: "'necessarily' or 'intrinsically'"
Expand All @@ -34,6 +30,5 @@ swap: # Multiple word terms need to use "this\\sword" to match properly
\bstatus\squo\b: "'state' or 'state of things'"
\bverbatim\b: "'exact words', 'exactly'"
\b(?:versus|vs\.(?!\w)|vs(?![\.\w])): "'compared to/with' or 'opposed to'"
\bvia\b: "'through', 'with', or 'using'"
\bvice\sversa\b: "'the reverse' or 'the other way around'"
\b(?:viz\.(?!\w)|viz(?![\w\.])): "'specifically' or 'namely'"
\b(viz\.(?!\w)|viz(?![\w\.])): "'specifically' or 'namely'"
4 changes: 2 additions & 2 deletions styles/Canonical/025b-latinisms-to-reconsider.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 025 - Latinisms that we strongly advise against

extends: existence
message: Instead of 'a.m.', 'AM', 'p.m.', and 'PM', use 24-hour time.
message: Use 24-hour time instead of 'AM', or 'PM', .
link: https://docs.ubuntu.com/styleguide/en#latin-words-and-phrases
level: suggestion
scope:
Expand All @@ -12,4 +12,4 @@ scope:
- table.cell
nonword: true
tokens:
- '\b[1|2]?:?\d?\d\s?(?:[AaPp]\.?[Mm]\.?)(?!\w+\b|\.)'
- '\b[1|2]?\d?:?\d?\d\s?(?:[AaPp]\.?[Mm]\.?)\b'
2 changes: 1 addition & 1 deletion styles/Canonical/025c-latinisms-to-avoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extends: existence
message: "Don't use academic Latin terms like 'a posteriori', 'et al', and 'stet'."
link: https://docs.ubuntu.com/styleguide/en#latin-words-and-phrases
level: warning
level: suggestion
scope:
- sentence
- list
Expand Down
Loading