ExplicitImports.jl
ExplicitImports.jl copied to clipboard
FR: Diagnostic error outputs as structured data
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.
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.
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.