Skip to content

Commit

Permalink
docs: add vale rule - commands longform DOC-941 (#2391)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e52fd8)
  • Loading branch information
caroldelwing committed Mar 13, 2024
1 parent d428728 commit eef8973
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions vale/styles/spectrocloud/longform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
extends: existence
message: "Avoid using the short form of commands. Replace the short form flag in '%s' with the corresponding long form flag."
link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Commands-%26-Parameters
level: error
ignorecase: false
scope: raw
tokens:
# Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h.
- (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+
exceptions:
- ls([\s ]{1,}[-][a-zA-Z]{1,3})+
- cd([\s ]{1,}[-][a-zA-Z]{1,3})+
- cp([\s ]{1,}[-][a-zA-Z]{1,3})+
- mv([\s ]{1,}[-][a-zA-Z]{1,3})+
- rm([\s ]{1,}[-][a-zA-Z]{1,3})+
- mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+
- rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+
- cat([\s ]{1,}[-][a-zA-Z]{1,3})+
- pwd([\s ]{1,}[-][a-zA-Z]{1,3})+
- echo([\s ]{1,}[-][a-zA-Z]{1,3})+
- chmod([\s ]{1,}[-][a-zA-Z]{1,3})+
- chown([\s ]{1,}[-][a-zA-Z]{1,3})+
- sed([\s ]{1,}[-][a-zA-Z]{1,3})+
- wc([\s ]{1,}[-][a-zA-Z]{1,3})+

0 comments on commit eef8973

Please sign in to comment.