Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: checking documentation style in Examples directory too #3191

Merged
merged 9 commits into from
Jun 24, 2024
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,18 @@ jobs:


doc-style:
name: "Documentation style check"
name: "Documentation style ${{ matrix.folder }}"
runs-on: ubuntu-latest
strategy:
matrix:
folder: ["doc", "examples"]
steps:
- name: "Ansys documentation style checks"
uses: ansys/actions/doc-style@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ matrix.folder }}
vale-config: ${{ matrix.folder }}/.vale.ini
vale-version: "3.4.1"


Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/3191.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: checking documentation style in ``Examples`` directory too
36 changes: 36 additions & 0 deletions examples/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Core settings
# =============

# Location of our `styles`
StylesPath = "../doc/styles"

# The options are `suggestion`, `warning`, or `error` (defaults to “warning”).
MinAlertLevel = warning

# By default, `code` and `tt` are ignored.
IgnoredScopes = code, tt

# By default, `script`, `style`, `pre`, and `figure` are ignored.
SkippedScopes = script, style, pre, figure

# WordTemplate specifies what Vale will consider to be an individual word.
WordTemplate = \b(?:%s)\b

# List of Packages to be used for our guidelines
Packages = Google

# Define the Ansys vocabulary
Vocab = ANSYS

# Section styles
# ==============
[*.{md,rst}]

# Apply the following styles
BasedOnStyles = Vale, Google

TokenIgnores = (:(func|class|meth|attr|py):`(?:.|\n)*?`)|(<.*>)

# Removing Google-specific rule - Not applicable under some circumstances
Google.Colons = NO
Vale.Terms = NO
Loading