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:
Javi Martín
2019-09-28 21:17:51 +02:00
parent d6eb9f8fb6
commit 2fed7b9db3
2 changed files with 5 additions and 2 deletions

View File

@@ -117,6 +117,9 @@ Layout/TrailingBlankLines:
Layout/TrailingWhitespace:
Enabled: true
Lint/AmbiguousRegexpLiteral:
Enabled: true
Lint/LiteralAsCondition:
Enabled: true