pytype icon indicating copy to clipboard operation
pytype copied to clipboard

Output errors in machine-friendly format?

Open alok opened this issue 6 years ago • 11 comments

Elm has the option to output errors as JSON (via a flag), and something like that is handy for writing tooling around it. I'm trying to integrate pytype into ALE and this would make it a lot easier.

alok avatar Jun 28 '18 05:06 alok

Would CSV format work? pytype-single has an --output-errors-csv flag (https://github.com/google/pytype/blob/master/pytype/config.py#L183) that we could expose in pytype.

rchen152 avatar Jun 29 '18 05:06 rchen152

Probably will be fine.

alok avatar Jun 29 '18 06:06 alok

closing this, reopen if csv is insufficient for some use case.

martindemello avatar Jul 20 '18 19:07 martindemello

@alok did you ever complete this integration?

kovasap avatar Aug 05 '19 23:08 kovasap

Responding to https://github.com/google/pytype/issues/634 made me realize that we closed this issue without ever actually exposing --output-errors-csv to analyze_project, and there's clearly still an appetite for this feature, so reopening this issue.

rchen152 avatar Jul 30 '20 00:07 rchen152

tagging this "good first issue"; plumbing the csv output from pytype-single through the stack would not require much deep knowledge of pytype

martindemello avatar Jul 30 '20 00:07 martindemello

A supported, standard format would be nicer? Many CI systems can already process formats like PEP8, do we really want another one?

djh82 avatar Oct 02 '20 21:10 djh82

Would fixing this just involve adding it as an arg to analyze_project/parse_args.py and getting the errors.csv like single_test.py?

jollypolly123 avatar Mar 15 '22 23:03 jollypolly123

@jollypolly123 that would be the first step, but we would also need to collect the errors.csv from multiple runs of pytype-single and combine them into a single csv file.

martindemello avatar Mar 15 '22 23:03 martindemello