Skip to content

Commit

Permalink
chore: externalize Vale styles (for the master branch) (eclipse-che#2200
Browse files Browse the repository at this point in the history
)
  • Loading branch information
themr0c authored Dec 22, 2021
1 parent 68e0aef commit 1defabe
Show file tree
Hide file tree
Showing 39 changed files with 42 additions and 1,317 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-validate-on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ jobs:
run: tools/detect-unused-images.sh

- name: Validate language on files added or modified
run: tools/validate_language_changes.sh
run: |
tools/get_vale_styles.sh
tools/validate_language_changes.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ build/site
build/site.zip
build/site-unbranded

# Keep Vale styles external
.vale/styles/

linkchecker-out.html
.ash_history
.bash_history
Expand Down
35 changes: 16 additions & 19 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ StylesPath = .vale/styles
MinAlertLevel = suggestion

# IgnoredScopes specifies inline-level HTML tags to ignore.
# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still won't raise any alerts.
# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still will not raise any alerts.
# Default: ignore `code` and `tt`.
IgnoredScopes = code, tt, img, url, a, body.id
# SkippedScopes specifies block-level HTML tags to ignore. Ignore any content in these scopes.
Expand All @@ -26,13 +26,7 @@ SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock,
# Project specific (CheDocs)
# IBM Style Guide (IBM)
# Generic (Vale)
BasedOnStyles = CheDocs,IBM

# Altering rules severity (error, warning, suggestion)
CheDocs.ReadabilityGrade = suggestion
IBM.Annotations = suggestion
IBM.Slash = warning
IBM.Usage = suggestion
BasedOnStyles = CheDocs,RedHat

# Ignore attributes definition, id statements
TokenIgnores = (:[^\n]+: [^\n]+), (\[id=[^\n]+)
Expand All @@ -43,18 +37,21 @@ properties = md

# Define specific rules for the `md` format, hijacked to process `che.properties`.
[*.md]
BasedOnStyles = CheDocs,IBM
BasedOnStyles = RedHat
# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs.
TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[)
IBM.Annotations = suggestion
IBM.HeadingPunctuation = NO
IBM.Headings = NO
IBM.Slash = warning
IBM.Usage = suggestion
RedHat.Annotations = suggestion
RedHat.HeadingPunctuation = NO
RedHat.Headings = NO
RedHat.Slash = warning
RedHat.Usage = suggestion

[*.ini]
BasedOnStyles = CheDocs,IBM
IBM.Slash = NO
IBM.Spacing = NO
CheDocs.Spelling = NO
CheDocs.ConfigMap = NO
BasedOnStyles = RedHat
RedHat.Slash = NO
RedHat.Spacing = NO
RedHat.Spelling = NO
RedHat.url = NO
RedHat.ConfigMap = NO
RedHat.write = NO

Empty file added .vale/styles/.placeholder
Empty file.
37 changes: 0 additions & 37 deletions .vale/styles/CheDocs/Attributes.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .vale/styles/CheDocs/CommonTerms.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .vale/styles/CheDocs/InternalLinks.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .vale/styles/CheDocs/Links.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .vale/styles/CheDocs/LinksChe6.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .vale/styles/CheDocs/ReadabilityGrade.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .vale/styles/CheDocs/SentenceLength.yml

This file was deleted.

217 changes: 0 additions & 217 deletions .vale/styles/CheDocs/Spelling.yml

This file was deleted.

Loading

0 comments on commit 1defabe

Please sign in to comment.