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 JSON lines output #87

Open
lithammer opened this issue Mar 2, 2023 · 0 comments
Open

Support JSON lines output #87

lithammer opened this issue Mar 2, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@lithammer
Copy link

It would be nice if the was an option to parse output from tools that output JSON lines1. For example Selene2 is such a tool:

$ selene --display-style json2 --no-summary init.lua
...
{"type":"Diagnostic","severity":"Warning","code":"unscoped_variables","message":"`vim` is not declared locally, and will be available in every scope","primary_label":{"filename":"init.lua","span":{"start":11315,"start_line":339,"start_column":0,"end":11318,"end_line":339,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}
{"type":"Diagnostic","severity":"Error","code":"undefined_variable","message":"`vim` is not defined","primary_label":{"filename":"init.lua","span":{"start":11477,"start_line":346,"start_column":0,"end":11480,"end_line":346,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}
{"type":"Diagnostic","severity":"Error","code":"undefined_variable","message":"`vim` is not defined","primary_label":{"filename":"init.lua","span":{"start":11605,"start_line":349,"start_column":0,"end":11608,"end_line":349,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}
{"type":"Diagnostic","severity":"Warning","code":"unscoped_variables","message":"`vim` is not declared locally, and will be available in every scope","primary_label":{"filename":"init.lua","span":{"start":11605,"start_line":349,"start_column":0,"end":11608,"end_line":349,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}
...

Something similar to errorsRoot I guess, but jsonLines: true|false.

Footnotes

  1. https://jsonlines.org/

  2. https://github.com/Kampfkarren/selene

@iamcco iamcco added the help wanted Extra attention is needed label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants