ExplicitImports.jl icon indicating copy to clipboard operation
ExplicitImports.jl copied to clipboard

FR: Diagnostic error outputs as structured data

Open fredrikekre opened this issue 5 months ago • 2 comments

It would be nice to add functionality to print out diagnostic data as e.g. JSON or JSONLines. This would enable editor integrations such as https://github.com/mfussenegger/nvim-lint to easily parse and show diagnostics.

fredrikekre avatar Jun 16 '25 20:06 fredrikekre

nice, we do have explicit_imports and improper_explicit_imports which are the API level programmatic entrypoints with semver guarantees about their outputs. I would be open to package extensions to support JSON serialization of those outputs (or similar) if that can help. I'd prefer to not take on a main-line dependency for it as I'm trying to keep the package light which I think helps make it usable in more situations.

ericphanson avatar Jun 16 '25 20:06 ericphanson

Outputting JSON is simple enough that it can be done without a JSON library I think. Just the location and the message string would be enough.

fredrikekre avatar Jun 16 '25 20:06 fredrikekre