Coverage for lintro / parsers / actionlint / actionlint_issue.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-04-03 18:53 +0000

1"""Issue model for actionlint output.""" 

2 

3from dataclasses import dataclass, field 

4from typing import ClassVar 

5 

6from lintro.parsers.base_issue import BaseIssue 

7 

8 

9@dataclass 

10class ActionlintIssue(BaseIssue): 

11 """Represents a single actionlint issue parsed from CLI output. 

12 

13 Attributes: 

14 DISPLAY_FIELD_MAP: Mapping of display field names to attribute names. 

15 level: Severity level (e.g., "error", "warning"). 

16 code: Rule/code identifier, empty string if not present. 

17 """ 

18 

19 DISPLAY_FIELD_MAP: ClassVar[dict[str, str]] = { 

20 **BaseIssue.DISPLAY_FIELD_MAP, 

21 "severity": "level", 

22 } 

23 

24 level: str = field(default="error") 

25 code: str = field(default="")