-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Vale updates #21631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Vale updates #21631
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,57 @@ | ||
| --- | ||
| # Error: cloudflare.Contractions | ||
| # | ||
| # Do not use contractions. | ||
| # | ||
| # For a list of all options, see https://vale.sh/docs/topics/styles/ | ||
|
|
||
| extends: substitution | ||
| message: "Use '%s' instead of '%s'." | ||
| link: https://developers.cloudflare.com/style-guide/grammar/parts-of-speech/contractions/ | ||
| level: error | ||
| ignorecase: true | ||
| action: | ||
| name: replace | ||
| swap: | ||
| are not: aren't | ||
| cannot: can't | ||
| could not: couldn't | ||
| did not: didn't | ||
| do not: don't | ||
| does not: doesn't | ||
| has not: hasn't | ||
| have not: haven't | ||
| how is: how's | ||
| is not: isn't | ||
|
|
||
| 'it is(?!\.)': it's | ||
| 'it''s(?=\.)': it is | ||
|
|
||
| should not: shouldn't | ||
|
|
||
| "that is(?![.,])": that's | ||
| 'that''s(?=\.)': that is | ||
|
|
||
| 'they are(?!\.)': they're | ||
| 'they''re(?=\.)': they are | ||
|
|
||
| was not: wasn't | ||
|
|
||
| 'we are(?!\.)': we're | ||
| 'we''re(?=\.)': we are | ||
|
|
||
| 'we have(?!\.)': we've | ||
| 'we''ve(?=\.)': we have | ||
|
|
||
| were not: weren't | ||
|
|
||
| 'what is(?!\.)': what's | ||
| 'what''s(?=\.)': what is | ||
|
|
||
| 'when is(?!\.)': when's | ||
| 'when''s(?=\.)': when is | ||
|
|
||
| 'where is(?!\.)': where's | ||
| 'where''s(?=\.)': where is | ||
|
|
||
| will not: won't |
This file contains hidden or 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 @@ | ||
| --- | ||
| name: gitlab_base.EOLWhitespace | ||
| description: | | ||
| Checks that there is no useless whitespace at the end of lines. | ||
| extends: existence | ||
| message: "Remove whitespace characters from the end of the line." | ||
| link: https://docs.gitlab.com/development/documentation/styleguide/ | ||
| vocab: false | ||
| level: warning | ||
| scope: raw | ||
| raw: | ||
| - ' +\n' |
This file contains hidden or 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 exclamation points in text." | ||
| link: "https://developers.google.com/style/exclamation-points" | ||
| nonword: true | ||
| level: error | ||
| action: | ||
| name: edit | ||
| params: | ||
| - trim_right | ||
| - "!" | ||
| tokens: | ||
| - '\w+!(?:\s|$)' |
This file contains hidden or 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 @@ | ||
| --- | ||
| name: gitlab_base.HeadingLink | ||
| description: | | ||
| Do not include links in a heading. | ||
| Headings already have self-referencing anchor links, | ||
| and they're used for generating the table of contents. | ||
| Adding a link will break the anchor linking behavior. | ||
| extends: existence | ||
| message: "Do not use links in headings." | ||
| vocab: false | ||
| level: error | ||
| ignorecase: true | ||
| nonword: true | ||
| link: https://docs.gitlab.com/development/documentation/styleguide/#links | ||
| scope: raw | ||
| tokens: | ||
| - ^#+ .*\[.+\]\(\S+\).*$ |
This file contains hidden or 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 use end punctuation in headings." | ||
| link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods | ||
| nonword: true | ||
| level: warning | ||
| scope: heading | ||
| action: | ||
| name: edit | ||
| params: | ||
| - trim_right | ||
| - ".?!" | ||
| tokens: | ||
| - "[a-z][.?!]$" |
This file contains hidden or 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,28 @@ | ||
| extends: capitalization | ||
| message: "'%s' should use sentence-style capitalization." | ||
| link: https://docs.microsoft.com/en-us/style-guide/capitalization | ||
| level: suggestion | ||
| scope: heading | ||
| match: $sentence | ||
| indicators: | ||
| - ":" | ||
| exceptions: | ||
| - Azure | ||
| - CLI | ||
| - Code | ||
| - Cosmos | ||
| - Docker | ||
| - Emmet | ||
| - I | ||
| - Kubernetes | ||
| - Linux | ||
| - macOS | ||
| - Marketplace | ||
| - MongoDB | ||
| - REPL | ||
| - Studio | ||
| - TypeScript | ||
| - URLs | ||
| - Visual | ||
| - VS | ||
| - Windows |
This file contains hidden or 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 @@ | ||
| --- | ||
| # Warning: cloudflare.NonStandardQuotes | ||
| # | ||
| # Use only standard single and double quotes, not left or right quotes. | ||
| # | ||
| # For a list of all options, see https://vale.sh/docs/topics/styles/ | ||
| extends: existence | ||
| message: "Use standard single quotes or double quotes only. Do not use left or right quotes." | ||
| level: warning | ||
| ignorecase: true | ||
| link: https://developers.cloudflare.com/style-guide/grammar/punctuation-marks-and-symbols/quotation-marks/ | ||
| scope: raw | ||
| raw: | ||
| - "[‘’“”]" |
This file contains hidden or 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 @@ | ||
| --- | ||
| name: gitlab_base.UnclearAntecedent | ||
| description: | | ||
| Checks for words that need a noun for clarity. | ||
| extends: existence | ||
| message: "Instead of '%s', try starting this sentence with a specific subject and verb." | ||
| link: https://docs.gitlab.com/development/documentation/styleguide/word_list/#this-these-that-those | ||
| vocab: false | ||
| level: warning | ||
| ignorecase: false | ||
| tokens: | ||
| - "That is" | ||
| - "That was" | ||
| - "There are" | ||
| - "There were" | ||
| - "These are" | ||
| - "These were" | ||
| - "This is" | ||
| - "This was" | ||
| - "Those are" | ||
| - "Those were" |
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kodster28 - This check seems to be promoting the use of contractions, from the warnings I'm getting through my local Vale extension (in VS Code).
