Closed effigies closed 3 months ago
Updated issue structure:
class Issue:
code: str
sub: str | None # Mostly applies to missing/invalid JSON keys or TSV columns
location: Path | None # Likely be absent for missing sidecar keys
severity: Literal["Error", "Warning"]
message: str | None
suggestion: str | None
affects: list[Path]
rule: str | None # Schema path, if applicable (maybe)
While triaging a failure to report a missing recommended key, I discovered that only one key is shown per file, presumably to avoid excess noise. I'd like to rethink the Issue structure. I am starting to think of it as a table:
<path>
<path>
<path>.json
<datafile1> <datafile2> ...
Here
(Issue, Sub-issue, Location)
are lookup keys to a specific problem in a file. The severity and location are the main things needed to determine whether and where to fix the problem, with message and affects being useful for understanding.To mock up a structure in Python:
Thoughts? Anything you think we should add, or something we currently have that this wouldn't handle?