iamcco/diagnostic-languageserver

Support JSON lines output

Open

#87 opened on 2023年3月2日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)TypeScript (30 forks)github user discovery
help wanted

Repository metrics

Stars
 (437 stars)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド