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
RuboCop catches Lint/Debugger offenses across all code in a file.
Offenses inside a lambda which is being assigned to a field on an object are not found.
In the following file, Rubocop finds a Lint/Debugger offense on line 3, but none on line 4:
# frozen_string_literal: true binding.pry x.y = -> { binding.pry }
In this file, it's able to find both offenses:
# frozen_string_literal: true binding.pry x = -> { binding.pry }
1.53.1 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.1.3) [arm64-darwin22]
The text was updated successfully, but these errors were encountered:
Lint/Debugger
[Fix rubocop#12005] Fix a false negative for Lint/Debugger
2887f46
Fixes rubocop#12005. This PR fixes a false negative for `Lint/Debugger` when using debugger method inside lambda.
[Fix #12005] Fix a false negative for Lint/Debugger
2a606c4
Fixes #12005. This PR fixes a false negative for `Lint/Debugger` when using debugger method inside lambda.
Successfully merging a pull request may close this issue.
Expected behavior
RuboCop catches Lint/Debugger offenses across all code in a file.
Actual behavior
Offenses inside a lambda which is being assigned to a field on an object are not found.
Steps to reproduce the problem
In the following file, Rubocop finds a Lint/Debugger offense on line 3, but none on line 4:
In this file, it's able to find both offenses:
RuboCop version
The text was updated successfully, but these errors were encountered: