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

Emacs formatter should not output multiple lines for parse errors #1801

Closed
sds opened this issue Apr 16, 2015 · 1 comment
Closed

Emacs formatter should not output multiple lines for parse errors #1801

sds opened this issue Apr 16, 2015 · 1 comment

Comments

@sds
Copy link
Contributor

sds commented Apr 16, 2015

If you are running parser 2.2.0.4 or 2.2.2.0, running rubocop --format=emacs against the following results in a single error that spans multiple lines:

(/
   world # Some comment containing a )
/x)
~/src/test.rb:1:2: E: unmatched close parenthesis: /
   world # Some comment containing a )
/

I've filed whitequark/parser#190 with the parser gem for the parsing problem, but it seems like Rubocop shouldn't ever have error messages that span multiple lines when using --format=emacs? Or are my expectations not valid here?

@jonas054
Copy link
Collaborator

I think they are valid and that it wouldn't hurt to remove line breaks from Parser's diagnostic messages before outputting them, just in case there are any.

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