Skip to content

Commit 67f00e6

Browse files
committed
MTA-4748: Adding Vale to MTA GitHub repo
Signed-off-by: A.Arnold <[email protected]>
1 parent 843261a commit 67f00e6

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/workflows/lint-with-vale.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Linting with Vale on pull request
3+
on: [pull_request]
4+
5+
jobs:
6+
vale:
7+
name: Linting with Vale
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Install Asciidoctor
12+
run: sudo apt-get install -y asciidoctor
13+
- uses: errata-ai/vale-action@reviewdog
14+
with:
15+
filter_mode: diff_context
16+
vale_flags: "--no-exit --minAlertLevel=error"
17+
reporter: github-pr-review
18+
# Radhika says not to block PR merge if there are Vale errors
19+
# To change set fail_on_error: true
20+
fail_on_error: false
21+
env:
22+
# Required, set by GitHub actions automatically:
23+
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
25+
REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}}

vale.ini

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
StylesPath = .vale/styles
2+
3+
MinAlertLevel = suggestion
4+
5+
IgnoredScopes = code, tt, img, url, a, body.id
6+
7+
SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock
8+
9+
Packages = RedHat, proselint, write-good
10+
11+
# Match AsciiDoc files. See: https://vale.sh/docs/topics/scoping/
12+
# Ignore files in a directory starting by `.`
13+
# to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files
14+
[[!.]*.adoc]
15+
16+
BasedOnStyles = RedHat, proselint, write-good
17+
18+
[*.md]
19+
20+
BasedOnStyles = RedHat, proselint, write-good
21+
22+
# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs.
23+
TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[)
24+
25+
# Match INI files. See: https://vale.sh/docs/topics/scoping/
26+
[*.ini]
27+
28+
BasedOnStyles = RedHat
29+
30+
# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs.
31+
TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[)
32+
33+
# Disabling rules (NO)
34+
RedHat.CaseSensitiveTerms = NO
35+
RedHat.ConfigMap = NO
36+
RedHat.Definitions = NO
37+
RedHat.Slash = NO
38+
RedHat.Spacing = NO
39+
RedHat.Spelling = NO
40+
RedHat.TermsSuggestions = NO

0 commit comments

Comments
 (0)