That’s basically what I’m after as well (maybe a little more structured than a tuple, but same idea that you get an iterable back to loop over).
If we can get an API then doing a wrapper to normalize output wouldn’t be difficult. And using entry point would allow for automatic tool discovery.
My assumption is this would become a PEP to make sure linters in general were aware of it.
My current thinking of an API is:
Class Diagnostic:
path: os.PathLike[str]
position: ((int, Optional[int]), (Optional[int], Optional[int])) # To support col/row range.
severity: SeverityEnum # Or string with predefined values.
message: str
message_id: str
tool: str
entry_point(root: Optional[os.PathLike[str]] = None, path: Optional[os.PathLike[str]] = None, source: Optional[str] = None) -> Iterable[Diagnostic]
At this point I’m waiting to see who speaks up with interest and then going to PyCQA to see what the interest is over there.