LB012#

class src.ansys.pre_commit_hooks.quality_rules.labels.LB012#

Bases: Labels

Labels.yml has ci, tests, maintenance, and release labels.

Overview#

check

Check whether the recommended project labels are declared.

Import detail#

from src.ansys.pre_commit_hooks.quality_rules.labels import LB012

Method detail#

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

Check whether the recommended project labels are declared.

Parameters:
repository_rootpathlib.Path

Root directory of the repository being checked.

readme_filestr or None

Detected README path. This rule does not use the README.

Returns:
bool or str

True when all recommended labels are declared, otherwise a recommendation naming the missing labels and explaining their use.