You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixesrubocop#10084.
This PR adds new `Lint/RequireRelativeSelfPath` cop.
It checks for uses of `require_relative` with self file path argument.
```ruby
# bad
# foo.rb
require_relative 'foo'
require_relative 'bar'
# good
# foo.rb
require_relative 'bar'
```
Fixes#10084.
This PR adds new `Lint/RequireRelativeSelfPath` cop.
It checks for uses of `require_relative` with self file path argument.
```ruby
# bad
# foo.rb
require_relative 'foo'
require_relative 'bar'
# good
# foo.rb
require_relative 'bar'
```
Is your feature request related to a problem? Please describe.
This code in file
my_class.rb
Describe the solution you'd like
require_relative 'my_class'
is completely useless (require itself) - rubocop should mark it as bad smellAdditional context
The text was updated successfully, but these errors were encountered: