Skip to content

Commit c96c244

Browse files
authored
Implementing vale (#143)
1 parent 78246f2 commit c96c244

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

.github/workflows/docs-style.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Check documentation with Vale
2+
name: Documentation Style Check
3+
4+
on:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
docs-style:
13+
name: Documentation Style Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Running Vale
19+
uses: errata-ai/vale-action@reviewdog
20+
env:
21+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22+
with:
23+
files: docs
24+
reporter: github-check
25+
level: error
26+
filter_mode: nofilter
27+
fail_on_error: true
28+
vale_flags: "--config=docs/.vale.ini"

docs/.vale.ini

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Core settings
2+
# =============
3+
4+
# Location of our `styles`
5+
StylesPath = "styles"
6+
7+
# The options are `suggestion`, `warning`, or `error` (defaults to “warning”).
8+
MinAlertLevel = warning
9+
10+
# By default, `code` and `tt` are ignored.
11+
IgnoredScopes = code, tt
12+
13+
# By default, `script`, `style`, `pre`, and `figure` are ignored.
14+
SkippedScopes = script, style, pre, figure
15+
16+
# WordTemplate specifies what Vale will consider to be an individual word.
17+
WordTemplate = \b(?:%s)\b
18+
19+
# List of Packages to be used for our guidelines
20+
Packages = Google
21+
22+
# Define the Ansys vocabulary
23+
Vocab = ANSYS
24+
25+
[*.{md,rst}]
26+
27+
# Apply the following styles
28+
BasedOnStyles = Vale, Google
29+
30+
# Removing Google-specific rule - Not applicable under some circumstances
31+
Google.WordList = NO
32+
Google.Colons = NO

docs/styles/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*
2+
!Vocab
3+
!Vocab/**
4+
!.gitignore

docs/styles/Vocab/ANSYS/accept.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ANSYS
2+
Ansys
3+
ansys

docs/styles/Vocab/ANSYS/reject.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)