-
Notifications
You must be signed in to change notification settings - Fork 74
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
Fix for syntax error discarding #35
base: master
Are you sure you want to change the base?
Conversation
@mmozuras is this something you would want? Maybe this is not The Right Way™ but the syntax errors are not always mappable to patch changes 😞 |
27d777b
to
42f2d41
Compare
d2f2d09
to
43c6a67
Compare
43c6a67
to
c72a920
Compare
Offences with syntax error were dropped, now it is fixed by handling them. The return value of the method is the same as before but syntax error offences are included too if any exists.
Due to "undefined method `allow' for #<RSpec::XX>" this line had to be removed.
The functionality of one method was divided into two logically functioning parts. One method obtain offences and the other one inspects these offences.
New tests were added which are testing if any of syntactic error offences is dropped.
c72a920
to
c0e39a9
Compare
@europ sorry it's taken someone so long to get back to you. I'm open to accepting this change if you'd be willing to rebase and resolve conflicts 👌 @prontolabs/core any thoughts or objections? |
@skateman, looks good. If you would rebase, that would be excellent. (I am not a maintainer, just would like to see this in). |
Agreed, there should be a |
@skateman can you fix this? I am currently unavailable. |
I have no push rights to your repo... |
@skateman you have them, from now |
Any luck on rebasing this PR? I'm hoping to make a release soon with RuboCop >= 1.0 support. |
Just checking, is this mandatory / the fix for RuboCop 1.x? Or can there be another PR to get us to that version? |
@hlascelles the 0.11.1 release with 1.0 support has already happened; I guess this will be present in a followup release (0.11.2?). |
Ah, fantastic thank you! |
@europ would you be willing to rebase this PR? |
Hi @europ... Could you rebase this? |
The result of pronto-rubocop does not include syntactic errors.
Missing syntactic error in the result of pronto-rubocop was solved by mapping this error on the last element of the patch.
File containing syntax error:
Variable
offences
's value in methodinspect(patch)
in filelib/pronto/rubocop.rb
:https://github.com/prontolabs/pronto-rubocop/blob/master/lib/pronto/rubocop.rb#L38
before:
The syntactic error is missing in the result of the rubocop.
after:
The syntactic error message is assigned to the last element of patch variable.
Informations (version, platform, engine)
/cc
@skateman
@romanblanco