forked from silverstripe/developer-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MNT Add linting of language stucture/style
- Loading branch information
1 parent
49ecac9
commit c9bdd34
Showing
30 changed files
with
456 additions
and
2 deletions.
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,11 @@ | ||
StylesPath = .vale/styles | ||
|
||
Vocab = Silverstripe | ||
|
||
MinAlertLevel = suggestion | ||
|
||
; Don't check inside heading anchors, i.e. inside {#my-anchor} | ||
WordTemplate = "[^#]\b(?:%s)\b[^}]" | ||
|
||
[*.md] | ||
BasedOnStyles = Silverstripe-cms, openly #Vale |
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,17 @@ | ||
--- | ||
extends: existence | ||
message: Using '%s' may come across as condescending. | ||
link: https://css-tricks.com/words-avoid-educational-writing/ | ||
level: error | ||
ignorecase: true | ||
tokens: | ||
- obvious | ||
- obviously | ||
- simple | ||
- simply | ||
- easy | ||
- easily | ||
- of course | ||
- clearly | ||
- everyone knows | ||
- naturally |
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,51 @@ | ||
--- | ||
extends: substitution | ||
message: "Consider using '%s' instead of '%s'." | ||
ignorecase: true | ||
level: warning | ||
action: | ||
name: replace | ||
swap: | ||
man: person | ||
men: people | ||
boy: person | ||
boys: people | ||
woman: person | ||
women: people | ||
girl: person | ||
girls: people | ||
he: they | ||
him: them | ||
his: their | ||
she: they | ||
her: them | ||
hers: their | ||
air(?:m[ae]n|wom[ae]n): pilot(s) | ||
anchor(?:m[ae]n|wom[ae]n): anchor(s) | ||
camera(?:m[ae]n|wom[ae]n): camera operator(s) | ||
chair(?:m[ae]n|wom[ae]n): chair(s) | ||
door(?:m[ae]|wom[ae]n): concierge(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) | ||
ladylike: courteous | ||
land(?:lady|lord): building manager | ||
mail(?:m[ae]n|wom[ae]n): mail carriers | ||
man and wife: spouses | ||
husband: spouse | ||
wife: spouse | ||
mankind: humankind | ||
manmade: manufactured|artificial|synthetic|machine-made|constructed | ||
manned: staffed|crewed|piloted | ||
manpower: human resources|workforce|personnel|staff|labor|personnel|labor force|staffing|combat | ||
personnel | ||
middle(?:m[ae]n|wom[ae]n): intermediary | ||
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 | ||
steward(?:ess)?: flight attendant | ||
unmanned: robotic|automated | ||
workmanship: quality construction|expertise | ||
waitress: waiter | ||
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,8 @@ | ||
extends: existence | ||
message: "'%s' is hedging." | ||
ignorecase: true | ||
level: error | ||
tokens: | ||
- I would argue that | ||
- ', so to speak' | ||
- to a certain degree |
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,18 @@ | ||
--- | ||
extends: substitution | ||
message: Consider using '%s' instead of '%s'. | ||
ignorecase: true | ||
level: warning | ||
action: | ||
name: replace | ||
swap: | ||
master copy: pass key|original | ||
master key: pass key|original | ||
master plan: grand scheme|guiding principles | ||
master the art: become skilled | ||
master: main|primary|hub|reference | ||
masters: main|primaries|hubs|references | ||
masterful: skilled|authoritative|commanding | ||
mastermind: genius|creator|instigator|oversee|launch|originate | ||
masterpiece: "work of genius|chef d\u2019oeuvre" | ||
masterplan: vision|comprehensive plan |
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 @@ | ||
--- | ||
# Error: gitlab.Repetition | ||
# | ||
# Checks for duplicate words, like `the the` or `and and`. | ||
# | ||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Repetition.yml | ||
extends: repetition | ||
message: '"%s" is repeated.' | ||
level: error | ||
alpha: true | ||
tokens: | ||
- '[^\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,31 @@ | ||
extends: substitution | ||
message: Use '%s' instead of '%s'. | ||
level: error | ||
ignorecase: true | ||
swap: | ||
"(?:LetsEncrypt|Let's Encrypt)": Let's Encrypt | ||
"Mac ?OS ?X": macOS | ||
"mongoDB": MongoDB | ||
"node[.]?js": Node.js | ||
"mysql": MySQL | ||
"Post?gr?e(?:SQL)": PostgreSQL | ||
"java[ -]?scripts?": JavaScript | ||
centOS: CentOS | ||
cloudflare: Cloudflare | ||
debian: Debian | ||
homebrew: Homebrew | ||
kubernetes: Kubernetes | ||
markdown: Markdown | ||
macOS: macOS | ||
npm: NPM | ||
ubuntu: Ubuntu | ||
yaml: YAML (or yml for syntax highlighting code blocks) | ||
url: URL | ||
urls: URLs | ||
uri: URI | ||
uris: URIs | ||
gpu: GPU | ||
typescript: TypeScript | ||
'getters?': getter method(s) | ||
'setters?': setter method(s) | ||
'dataobjects?': 'models(s)|record(s) (or wrap it in backticks if referencing `DataObject` specifically)' |
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,6 @@ | ||
extends: existence | ||
message: "'%s' left in text." | ||
ignorecase: true | ||
level: error | ||
tokens: | ||
- todo |
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,15 @@ | ||
extends: substitution | ||
message: Use '%s' instead of '%s'. | ||
level: error | ||
nonword: true | ||
ignorecase: true | ||
swap: | ||
'…': '...' | ||
'\(c\)': © | ||
'\(tm\)': ™ | ||
'\(r\)': ® | ||
'×': 'x' | ||
'[“”„]': '"' | ||
'[‘’‚]': "'" | ||
'[‹«]': "<" | ||
'[›»]': ">" |
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,26 @@ | ||
extends: substitution | ||
message: Use '%s' instead of '%s'. | ||
level: error | ||
ignorecase: true | ||
swap: | ||
apologize: apologise | ||
armor: armour | ||
behavior: behaviour | ||
centralize: centralise | ||
color: colour | ||
customize: customise | ||
decentralize: decentralise | ||
defence: defense | ||
emphasize: emphasise | ||
finalize: finalise | ||
flavor: flavour | ||
labeled: labelled | ||
labor: labour | ||
localize: localise | ||
offense: offence | ||
organize: organise | ||
organized: organised | ||
organizing: organising | ||
recognize: recognise | ||
theater: theatre | ||
unauthorized: unauthorised |
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,43 @@ | ||
Silverstripe | ||
CMS | ||
third-party | ||
GraphQL | ||
middleware | ||
namespace | ||
namespaced | ||
Silverstripe | ||
CMS | ||
third-party | ||
GraphQL | ||
dev | ||
hardcode | ||
namespace | ||
autoload | ||
config | ||
PHPDoc | ||
Packagist | ||
phar | ||
upgrader | ||
webroot | ||
webserver | ||
webservers | ||
validator | ||
transifex | ||
subfolder | ||
preconfigured | ||
misconfigured | ||
Nginx | ||
Bitnami | ||
sendmail | ||
Lighttpd | ||
performant | ||
changelog | ||
hostname | ||
previewable | ||
shortcode | ||
unversioned | ||
changeset | ||
unpublish | ||
unpublished | ||
unpublishing | ||
scaffolded |
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: substitution | ||
message: Consider using '%s' instead of '%s' | ||
ignorecase: true | ||
level: error | ||
swap: | ||
(?:click|press): "'select'" |
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,23 @@ | ||
--- | ||
extends: existence | ||
ignorecase: true | ||
level: warning | ||
message: "Don't attribute human qualities to software or hardware." | ||
raw: | ||
- \b(?:PC|computer|object|machine|software|hardware|data|database|engine|message|command|interface)\b\s* | ||
tokens: | ||
- sees | ||
- tells | ||
- thinks | ||
- wants | ||
- cares | ||
- realizes | ||
- assumes | ||
- knows | ||
- remembers | ||
- decides | ||
- knows | ||
- refuses | ||
- demands | ||
- understands | ||
- behaves |
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: Do not use '%s' at the end of headings | ||
link: https://github.com/Openly/docs/blob/master/STYLE.md#capitalization-and-punctuation | ||
scope: heading | ||
level: warning | ||
raw: | ||
- '(?:\:|\.)$' |
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: existence | ||
message: "Consider removing '%s'" | ||
ignorecase: true | ||
level: warning | ||
tokens: | ||
- appear to be | ||
- arguably | ||
- as far as I know | ||
- could | ||
- from my point of view | ||
- hopefully | ||
- I believe | ||
- I doubt | ||
- I think | ||
- in general | ||
- In my opinion | ||
- likely | ||
- might | ||
- more or less | ||
- perhaps | ||
- possibly | ||
- presumably | ||
- probably | ||
- seem(s)? | ||
- somewhat | ||
- to my knowledge | ||
- unlikely | ||
- usually |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 TestTheDocs - Incubator | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
--- | ||
message: "Don't use '%s' as the content of a link." | ||
extends: existence | ||
ignorecase: true | ||
scope: raw | ||
level: error | ||
tokens: | ||
- '\[here\]\(' |
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: 'Punctuation should be inside the quotes.' | ||
level: error | ||
nonword: true | ||
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,8 @@ | ||
--- | ||
message: "Write short sentences (less than 25 words)." | ||
extends: occurrence | ||
link: http://styleguide.mailchimp.com/writing-for-accessibility/#header-3-use-plain-language | ||
scope: sentence | ||
level: warning | ||
max: 25 | ||
token: \b(\w+)\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,15 @@ | ||
--- | ||
extends: spelling | ||
message: "Did you really mean '%s'?" | ||
level: error | ||
code: false | ||
ignore: | ||
- openly/tech-terms/security.txt | ||
- openly/tech-terms/blockchain.txt | ||
- openly/tech-terms/devops.txt | ||
- openly/tech-terms/general.txt | ||
- openly/tech-terms/techwriting.txt | ||
- openly/tech-terms/mobile.txt | ||
- openly/tech-terms/linux.txt | ||
- openly/tech-terms/monitoring.txt | ||
- openly/tech-terms/apis.txt |
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,2 @@ | ||
api | ||
grpc |
Oops, something went wrong.