We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When e.g.: binding.pry is inside a block, Lint/Debugger is failing to flag the issue.
binding.pry
Lint/Debugger
I would expect Lint/Debugger to always flag a code with binding.pry, regardless of where it is.
Lint/Debugger is not detecting binding.pry calls when they happen inside block.
Given:
def uri_escaped_path(uri) uri.path = uri.path.gsub(%r{[^/]+}) do |segment| binding.pry CGI.escape(segment.to_s.encode("UTF-8")).gsub("+", "%20").gsub("%7E", "~") end uri end
When I run rubocop --only Lint/Debugger, nothing is flagged.
rubocop --only Lint/Debugger
See:
$ rubocop -V 1.56.4 (using Parser 3.2.2.4, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-darwin22]
The text was updated successfully, but these errors were encountered:
Debugged a bit and I see this bug was introduced between 1.45.1 and 1.46.0.
Sorry, something went wrong.
[Fix rubocop#12244] Fix a false negative for Lint/Debugger
45fd435
Fixes rubocop#12244. This PR fixes a false negative for `Lint/Debugger` when using debugger method inside block.
[Fix #12244] Fix a false negative for Lint/Debugger
bd214bd
Fixes #12244. This PR fixes a false negative for `Lint/Debugger` when using debugger method inside block.
Successfully merging a pull request may close this issue.
When e.g.:
binding.pry
is inside a block,Lint/Debugger
is failing to flag the issue.Expected behavior
I would expect
Lint/Debugger
to always flag a code withbinding.pry
, regardless of where it is.Actual behavior
Lint/Debugger is not detecting
binding.pry
calls when they happen inside block.Steps to reproduce the problem
Given:
When I run
rubocop --only Lint/Debugger
, nothing is flagged.See:
RuboCop version
The text was updated successfully, but these errors were encountered: