-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checks
binding.irb
call by Lint/Debugger
cop
From Ruby 2.4, `binding.irb` will be added. This method is like `binding.pry`. For example ```sh $ cat test.rb require 'irb' foo = 1 binding.irb $ ruby test.rb irb(main):001:0> foo => 1 irb(main):002:0> ``` This PR adds detection of `binding.irb` as a debugger. For example ```sh $ rubocop Inspecting 1 file W Offenses: test.rb:4:1: W: Remove debugger entry point binding.irb. binding.irb ^^^^^^^^^^^ 1 file inspected, 1 offenses detected ``` The check works only Ruby 2.4 or higher.
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters