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
The current implementation of Lint/Debbuger doesn't detect offenses inside begin / end blocks.
Lint/Debbuger
begin
end
I was able to reproduce this issue in this small reproducible example:
require 'byebug' byebug puts( begin byebug # This one is not detected "example" end )
I checked this with the latest version of RuboCop.
The expected behaviour for this case is to detect both offenses. The one at top level and the one inside the begin end block.
The current behaviour is that RuboCop only detects the one at top level.
Create a example.rb file with the previous mentioned content, and run RuboCop like this:
example.rb
bundle exec rubocop --only Lint/Debugger example.rb
Gemfile:
source "https://rubygems.org" gem 'byebug', '~> 11.1', '>= 11.1.3' gem 'rubocop', '1.57.2'
$ [bundle exec] rubocop -V 1.57.2 (using Parser 3.2.2.4, rubocop-ast 1.30.0, running on ruby 3.0.6) [x86_64-linux]
The text was updated successfully, but these errors were encountered:
[Fix rubocop#12372] Fix a false negative for Lint/Debugger
Lint/Debugger
9764366
Fixes rubocop#12372. This PR fixes a false negative for `Lint/Debugger` when used within method arguments a `begin`...`end` block.
[Fix #12372] Fix a false negative for Lint/Debugger
e312ea9
Fixes #12372. This PR fixes a false negative for `Lint/Debugger` when used within method arguments a `begin`...`end` block.
Awesome! Thank you so much for the quick response! You rock!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The current implementation of
Lint/Debbuger
doesn't detect offenses insidebegin
/end
blocks.I was able to reproduce this issue in this small reproducible example:
I checked this with the latest version of RuboCop.
Expected behavior
The expected behaviour for this case is to detect both offenses. The one at top level and the one inside the
begin
end
block.Actual behavior
The current behaviour is that RuboCop only detects the one at top level.
Steps to reproduce the problem
Create a
example.rb
file with the previous mentioned content, and run RuboCop like this:Gemfile:
RuboCop version
The text was updated successfully, but these errors were encountered: