Coverage for lintro / parsers / rustfmt / rustfmt_issue.py: 100%
10 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
1"""Issue model for rustfmt output."""
3from __future__ import annotations
5from dataclasses import dataclass, field
6from typing import ClassVar
8from lintro.enums.severity_level import SeverityLevel
9from lintro.parsers.base_issue import BaseIssue
12@dataclass
13class RustfmtIssue(BaseIssue):
14 """Represents a rustfmt formatting issue.
16 Rustfmt reports files that need formatting. Each issue represents
17 a file that would be reformatted.
19 Attributes:
20 DISPLAY_FIELD_MAP: Mapping of display field names to attribute names.
21 DEFAULT_SEVERITY: Defaults to INFO (pure formatter).
22 fixable: Whether the issue can be auto-fixed (always True for rustfmt).
23 """
25 DISPLAY_FIELD_MAP: ClassVar[dict[str, str]] = {
26 **BaseIssue.DISPLAY_FIELD_MAP,
27 }
29 DEFAULT_SEVERITY: ClassVar[SeverityLevel] = SeverityLevel.INFO
31 fixable: bool = field(default=True)