-
Notifications
You must be signed in to change notification settings - Fork 811
Updated some regex expressions to match the styleguide #7341
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
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6768175
Updated some regex expressions to match the styleguide
eshanrnh 650739f
Update .github/styles/UmbracoDocs/Editorializing.yml
eshanrnh 1b02754
Update .github/styles/UmbracoDocs/LinkTextClarity.yml
eshanrnh c9d7793
Update .github/styles/UmbracoDocs/LinkTextClarity.yml
eshanrnh 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 |
|---|---|---|
| @@ -1,95 +1,123 @@ | ||
| --- | ||
| extends: conditional | ||
| message: "'%s' has no definition" | ||
| level: error | ||
| message: "'%s' has no definition." | ||
| description: > | ||
| Ensures that all acronyms used in the documentation are clearly defined. | ||
| link: https://docs.umbraco.com/contributing/documentation/style-guide#acronyms | ||
| scope: text | ||
| level: error | ||
| ignorecase: false | ||
| # Ensures that the existence of 'first' implies the existence of 'second'. | ||
| # Require leading whitespace to avoid matching on URL substrings eg https://www.youtube.com/embed/OUD-PbWESAs?rel=0 | ||
| # If an uppercase acronym of 3-5 letters is found (first), | ||
| # require a definition (second) somewhere nearby. | ||
| first: '\b([A-Z]{3,5})\b' | ||
| second: '([A-Z]{3,5}): (?:\b[A-Z][a-z]+ )+|(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' | ||
| # ... with the exception of these: | ||
| # ... with the exception of these. Sorted alphabetically for easier maintenance. | ||
| exceptions: | ||
| - ABC | ||
| - ADD | ||
| - ALT | ||
| - HTML | ||
| - JSON | ||
| - CSS | ||
| - API | ||
| - URL | ||
| - UDI | ||
| - URI | ||
| - NET | ||
| - MVC | ||
| - GET | ||
| - ASP | ||
| - ADO | ||
| - REST | ||
| - HTTP | ||
| - HTTPS | ||
| - CURL | ||
| - BASE | ||
| - UDA | ||
| - CLI | ||
| - KUDU | ||
| - XML | ||
| - PATH | ||
| - SQL | ||
| - SHIFT | ||
| - POST | ||
| - GUID | ||
| - UWP | ||
| - HAL | ||
| - LINK | ||
| - DLL | ||
| - CMS | ||
| - ONLY | ||
| - IIS | ||
| - DNS | ||
| - DOM | ||
| - XSLT | ||
| - AJAX | ||
| - YAML | ||
| - PNG | ||
| - ISO | ||
| - DXP | ||
| - FAQ | ||
| - DIBS | ||
| - VAT | ||
| - SKU | ||
| - UTC | ||
| - HEX | ||
| - RGBA | ||
| - IDE | ||
| - CPU | ||
| - RAM | ||
| - CNAME | ||
| - AAAA | ||
| - TXT | ||
| - PUT | ||
| - DELETE | ||
| - ZIP | ||
| - CTRL | ||
| - SPACE | ||
| - ENTER | ||
| - VIP | ||
| - DEBUG | ||
| - INFO | ||
| - TEMP | ||
| - GIF | ||
| - GDPR | ||
| - NPM | ||
| - SVG | ||
| - DHL | ||
| - UUI | ||
| - MDN | ||
| - JPG | ||
| - JPEG | ||
| - BCC | ||
| - SSD | ||
| - ASCII | ||
| - CMD | ||
| - NGINX | ||
| - SDK | ||
| - SMTP | ||
| - AAAA # IPv6 address record (DNS) | ||
| - ADD # | ||
| - ADO # ActiveX Data Objects | ||
| - AJAX # Asynchronous JavaScript and XML | ||
| - ALT # Alternative text (images) | ||
| - API # Application Programming Interface | ||
| - ASCII # American Standard Code for Information Interchange | ||
| - ASP # Active Server Pages | ||
| - BCC # Blind Carbon Copy (email) | ||
| - CD # Continuous Delivery | ||
| - CDN # Content Delivery Network | ||
| - CI # Continuous Integration | ||
| - CLI # Command Line Interface | ||
| - CMD # Command (Windows shell) | ||
| - CMS # Content Management System | ||
| - CPU # Central Processing Unit | ||
| - CSS # Cascading Style Sheets | ||
| - CTRL # Control (Keyboard key) | ||
| - CURL # Client URL | ||
| - DELETE # HTTP DELETE method | ||
| - DHL # International Shipping brand | ||
| - DIBS # DIBS by Nets | ||
| - DNS # Domain Name System | ||
| - DOM # Document Object Model | ||
| - DXP # Digital Experience Platform | ||
| - EOL # End of Life | ||
| - FAQ # Frequently Asked Questions | ||
| - FTP # File Transfer Protocol | ||
| - GDPR # General Data Protection Regulation | ||
| - GET # HTTP GET method | ||
| - GIF # Graphics Interchange Format | ||
| - GUI # Graphical user interface | ||
| - GUID # Globally Unique Identifier | ||
| - HAL # Hypertext Application Language | ||
| - HASH # Cryptographic hash | ||
| - HEX # Hexadecimal | ||
| - HTML # HyperText Markup Language | ||
| - HTTP # HyperText Transfer Protocol | ||
| - HTTPS # HyperText Transfer Protocol Secure | ||
| - IaaS # Infrastructure as a Service | ||
| - IDE # Integrated Development Environment | ||
| - IIS # Internet Information Services | ||
| - INFO # Information | ||
| - ISO # International Organization for Standardization | ||
| - JPG # Joint Photographic Experts Group | ||
| - JPEG # Joint Photographic Experts Group | ||
| - JSON # JavaScript Object Notation | ||
| - JSONP # JSON with Padding | ||
| - JS # JavaScript | ||
| - JWT # JSON Web Token | ||
| - KUDU # Azure deployment engine | ||
| - LDAP # Lightweight Directory Access Protocol | ||
| - LINK # | ||
| - MIT # Open-source software license developed at the Massachusetts Institute of Technology (MIT) | ||
| - MDN # Mozilla Developer Network | ||
| - MFA # Multi-factor Authentication | ||
| - MVC # Model-View-Controller | ||
| - NET # .NET Framework | ||
| - NGINX # Engine X (web server) | ||
| - NPM # Node Package Manager | ||
| - OAuth # Open Authorization | ||
| - ONLY # | ||
| - ORM # Object-Relational Mapping | ||
| - PaaS # Platform as a Service | ||
| - PATH # file system path | ||
| - PDF # Portable Document Format | ||
| - PNG # Portable Network Graphics | ||
| - POST # HTTP POST method | ||
| - PUT # HTTP PUT method | ||
| - RAM # Random Access Memory | ||
| - REST # Representational State Transfer | ||
| - RGBA # Red Green Blue Alpha (color model) | ||
| - RPG # Role-Playing Game | ||
| - RTX # Ray Tracing Texel eXtreme (NVIDIA tech) | ||
| - SaaS # Software as a Service | ||
| - SDK # Software Development Kit | ||
| - SEO # Search Engine Optimization | ||
| - SHIFT # Keyboard key | ||
| - SPACE # Keyboard key | ||
| - SKU # Stock Keeping Unit | ||
| - SMTP # Simple Mail Transfer Protocol | ||
| - SQL # Structured Query Language | ||
| - SSD # Solid State Drive | ||
| - SSL # Secure Sockets Layer | ||
| - SVG # Scalable Vector Graphics | ||
| - TCP # Transmission Control Protocol | ||
| - TEMP # Temporary | ||
| - TS # TypeScript | ||
| - TXT # Text (file format) | ||
| - TLS # Transport Layer Security | ||
| - UDA # Files for Umbraco project's metadata | ||
| - UDI # Unique Device Identifier | ||
| - UI # User Interface | ||
| - URI # Uniform Resource Identifier | ||
| - URL # Uniform Resource Locator | ||
| - UTC # Coordinated Universal Time | ||
| - UUID # Universally Unique Identifier | ||
| - UWP # Universal Windows Platform | ||
| - UX # User Experience | ||
| - VAL # | ||
| - VAT # Value-Added Tax | ||
| - VIP # Very Important Person | ||
| - WYSIWYG # What You See Is What You Get | ||
| - XML # Extensible Markup Language | ||
| - XSLT # Extensible Stylesheet Language Transformations | ||
| - XSS # Cross-Site Scripting | ||
| - YAML # YAML file | ||
| - ZIP # ZIP file format |
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 |
|---|---|---|
| @@ -1,13 +1,31 @@ | ||
| --- | ||
| extends: substitution | ||
| message: "We prefer %s over '%s.'" | ||
| message: "Use '%s' instead of '%s' for brand consistency." | ||
| description: > | ||
| Ensures consistent capitalization of brand and product names. | ||
| This rule ignores matches inside markdown links and inline code to prevent false warnings. | ||
| link: https://docs.umbraco.com/contributing/documentation/style-guide#brands | ||
| level: warning | ||
| scope: text | ||
| ignorecase: true | ||
| # Sorted alphabetically for easier maintenance. | ||
| swap: | ||
| '(?<![\.\/])youtube': "'YouTube'" | ||
| microsoft: "'Microsoft'" | ||
| slack: "'Slack'" | ||
| azure: "'Azure'" | ||
| gitbook: "'GitBook'" | ||
| Gitbook: "'GitBook'" | ||
| github: "'GitHub'" | ||
| Github: "'GitHub'" | ||
| # Use negative lookbehind to ignore matches inside markdown links `[text](link)` or inline code `code` | ||
| '(?<![\[`(])\bazure\b(?![.\w/-]*\))': "Azure" | ||
| '(?<![\[`])\bazure devops\b': "Azure DevOps" | ||
| '(?<![\[`])\bchrome\b': "Chrome" | ||
| '(?<![\[`])\bcloudflare\b': "Cloudflare" | ||
| '(?<![\[`])\bfirefox\b': "Firefox" | ||
| '(?<![\[`\/\.])\bgitbook\b': "GitBook" | ||
| '(?<![\[`])\bgithub\b': "GitHub" | ||
| '(?<![\[`])\bmacos\b': "macOS" | ||
| '(?<![\[`(])\bmicrosoft\b(?![.\w/-]*\))': "Microsoft" | ||
| '(?<![\[`])\bnginx\b': "NGINX" | ||
| '(?<![\[`])\bsafari\b': "Safari" | ||
| '(?<![\[`])\bslack\b': "Slack" | ||
| '(?<![\[`])\btwitter\b': "Twitter" | ||
| '(?<![\[`])\bumbraco id\b': "Umbraco ID" | ||
| '(?<![\[`])\bumbraco support\b': "Umbraco Support" | ||
| '(?<![\[`])\bvisual studio code\b': "Visual Studio Code" | ||
| '(?<![\[`])\bvs code\b': "Visual Studio Code" | ||
| '(?<![\[`])\byoutube\b(?![-\.\/])': "YouTube" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| --- | ||
| extends: existence | ||
| message: Do not use '%s' at the end of headings | ||
| link: https://github.com/cockroachdb/docs/blob/master/STYLE.md#capitalization-and-punctuation | ||
| message: "Do not use '%s' at the end of heading." | ||
| description: > | ||
| Checks headings to ensure they do not end with punctuation. | ||
| link: https://docs.umbraco.com/contributing/documentation/style-guide#avoid-punctuation-in-headings | ||
| scope: heading | ||
| level: warning | ||
| 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,11 @@ | ||
| --- | ||
| extends: existence | ||
| message: "Avoid generic link text like '%s'. Use descriptive link text instead." | ||
| description: > | ||
| Descriptive link text improves accessibility and SEO. | ||
| level: warning | ||
| raw: | ||
eshanrnh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - 'click here' | ||
| - 'read more' | ||
| - 'more info' | ||
| - '\bhere\b' | ||
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 |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| --- | ||
| extends: existence | ||
| message: "Start each option with a capital letter." | ||
| link: https://github.com/testthedocs/vale-styles/blob/master/OpenStack/ListStart.yml | ||
| level: warning | ||
| message: "List items should start with a capital letter, unless they begin with an inline code or a URL." | ||
| description: > | ||
| Ensures that each list item starts with a capital letter, | ||
| unless the item begins with inline code or a URL. | ||
| link: https://docs.umbraco.com/contributing/documentation/style-guide#use-lists-when-listing-more-than-2-items-steps | ||
| scope: list | ||
| level: warning | ||
| nonword: true | ||
| tokens: | ||
| - '^[a-z].+' | ||
| - '^(?!\[|_)[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 |
|---|---|---|
| @@ -1,14 +1,19 @@ | ||
| --- | ||
| extends: substitution | ||
| message: "We prefer %s over '%s'" | ||
| message: "Use '%s' instead of '%s' for consistency." | ||
| description: > | ||
| Ensures consistent capitalization and formatting of common terms and acronyms. | ||
| link: https://docs.umbraco.com/contributing/documentation/style-guide#names | ||
| level: warning | ||
| scope: paragraph | ||
| swap: | ||
| '(?:(?<!\.)css)': CSS | ||
| '(?:(?<!\.)[hH]tml)': HTML | ||
| "url(?!=)": "'URL'" | ||
| '(?:(?<!\.)js|[jJ]ava[sS]cript)': JavaScript | ||
| '(?:(?<!\.)ts|[tT]ype[sS]cript)': TypeScript | ||
| .net: "'.NET'" | ||
| dot net: "'.NET'" | ||
| cms: "'CMS'" | ||
| "[aA]ngular[jJ][sS]": AngularJS | ||
| SUITS: "'Sales'" | ||
| '\bcss\b(?!/)': "'CSS'" | ||
| '(?<!\.)[hH]tml': "'HTML'" | ||
| 'url(?!=)': "'URL'" | ||
| '\bjs\b(?![.])|\b[jJ]ava[sS]cript\b': "'JavaScript'" | ||
| '\bts\b(?![.])|\b[tT]ype[sS]cript\b': "'TypeScript'" | ||
| '.net': "'.NET'" | ||
| 'dot net': "'.NET'" | ||
| '\bcms\b': "'CMS'" | ||
| '[aA]ngular[jJ][sS]': "'AngularJS'" | ||
| 'SUITS': "'Sales'" |
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,10 @@ | ||
| --- | ||
| extends: repetition | ||
| message: "'%s' is repeated." | ||
| description: > | ||
| Detects repeated words like 'the the'. | ||
| alpha: true | ||
| level: warning | ||
| 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
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 |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| --- | ||
| extends: existence | ||
| message: "'%s' should have one space." | ||
| description: > | ||
| Ensures there is exactly one space after punctuations. Flags both extra spaces and missing spaces | ||
| after punctuation marks to improve consistency and readability. | ||
| link: https://docs.umbraco.com/contributing/documentation/style-guide#avoid-double-spacing | ||
| level: error | ||
| tokens: | ||
| - '[.?!] {2,}[A-Z]' | ||
| - '[.?!,;:] {2,}' # double space after punctuation | ||
| - '[.?!,;:](?!\s)[A-Z]' # missing space after punctuation |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.