x/tools/go/analysis/unitchecker: export output JSON schema and include SuggestedFixes #55138
Labels
Analysis
Issues related to static analysis (vet, x/tools/go/analysis)
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Currently the unitchecker offers a JSON (via the
-json
flag).The schema of the JSON output is not documented and the output does not contain
SuggestedFixes
. I propose to document the schema and includeSuggestedFixes
in the output. I think it is reasonable to export the position information as filename and byte offsets for start and end into the file. The end is exclusive (similar to the AST representation).The implementation for the JSON output is here. Exporting and extending it should solve this issue.
I have not yet checked in detail if this is used by other code as well.
It might make sense to flag protect the new output to not break existing tools that rely on the output without
SuggestedFixes
.The text was updated successfully, but these errors were encountered: