Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support machine friendly output format #3

Closed
abatilo opened this issue Jul 18, 2020 · 2 comments · Fixed by #21
Closed

Support machine friendly output format #3

abatilo opened this issue Jul 18, 2020 · 2 comments · Fixed by #21
Labels
enhancement New feature or request

Comments

@abatilo
Copy link

abatilo commented Jul 18, 2020

If we could have a JSON output format, or any other easy machine parseable format, I believe integrating this into something like vim's ALE plugin would be much easier.

@preslavmihaylov
Copy link
Owner

This is a good idea. I will consider it in a future release.

In the meantime, you could check out this function which parses the program's output. It's part of the custom testing framework I did for the project - based on verifying the binary's output.

@preslavmihaylov
Copy link
Owner

todocheck now supports output as json.

Usage:

todocheck --format json

Sample output:

[
   {
      "type":"Malformed todo",
      "filename":"tmp/main.groovy",
      "line":2,
      "message":"TODO should match pattern - TODO {task_id}:"
   },
   {
      "type":"Malformed todo",
      "filename":"tmp/main.groovy",
      "line":12,
      "message":"TODO should match pattern - TODO {task_id}:"
   },
   {
      "type":"Issue doesn't exist",
      "filename":"tmp/main.groovy",
      "line":15,
      "message":""
   }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants