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 should not allow pry
#11658
Comments
From which library |
@dvandersluis It looks like the test added in the following PR. Do you remember why |
The I don’t remember specifically but the test was probably added to make sure methods defined in the config with receivers are not registered without them. |
Pry gem has It can be confirmed with the code below: require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'pry'
end
forty_two = 42
pry % ruby example.rb
[1] pry(main)> forty_two
=> 42 |
Fair enough! Generally people would use |
PR is here if someone wants to have a look :) #11669 |
Is your feature request related to a problem? Please describe.
Lint/Debugger is allowing
pry
. This is annoying because it should not go to production, and I would rather have it rejected, similary to a binding.pryDescribe the solution you'd like
Rubocop is unhappy when
pry
is in the codeDescribe alternatives you've considered
Additional context
I think a solution would be to include the
pry
keyword in the config : https://github.com/rubocop/rubocop/blob/master/config/default.yml#LL1654-L1661.If you're ok with this I can do a PR. It seems also, according to the tests, that it was left out on purpose. Is there a specific reason for it?
The text was updated successfully, but these errors were encountered: