all2md.linter.violations

Severity enum and Violation dataclass for the linter.

class all2md.linter.violations.Severity

Bases: IntEnum

Severity levels for lint violations.

Higher numeric value means more severe. The ordering enables simple threshold filtering: drop any violation whose severity is below the configured threshold.

INFO = 1
WARNING = 2
ERROR = 3
classmethod from_name(name: str) Severity

Parse a severity from a case-insensitive name (info/warning/error).

property label: str

Lowercase label suitable for human output (‘error’, ‘warning’, ‘info’).

__new__(value)
class all2md.linter.violations.Violation

Bases: object

A single lint violation emitted by a rule.

rule_code: str
rule_name: str
message: str
severity: Severity
line: int | None
column: int | None
node_type: str | None
suggestion: str | None
context: str | None
fix: 'LintFix' | None
property fixable: bool

True iff an auto-fix is attached to this violation.

to_dict() dict

Serialize the violation to a plain dict (used by the JSON reporter).

__init__(rule_code: str, rule_name: str, message: str, severity: Severity, line: int | None = None, column: int | None = None, node_type: str | None = None, suggestion: str | None = None, context: str | None = None, fix: 'LintFix' | None = None) None