Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…nd `Style/Not`. Prevent conflict problem like below: file: ``` x.select { |y| not y.z } ``` auto-correct: ``` $ bundle exec rubocop -a c.rb --only Style/InverseMethods,Style/Not Inspecting 1 file C Offenses: c.rb:1:1: C: [Corrected] Style/InverseMethods: Use reject instead of inverting select. x.select { |y| not y.z } ^^^^^^^^^^^^^^^^^^^^^^^^ c.rb:1:1: C: [Corrected] Style/InverseMethods: Use select instead of inverting reject. x.reject { |y| !y.z } ^^^^^^^^^^^^^^^^^^^^^ c.rb:1:16: C: [Corrected] Style/Not: Use ! instead of not. x.select { |y| not y.z } ^^^ 1 file inspected, 3 offenses detected, 3 offenses corrected ``` corrected badly: ``` x.select { |y| y.z } ```
- Loading branch information
1 parent
1c0dd05
commit 43755df
Showing
3 changed files
with
20 additions
and
0 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