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

Output format json: Array of message objects, not message objects separated by newline #150

Open
koppor opened this issue Jan 29, 2025 · 0 comments

Comments

@koppor
Copy link

koppor commented Jan 29, 2025

I am using the CLI tool

Input:

e102.tex:11:1: error E102 expl3 control sequences in non-exp13 parts
e102.tex:12:3: error E102 expl3 control sequences in non-expt3 parts
e102.tex:9:1: warning W101 unexpected delimiters

I do

errorformat -w jsonl  "%f:%l:%c: %m" < errors.txt

I get

{"filename":"e102.tex","lnum":11,"end_lnum":0,"col":1,"end_col":0,"vcol":false,"nr":0,"pattern":"","text":"error E102 expl3 control sequences in non-exp13 parts","type":0,"valid":true,"lines":["e102.tex:11:1: error E102 expl3 control sequences in non-exp13 parts"]}
{"filename":"e102.tex","lnum":12,"end_lnum":0,"col":3,"end_col":0,"vcol":false,"nr":0,"pattern":"","text":"error E102 expl3 control sequences in non-expt3 parts","type":0,"valid":true,"lines":["e102.tex:12:3: error E102 expl3 control sequences in non-expt3 parts"]}
{"filename":"e102.tex","lnum":9,"end_lnum":0,"col":1,"end_col":0,"vcol":false,"nr":0,"pattern":"","text":"warning W101 unexpected delimiters","type":0,"valid":true,"lines":["e102.tex:9:1: warning W101 unexpected delimiters"]}

I was expecting a JSON array as in the web playground.

[
{"filename":"e102.tex","lnum":11,"end_lnum":0,"col":1,"end_col":0,"vcol":false,"nr":0,"pattern":"","text":"error E102 expl3 control sequences in non-exp13 parts","type":0,"valid":true,"lines":["e102.tex:11:1: error E102 expl3 control sequences in non-exp13 parts"]},
{"filename":"e102.tex","lnum":12,"end_lnum":0,"col":3,"end_col":0,"vcol":false,"nr":0,"pattern":"","text":"error E102 expl3 control sequences in non-expt3 parts","type":0,"valid":true,"lines":["e102.tex:12:3: error E102 expl3 control sequences in non-expt3 parts"]},
{"filename":"e102.tex","lnum":9,"end_lnum":0,"col":1,"end_col":0,"vcol":false,"nr":0,"pattern":"","text":"warning W101 unexpected delimiters","type":0,"valid":true,"lines":["e102.tex:9:1: warning W101 unexpected delimiters"]}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant