Skip to content

Commit

Permalink
Merge pull request #38 from r7kamura/feature/redundant-existent
Browse files Browse the repository at this point in the history
Remove `Sevencop/RedundantExistenceCheck` cop
  • Loading branch information
r7kamura committed Sep 24, 2022
2 parents 9936f55 + b12dd28 commit 95022e1
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 329 deletions.
18 changes: 0 additions & 18 deletions README.md
Expand Up @@ -182,24 +182,6 @@ reorder('field(id, ?)', a)
reorder(Arel.sql('field(id, ?)'), a)
```

### Sevencop/RedundantExistenceCheck

Identifies redundant existent check before file operation.

```ruby
# bad
FileUtils.mkdir(a) unless FileTest.exist?(a)

# good
FileUtils.mkdir_p(a)

# bad
FileUtils.rm(a) if FileTest.exist?(a)

# good
FileUtils.rm_f(a)
```

### Sevencop/UniquenessValidatorExplicitCaseSensitivity

Identifies use of UniquenessValidator without :case_sensitive option.
Expand Down
7 changes: 0 additions & 7 deletions config/default.yml
Expand Up @@ -42,13 +42,6 @@ Sevencop/OrderField:
Safe: false
VersionAdded: '0.4'

Sevencop/RedundantExistenceCheck:
Description: |
Avoid redundant existent check before file operation.
Enabled: false
Safe: false
VersionAdded: '0.1'

Sevencop/ToSWithArgument:
Description: |
Identifies passing any argument to `#to_s`.
Expand Down
188 changes: 0 additions & 188 deletions lib/rubocop/cop/sevencop/redundant_existence_check.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/sevencop.rb
Expand Up @@ -10,7 +10,6 @@
require_relative 'rubocop/cop/sevencop/method_definition_keyword_arguments_ordered'
require_relative 'rubocop/cop/sevencop/method_definition_multiline_arguments'
require_relative 'rubocop/cop/sevencop/order_field'
require_relative 'rubocop/cop/sevencop/redundant_existence_check'
require_relative 'rubocop/cop/sevencop/to_s_with_argument'
require_relative 'rubocop/cop/sevencop/uniqueness_validator_explicit_case_sensitivity'
require_relative 'rubocop/cop/sevencop/where_not'
115 changes: 0 additions & 115 deletions spec/rubocop/cop/sevencop/redundant_existence_check_spec.rb

This file was deleted.

0 comments on commit 95022e1

Please sign in to comment.