The vale.py module#

Summary#

Vale

Vale rule family.

VL001

The doc/.vale.ini file exists.

VL002

Vale uses the Google style package.

VL003

Vale uses the ANSYS vocabulary.

VL004

The ANSYS accept.txt vocabulary exists.

VL005

The ANSYS reject.txt vocabulary exists.

VL006

Vale StylesPath is styles.

VL007

Vale MinAlertLevel is warning or stricter.

VL008

Vale IgnoredScopes includes code and tt.

VL009

Vale SkippedScopes includes script, style, pre, and figure.

VL010

Vale WordTemplate matches whole words.

VL011

Vale lints Python, Markdown, and reStructuredText files.

VL012

Vale parses Python files as Markdown.

VL013

Vale applies the built-in Vale style.

VL014

Vale disables the Vale.Terms rule.

VL015

Vale configures TokenIgnores and BlockIgnores.

VL016

The Vale styles .gitignore preserves configured vocabulary files.

VL017

The ANSYS accept.txt vocabulary is not empty.

VL018

The ANSYS accept.txt vocabulary has no duplicate or blank lines.

VL019

Legacy codespell word lists are migrated to Vale.

Description#

Vale configuration checks.

This rule set validates the documentation Vale configuration in doc/.vale.ini and the files it depends on.

The checks cover:

  • The doc/.vale.ini file exists

  • The Google package is listed in Packages and applied through BasedOnStyles together with the built-in Vale style

  • The ANSYS vocabulary is enabled through Vocab and provides accept.txt and reject.txt files

  • The core settings (StylesPath, MinAlertLevel, IgnoredScopes, SkippedScopes, and WordTemplate) follow the PyAnsys template

  • Python, Markdown, and reStructuredText files are linted, Python files are parsed as Markdown, and Vale.Terms, TokenIgnores, and BlockIgnores are configured

  • The styles .gitignore ignores other files while preserving the configured

    Vale vocabulary files

  • The accept.txt vocabulary is populated, without duplicate or blank lines

  • Legacy codespell word lists are migrated to the ANSYS vocabulary

Paths such as the vocabulary and the styles .gitignore are resolved under StylesPath, relative to the doc directory. Vocabulary files are looked up in the Vale 3 layout (config/vocabularies/ANSYS) or the legacy layout (Vocab/ANSYS). Missing, unreadable, or invalid configuration is reported as an ERROR.