Skip to content

Commit

Permalink
Added adapted rules: Acronyms, Avoid, Ellipses, FirstPerson, FutureTe…
Browse files Browse the repository at this point in the history
…nse, URLFormat, Vocab
  • Loading branch information
pedrosousa committed May 11, 2020
1 parent eae5333 commit 8c6b363
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 0 deletions.
51 changes: 51 additions & 0 deletions styles-vale/OutSystems/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Adapted from Microsoft.Acronyms
# Changed: exceptions
# Previous link: https://docs.microsoft.com/en-us/style-guide/acronyms
extends: conditional
message: "'%s' has no definition."
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
- CPU
- CSS
- CSV
- DOM
- FAQ
- GDB
- GET
- GUI
- HTML
- HTTP
- HTTPS
- IDE
- JSON
- LESS
- NET
- PATH
- PDF
- PHP
- POST
- RAM
- REST
- SCSS
- SDK
- SOAP
- SQL
- SSH
- SSL
- SVG
- TCP
- URI
- URL
- USB
- UTF
- XML
- XSS
- YAML
- ZIP
20 changes: 20 additions & 0 deletions styles-vale/OutSystems/Avoid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Adapted from Microsoft.Avoid
# Changed: tokens, level
# Previous link: https://docs.microsoft.com/en-us/style-guide
extends: existence
message: "Don't use '%s'."
ignorecase: true
level: suggestion
tokens:
- abortion
- and so on
# - and/or
# - app developer
# - app(?:lication)? file
# - application developer
# - application program
# - applications developer
- as well as
# - ask
- backbone
- backend
11 changes: 11 additions & 0 deletions styles-vale/OutSystems/Ellipses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Adapted from Microsoft.Ellipses
# Changed: tokens, level
# Previous link: https://docs.microsoft.com/en-us/style-guide/punctuation/ellipses
extends: existence
message: "In general, don't use an ellipsis."
nonword: true
level: suggestion
action:
name: remove
tokens:
- '\.\.\.[^*]'
17 changes: 17 additions & 0 deletions styles-vale/OutSystems/FirstPerson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Adapted from Microsoft.FirstPerson
# Changed: ignorecase, tokens
# Doesn't ignore capitalization because we allow "i" as an input parameter in Reference and UI labels like **My Settings** (in bold).
# Previous link: https://docs.microsoft.com/en-us/style-guide/grammar/person
extends: existence
message: "Use first person (such as '%s') sparingly."
ignorecase: false
level: warning
nonword: true
tokens:
- (?:^|\s)I\s
- (?:^|\s)I,\s
- \bI'm\b
- \bme\b
- \bmy\b
- (?:\s|[^*])My\b
- \bmine\b
10 changes: 10 additions & 0 deletions styles-vale/OutSystems/FutureTense.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Based on Openly.FutureTense
# Changed: tokens
# Previous link: https://github.com/testthedocs/Openly/blob/master/FutureTense.yml
extends: existence
message: "Possible future tense."
ignorecase: true
level: warning
tokens:
- will
- we are going
13 changes: 13 additions & 0 deletions styles-vale/OutSystems/URLFormat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Based on Microsoft.URLFormat
# Changed: level, swap
# We only want to validate the "a URL" expression.
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: true
level: warning
action:
name: replace
swap:
# URL for: URL of
an URL: a URL

29 changes: 29 additions & 0 deletions styles-vale/OutSystems/Vocab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Based on Microsoft.Vocab
# Changed: tokens
# Adapted to OutSystems word list.
# Previous link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/abort-abortion
extends: existence
message: "Verify your use of '%s' with the OutSystems word list."
level: suggestion
ignorecase: true
tokens:
# - above
# used in "accessible domains" topic
# - accessible
- actionable
- against
- alarm
# - alert
# used in "accessible domains" topic
# - alias
# - allows?
- assure
# - author
- avg
# - ensure
# There's a separate rule for checking 'he'/'she'
# - he
- insure
# - she
# - sample
# - beta

0 comments on commit 8c6b363

Please sign in to comment.