PreCommit#
- class src.ansys.pre_commit_hooks.quality_rules.pre_commit.PreCommit#
Bases:
abc.ABCPre-commit rule family.
Base class of the pre-commit quality rules. Each rule is a subclass named
PCwith a staticcheckmethod that evaluates the repository’s pre-commit configuration independently. Missing or unreadable configuration is reported as an error rather than skipped. Rules for optional hooks report aRECOMMENDATIONinstead of an error when the hook is absent.
Overview#
Import detail#
from src.ansys.pre_commit_hooks.quality_rules.pre_commit import PreCommit
Attribute detail#
Method detail#
- static PreCommit.check(repository_root: pathlib.Path, readme_file: str | None) ansys.pre_commit_hooks.quality_rules.common.RuleCheckResult#
- Abstractmethod:
Evaluate a pre-commit rule.
- Parameters:
- repository_root
pathlib.Path Repository root directory.
- readme_file
strorNone Detected README path, unused by this rule family.
- repository_root
- Returns: