Vale#

class src.ansys.pre_commit_hooks.quality_rules.vale.Vale#

Bases: abc.ABC

Vale rule family.

Base class of the Vale quality rules. Each rule is a subclass named VL with a static check method that evaluates the documentation Vale configuration independently. Missing or unreadable configuration is reported as an error rather than skipped.

Overview#

check

Evaluate a Vale rule.

Import detail#

from src.ansys.pre_commit_hooks.quality_rules.vale import Vale

Attribute detail#

Vale.family: ClassVar[str] = 'vale'#

Method detail#

static Vale.check(repository_root: pathlib.Path, readme_file: str | None) → ansys.pre_commit_hooks.quality_rules.common.RuleCheckResult#
Abstractmethod:

Evaluate a Vale rule.

Parameters:
repository_rootpathlib.Path

Repository root directory.

readme_filestr or None

Detected README path, unused by this rule family.

Returns:
bool or str

True when the rule passes, False for an error, or a string prefixed with "ERROR: ", "WARNING: ", or "RECOMMENDATION: ".