-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement Vale linter with Alex * Missed a file from Alex's styles * Add Google style guide * undo changes to doc * Add a file to demonstrate Reviewdog * Better name for GH action * Rename the GH action * Only consider base language Co-authored-by: Andrés Pereira de Lucena <[email protected]> * Reverse rules on contractions --------- Co-authored-by: Andrés Pereira de Lucena <[email protected]>
- Loading branch information
1 parent
adf8c8d
commit 1405ff2
Showing
51 changed files
with
3,118 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: existence | ||
message: "Use 'AM' or 'PM' (preceded by a space)." | ||
link: 'https://developers.google.com/style/word-list' | ||
level: error | ||
nonword: true | ||
tokens: | ||
- '\d{1,2}[AP]M' | ||
- '\d{1,2} ?[ap]m' | ||
- '\d{1,2} ?[aApP]\.[mM]\.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
extends: conditional | ||
message: "Spell out '%s', if it's unfamiliar to the audience." | ||
link: 'https://developers.google.com/style/abbreviations' | ||
level: suggestion | ||
ignorecase: false | ||
# Ensures that the existence of 'first' implies the existence of 'second'. | ||
first: '\b([A-Z]{3,5})\b' | ||
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' | ||
# ... with the exception of these: | ||
exceptions: | ||
- API | ||
- ASP | ||
- CLI | ||
- CPU | ||
- CSS | ||
- CSV | ||
- DEBUG | ||
- DOM | ||
- DPI | ||
- FAQ | ||
- GCC | ||
- GDB | ||
- GET | ||
- GPU | ||
- GTK | ||
- GUI | ||
- HTML | ||
- HTTP | ||
- HTTPS | ||
- IDE | ||
- JAR | ||
- JSON | ||
- JSX | ||
- LESS | ||
- LLDB | ||
- NET | ||
- NOTE | ||
- NVDA | ||
- OSS | ||
- PATH | ||
- PHP | ||
- POST | ||
- RAM | ||
- REPL | ||
- RSA | ||
- SCM | ||
- SCSS | ||
- SDK | ||
- SQL | ||
- SSH | ||
- SSL | ||
- SVG | ||
- TBD | ||
- TCP | ||
- TODO | ||
- URI | ||
- URL | ||
- USB | ||
- UTF | ||
- XML | ||
- XSS | ||
- YAML | ||
- ZIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends: existence | ||
message: "'%s' should be in lowercase." | ||
link: 'https://developers.google.com/style/colons' | ||
nonword: true | ||
level: warning | ||
scope: sentence | ||
tokens: | ||
- ':\s[A-Z]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
extends: substitution | ||
message: "Use '%s' instead of '%s'." | ||
link: 'https://developers.google.com/style/contractions' | ||
level: suggestion | ||
ignorecase: true | ||
action: | ||
name: replace | ||
swap: | ||
# Decidim reverses this rule, and do not use contractions, so this is tweaked accordingly. | ||
aren't: are not | ||
can't: cannot | ||
couldn't: could not | ||
didn't: did not | ||
don't: do not | ||
doesn't: does not | ||
hasn't: has not | ||
haven't: have not | ||
how's: how is | ||
isn't: is not | ||
it's: it is | ||
shouldn't: should not | ||
that's: that is | ||
they're: they are | ||
wasn't: was not | ||
we're: we are | ||
we've: we have | ||
weren't: were not | ||
what's: what is | ||
when's: when is | ||
where's: where is | ||
won't: will not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: existence | ||
message: "Use 'July 31, 2016' format, not '%s'." | ||
link: 'https://developers.google.com/style/dates-times' | ||
ignorecase: true | ||
level: error | ||
nonword: true | ||
tokens: | ||
- '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' | ||
- '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: existence | ||
message: "In general, don't use an ellipsis." | ||
link: 'https://developers.google.com/style/ellipses' | ||
nonword: true | ||
level: warning | ||
action: | ||
name: remove | ||
tokens: | ||
- '\.\.\.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
extends: existence | ||
message: "Don't put a space before or after a dash." | ||
link: 'https://developers.google.com/style/dashes' | ||
nonword: true | ||
level: error | ||
action: | ||
name: edit | ||
params: | ||
- remove | ||
- ' ' | ||
tokens: | ||
- '\s[—–]\s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
extends: existence | ||
message: "Use an em dash ('—') instead of '–'." | ||
link: 'https://developers.google.com/style/dashes' | ||
nonword: true | ||
level: error | ||
action: | ||
name: edit | ||
params: | ||
- replace | ||
- '-' | ||
- '—' | ||
tokens: | ||
- '–' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: existence | ||
message: "Don't use exclamation points in text." | ||
link: 'https://developers.google.com/style/exclamation-points' | ||
nonword: true | ||
level: error | ||
action: | ||
name: remove | ||
tokens: | ||
- '\w+!(?:\s|$)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
extends: existence | ||
message: "Avoid first-person pronouns such as '%s'." | ||
link: 'https://developers.google.com/style/pronouns#personal-pronouns' | ||
ignorecase: true | ||
level: warning | ||
nonword: true | ||
tokens: | ||
- (?:^|\s)I\s | ||
- (?:^|\s)I,\s | ||
- \bI'm\b | ||
- \bme\b | ||
- \bmy\b | ||
- \bmine\b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: existence | ||
message: "Don't use '%s' as a gender-neutral pronoun." | ||
link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns' | ||
level: error | ||
ignorecase: true | ||
tokens: | ||
- he/she | ||
- s/he | ||
- \(s\)he |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
extends: substitution | ||
message: "Consider using '%s' instead of '%s'." | ||
link: 'https://developers.google.com/style/inclusive-documentation' | ||
ignorecase: true | ||
level: error | ||
action: | ||
name: replace | ||
swap: | ||
(?:alumna|alumnus): graduate | ||
(?:alumnae|alumni): graduates | ||
air(?:m[ae]n|wom[ae]n): pilot(s) | ||
anchor(?:m[ae]n|wom[ae]n): anchor(s) | ||
authoress: author | ||
camera(?:m[ae]n|wom[ae]n): camera operator(s) | ||
chair(?:m[ae]n|wom[ae]n): chair(s) | ||
congress(?:m[ae]n|wom[ae]n): member(s) of congress | ||
door(?:m[ae]|wom[ae]n): concierge(s) | ||
draft(?:m[ae]n|wom[ae]n): drafter(s) | ||
fire(?:m[ae]n|wom[ae]n): firefighter(s) | ||
fisher(?:m[ae]n|wom[ae]n): fisher(s) | ||
fresh(?:m[ae]n|wom[ae]n): first-year student(s) | ||
garbage(?:m[ae]n|wom[ae]n): waste collector(s) | ||
lady lawyer: lawyer | ||
ladylike: courteous | ||
landlord: building manager | ||
mail(?:m[ae]n|wom[ae]n): mail carriers | ||
man and wife: husband and wife | ||
man enough: strong enough | ||
mankind: human kind | ||
manmade: manufactured | ||
manpower: personnel | ||
men and girls: men and women | ||
middle(?:m[ae]n|wom[ae]n): intermediary | ||
news(?:m[ae]n|wom[ae]n): journalist(s) | ||
ombuds(?:man|woman): ombuds | ||
oneupmanship: upstaging | ||
poetess: poet | ||
police(?:m[ae]n|wom[ae]n): police officer(s) | ||
repair(?:m[ae]n|wom[ae]n): technician(s) | ||
sales(?:m[ae]n|wom[ae]n): salesperson or sales people | ||
service(?:m[ae]n|wom[ae]n): soldier(s) | ||
steward(?:ess)?: flight attendant | ||
tribes(?:m[ae]n|wom[ae]n): tribe member(s) | ||
waitress: waiter | ||
woman doctor: doctor | ||
woman scientist[s]?: scientist(s) | ||
work(?:m[ae]n|wom[ae]n): worker(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
extends: existence | ||
message: "Don't put a period at the end of a heading." | ||
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' | ||
nonword: true | ||
level: warning | ||
scope: heading | ||
action: | ||
name: edit | ||
params: | ||
- remove | ||
- '.' | ||
tokens: | ||
- '[a-z0-9][.]\s*$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
extends: capitalization | ||
message: "'%s' should use sentence-style capitalization." | ||
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' | ||
level: warning | ||
scope: heading | ||
match: $sentence | ||
indicators: | ||
- ':' | ||
exceptions: | ||
- Azure | ||
- CLI | ||
- Code | ||
- Cosmos | ||
- Docker | ||
- Emmet | ||
- gRPC | ||
- I | ||
- Kubernetes | ||
- Linux | ||
- macOS | ||
- Marketplace | ||
- MongoDB | ||
- REPL | ||
- Studio | ||
- TypeScript | ||
- URLs | ||
- Visual | ||
- VS | ||
- Windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extends: substitution | ||
message: "Use '%s' instead of '%s'." | ||
link: 'https://developers.google.com/style/abbreviations' | ||
ignorecase: true | ||
level: error | ||
nonword: true | ||
action: | ||
name: replace | ||
swap: | ||
'\b(?:eg|e\.g\.)(?=[\s,;])': for example | ||
'\b(?:ie|i\.e\.)(?=[\s,;])': that is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends: existence | ||
message: "'%s' doesn't need a hyphen." | ||
link: 'https://developers.google.com/style/hyphens' | ||
level: error | ||
ignorecase: false | ||
nonword: true | ||
action: | ||
name: edit | ||
params: | ||
- replace | ||
- '-' | ||
- ' ' | ||
tokens: | ||
- '\s[^\s-]+ly-' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
extends: existence | ||
message: "Don't use plurals in parentheses such as in '%s'." | ||
link: 'https://developers.google.com/style/plurals-parentheses' | ||
level: error | ||
nonword: true | ||
action: | ||
name: edit | ||
params: | ||
- remove | ||
- '(s)' | ||
tokens: | ||
- '\b\w+\(s\)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends: existence | ||
message: "Spell out all ordinal numbers ('%s') in text." | ||
link: 'https://developers.google.com/style/numbers' | ||
level: error | ||
nonword: true | ||
tokens: | ||
- \d+(?:st|nd|rd|th) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends: existence | ||
message: "Use the Oxford comma in '%s'." | ||
link: 'https://developers.google.com/style/commas' | ||
scope: sentence | ||
level: warning | ||
tokens: | ||
- '(?:[^,]+,){1,}\s\w+\s(?:and|or)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends: existence | ||
message: "Use parentheses judiciously." | ||
link: 'https://developers.google.com/style/parentheses' | ||
nonword: true | ||
level: suggestion | ||
tokens: | ||
- '\(.+\)' |
Oops, something went wrong.