Add and apply AmbiguousRegexpLiteral rule
This is a very subtle behaviour: `match /attachment/i` could represent a regular expression, but it could also represent a division like `match / attachment / i`. So we need to make an exception to the usual way we omit parenthesis in RSpec expectations.
This commit is contained in:
@@ -117,6 +117,9 @@ Layout/TrailingBlankLines:
|
||||
Layout/TrailingWhitespace:
|
||||
Enabled: true
|
||||
|
||||
Lint/AmbiguousRegexpLiteral:
|
||||
Enabled: true
|
||||
|
||||
Lint/LiteralAsCondition:
|
||||
Enabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user