-
Notifications
You must be signed in to change notification settings - Fork 8
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
flycheck-coala.el: json -> format output #16
Conversation
flycheck-coala.el
Outdated
:command ("coala" "--json" "--find-config" "--files" source) | ||
:error-parser flycheck-coala-parse-json | ||
:command ("coala" "--format" "{line}:{column}:{severity}:{message}" "--find-config" "--files" source) | ||
:error-patterns ((error (or "None" line) ":" (or "None" column) ":" (any "03") ":" (message)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 03 and not 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if 03 for a reason this needs a comment IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not use numerical error codes any more, see below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @fleimgruber :) Thanks for the PR! Always great to see other Emacs enthusiasts in the coala community... I am only wondering about some little things ;)
flycheck-coala.el
Outdated
:command ("coala" "--json" "--find-config" "--files" source) | ||
:error-parser flycheck-coala-parse-json | ||
:command ("coala" "--format" "{line}:{column}:{severity}:{message}" "--find-config" "--files" source) | ||
:error-patterns ((error (or "None" line) ":" (or "None" column) ":" (any "03") ":" (message)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can there really be severity 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not use numerical error codes any more, see below.
flycheck-coala.el
Outdated
:error-parser flycheck-coala-parse-json | ||
:command ("coala" "--format" "{line}:{column}:{severity}:{message}" "--find-config" "--files" source) | ||
:error-patterns ((error (or "None" line) ":" (or "None" column) ":" (any "03") ":" (message)) | ||
(warning (or "None" line) ":" (or "None" column) ":" (any "2") ":" (message)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
":2:"
should be enough instead of using (any "...")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dito
The ``--format`` option is more robust than the ``--json`` option when logging output is mixed with the output of ``:command``; ``json-read-from-string`` breaks in this case. Fixes coala#15
b94c111
to
a9253f1
Compare
Thanks for your comments! I changed this to use |
ack a9253f1 |
@rultor merge |
@userzimmermann OK, I'll try to merge now. You can check the progress of the merge here |
@fleimgruber Now create the PR for #11 :) |
@userzimmermann Done! FYI, the full log is here (took me 2min) |
The
--format
option is more robust than the--json
option whenlogging output is mixed with the output of
:command
;json-read-from-string
breaks in this case.Fixes #15