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
Lint/Debugger does not catch require "debug/start" #12721
Comments
I debated adding requires like `debug` or `pry` but believe that would do more harm than good. RuboCops own spec_helper requires pry. This seems to come from some sort of template.
I debated adding requires like `debug` or `pry` but believe that would do more harm than good. RuboCops own spec_helper requires pry. This seems to come from some sort of template.
|
Follow up rubocop#12721 (comment). This PR excludes `debug/open_nonstop` from `Lint/Debugger` by default.
@koic Thank you very much 🙌 |
There is a feature in the debug gem where you can require the gem and enter the debugger in a single statement. I don't think other debuggers have this so it is being missed by the
Lint/Debugger
cop.The feature allows the following statements to start a debugger:
I don't think we want any of these to accidentally make it to production.
Expected behavior
Lint/Debugger
should complain about this code, since it is a debugger breakpoint the same way as puttingdebugger
in your code is:Actual behavior
1 file inspected, no offenses detected
Steps to reproduce the problem
Put
require "debug/start"
in your code.$ rubocop
Attempted workaround
This has no effect:
I would assume this cop configuration does not support checking for the specific argument to require. Maybe I'm missing something?
RuboCop version
and
The text was updated successfully, but these errors were encountered: