-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
More bugs in FormatParameterMismatch cop #2116
Comments
I also found this one, which generates the error
Here's a failing spec for it:
|
There were some backwards incompatible changes that caused new offenses to be triggered on CI, which in turn causes PRs to fail for reasons unrelated to the code they're changing. I was going to fix the new offenses, but one of them is actually triggered by a bug in the rubocop library (see rubocop/rubocop#2116), so this turned out to require more time than I could spare for it today.
thank you for the spec. Working on a fix. On Sat, Aug 8, 2015 at 3:43 PM Katrina Owen notifications@github.com
|
@bbatsov, any ideas on how to deal with this one in particular? On Mon, Aug 10, 2015 at 10:10 AM Eduardo Dominguez eduardodmz@gmail.com
|
The first case can be handled, although I'm guessing it will require a lot of work. The second should simply be ignored. |
I think I have fixes for all reported issues. How urgent are these? I would like to test a bit more if possible. On Mon, Aug 10, 2015 at 10:14 AM Bozhidar Batsov notifications@github.com
|
Not super urgent, so feel free to do as much testing as needed. |
If you push your branch, I will happily run it against my project's code base. |
@bquorning thank you, will do! |
@bquorning My branch with the fixes is here: https://github.com/edmz/rubocop/tree/fix_params_mismatch_bug Its not yet in shape for a PR, I just wanted to accept your offer to test it :) |
Using your branch, I’m still getting one warning – when using a heredoc. Test file: # encoding: utf-8
puts <<-TXT % { bar: 42 }
foo %{bar} baz
TXT |
@bbatsov could you help me? I don't know how to detect a heredoc. I tried searching other cops for an example but failed to find one, On Mon, Aug 10, 2015 at 1:43 PM Benjamin Quorning notifications@github.com
|
@bbatsov ping :) On Monday, August 10, 2015, Eduardo Dominguez eduardodmz@gmail.com wrote:
Eduardo |
A heredoc is just a string as far as the parser is concerned, so you can inspect |
I have that fixed too On Friday, August 14, 2015, Bozhidar Batsov notifications@github.com
Eduardo |
@bquorning If you have the time and willingness, could you try my latest patch? Thanks in advance |
@edmz I tried your branch, and don’t see any offenses when running RuboCop against my code. |
I ran it against mine and was still seeing the warnings for
(I wasn't sure if it was expected to be fixed, so I just wanted to comment, in case). |
@kytrinyx thanks for your input, I will check that case. |
@kytrinyx I just checked the following case: 'test_%s' % description.gsub(/[ -]/, '_') and the only offense for that line is:
Did you apply the latest PR? That said, this could be something on my side that I am not seeing. |
Ah, latest PR--I thought it had been merged, and tested against master. I'll test again, thanks! |
@kytrinyx did you have a chance to test it against your code? :) |
Sorry, things got out of hand. Yes, I have now tested it! (drumroll) |
@edmz
It looks like #2112 fixes the bug I reported in #2110, so now I noticed another two bugs:
This is on the latest master, including https://github.com/bbatsov/rubocop/pull/2112.patch. I’m sorry I didn’t notice these bugs previously.
The text was updated successfully, but these errors were encountered: