Coverage for src / python_commitlint / core / enums.py: 100%
17 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-04-28 02:54 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-04-28 02:54 +0000
1"""Enumerations shared across the linter, parser, rules, and configuration."""
3from enum import StrEnum
6class Severity(StrEnum):
7 """How a rule violation is reported.
9 ``DISABLED`` rules are skipped entirely. ``WARNING`` violations do not
10 fail the lint; ``ERROR`` violations do.
11 """
13 DISABLED = "disabled"
14 WARNING = "warning"
15 ERROR = "error"
18class RuleCondition(StrEnum):
19 """The polarity of a rule's expectation.
21 ``ALWAYS`` means the rule's check must hold; ``NEVER`` means it must
22 not. For example, ``subject-full-stop`` with ``NEVER`` forbids a
23 trailing period on the subject.
24 """
26 ALWAYS = "always"
27 NEVER = "never"
30class CaseType(StrEnum):
31 """Recognized case styles for commit message components."""
33 LOWER_CASE = "lower-case"
34 UPPER_CASE = "upper-case"
35 CAMEL_CASE = "camel-case"
36 KEBAB_CASE = "kebab-case"
37 PASCAL_CASE = "pascal-case"
38 SENTENCE_CASE = "sentence-case"
39 SNAKE_CASE = "snake-case"
40 START_CASE = "start-case"