iamcco/diagnostic-languageserver

Support JSON lines output

Open

#87 geöffnet am 2. März 2023

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (30 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (437 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide