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

--linewise output-format with filename:line(:column)?:(warning|info|error): message #7

Open
unhammer opened this issue Jan 4, 2024 · 2 comments

Comments

@unhammer
Copy link
Member

unhammer commented Jan 4, 2024

This would let e.g. M-x compile Just Work in Emacs, and is also easier to parse with scripts and such than the default human-readable section-per-file-output.

E.g. instead of

$ ~/.local/bin/apertium-lint
apertium-nno.nno.dix
Warning (repeat-entry) on line 18186: Stem "inntil" appears more than once with paradigm fordi__cnjsub. First use on line 18171.
Warning (repeat-entry) on line 20967: Stem "framtidsplanane" appears more than once with paradigm dagevis__adv. First use on line 19698.
Warning (repeat-entry) on line 21496: Stem "ss" appears more than once with paradigm dagevis__adv. First use on line 21495.
Warning (wrong-stem) on line 21847: Stem is "båndl", but based on paradigm name, should be "bandl". lm: bandlegge stem: båndl par: l/egge__vblex_adj
./dev/genitive-prepositions-new-unmerged.t1x
Error (invalid-xml) on line 2267: Invalid XML: Extra content at the end of the document, line 2267, column 1.

we'd have

$ ~/.local/bin/apertium-lint 
apertium-nno.nno.dix:18186: warning: (repeat-entry) Stem "inntil" appears more than once with paradigm fordi__cnjsub. First use on line 18171.
apertium-nno.nno.dix:20967: warning: (repeat-entry) Stem "framtidsplanane" appears more than once with paradigm dagevis__adv. First use on line 19698.
apertium-nno.nno.dix:21496: warning: (repeat-entry) Stem "ss" appears more than once with paradigm dagevis__adv. First use on line 21495.
apertium-nno.nno.dix:21847: warning: (wong-stem) Stem is "båndl", but based on paradigm name, should be "bandl". lm: bandlegge stem: båndl par: l/egge__vblex_adj
./dev/genitive-prepositions-new-unmerged.t1x:2267:1: error: (invalid-xml) Extra content at the end of the document.

(This would match the gnu format built in with compilation-error-regexp-alist-alist in Emacs, but also fits with the output of many other compilers and linters.)

@mr-martian
Copy link
Collaborator

If the error description contains linebreaks, does that cause any problems? A few of the lexd messages do that. If that's not a problem, I've got the change implemented and ready to push.

@unhammer
Copy link
Member Author

unhammer commented Jan 4, 2024

Well, in the Emacs case it just won't match past the first line, giving a shorter tooltip when you hover your mouse … I'd say push and deal with such details later :)

mr-martian added a commit that referenced this issue Jan 5, 2024
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

2 participants