🤖 Enable new cops introduced since `Rubocop v1.2`
Also enable Rails
and Performance
related cops.
New enabled cops:
-
Layout/SpaceBeforeBrackets (new in 1.7)
-
Lint/AmbiguousAssignment (new in 1.7)
-
Lint/DeprecatedConstants (new in 1.8)
-
Lint/DuplicateBranch (new in 1.3)
-
Lint/EmptyClass (new in 1.3)
-
Lint/LambdaWithoutLiteralBlock (new in 1.8)
-
Lint/RedundantDirGlobSort (new in 1.8)
-
Lint/UnexpectedBlockArity (new in 1.5)
-
Style/EndlessMethod (new in 1.8)
-
Style/HashExcept (new in 1.7) => NOTE: this cop is
disabled
because it is only targettingruby 3.0+
-
Style/NilLambda (new in 1.3)
-
Style/RedundantArgument (new in 1.4)
-
Performance/BlockGivenWithExplicitBlock (new in 1.9)
-
Performance/CollectionLiteralInLoop (new in 1.8)
-
Performance/ConstantRegexp (new in 1.9)
-
Performance/MethodObjectAsBlock (new in 1.9)
-
Rails/AttributeDefaultBlockValue (new in 2.9)
-
Rails/WhereEquals (new in 2.9)