Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
RuboCop Rails v2.31.0
New features
Bug fixes
- #1465: Avoid warnings about methods of
RuboCop::Cop::EnforceSuperclass
being redefined. (@davidrunger)
RuboCop Rails v2.30.3
Bug fixes
- #1458: Fix a false positive for
Rails/RelativeDateConstant
when assigning a lambda/proc with numblock. (@earlopain) - #1457: Fix a false positive for
Rails/ReversibleMigration
indrop_table
with numblock. (@earlopain) - #1456: Fix a false positive for
Rails/CreateTableWithTimestamps
with numblocks. (@earlopain) - #1459: Fix a false positive for
Rails/UniqBeforePluck
when using a numblock withuniq
. (@earlopain) - #1455: Make
Rails/SaveBang
aware of numblocks. (@earlopain) - #1453: Make
Rails/TransactionExitStatement
aware of numblocks. (@earlopain)
Changes
- #1179:
Rails/ReflectionClassName
: Accept method calls on local variables. (@exterm) - #1385: Make
Lint/UselessAccessModifier
aware ofActiveSupport::Concern
andModule#concerning
/Module#concern
core extensions. (@earlopain) - #1454: Disable
Rails/Delegate
for controllers. (@earlopain)
RuboCop Rails 2.30.2
Bug fixes
- #1447: Fix false positive for
Rails/LexicallyScopedActionFilter
when action methods are delegated. (@vlad-pisanov) - #1446: Fix false positives for
Rails/Delegate
whenmodule_function
is used. (@ydakuka) - #1427: Fix an error for
Rails/UniqBeforePluck
whenpluck
andunique
are on different lines. (@earlopain)
RuboCop Rails 2.30.1
RuboCop Rails 2.30.0
New features
Bug fixes
- #1071: Fix
Rails/FilePath
cop to correctly handleFile.join
with variables and ignore leading and multiple slashes in string literal arguments forRails.root.join
andFile.join
. (@ydakuka) - #912: Enhance
Rails/Delegate
by adding delegation detection forself.class
, constants, class variables, global variables, and instance variables. (@ydakuka)
RuboCop Rails 2.29.1
Bug fixes
- #1423: Fix an error for
Rails/StrongParametersExpect
when usingpermit
with no arguments. (@koic) - #1417: Fix an incorrect autocorrect for
Rails/StrongParametersExpect
when using a leading dot multiline call torequire
withpermit
. (@koic) - #1356: Enhance
Rails/DuplicateAssociation
to handle alias. (@ydakuka) - #1389: Handle
TypeError
caused by passing array literals as arguments toFile
methods inRails/FilePath
cop. (@ydakuka) - #1389: Handle
TypeError
caused by passing array literals as arguments toFile
methods inRails/RootPathnameMethods
cop. (@ydakuka) - #1228: Enhance
Rails/SaveBang
to properly handle instance variables. (@ydakuka)
RuboCop Rails 2.29.0
New features
- #1407: Add new
Rails/MultipleRoutePaths
cop. (@koic) - #1358: Add new
Rails/StrongParametersExpect
cop. (@koic)
Bug fixes
- #1409: Fix an error for
Rails/ReversibleMigration
when callingdrop_table
without any arguments. (@earlopain) - #1397: Fix an incorrect autocorrect for
Rails/TimeZone
when Time.new has a string argument. (@mterada1228) - #1406: Fix autocorrection for
Rails/IndexBy
andRails/IndexWith
whenmap { ... }.to_h
is enclosed in another block. (@franzliedke, @eugeneius) - #1404: Update
Rails/IndexBy
andRails/IndexWith
to support numbered block parameters. (@eugeneius) - #1405: Fix autocorrection for
Rails/IndexWith
when the value is a hash literal without braces. (@koic, @eugeneius) - #1414: Fix
Rails/HttpPositionalArguments
cop false positives with arguments forwarding. (@viralpraxis)
Changes
RuboCop Rails 2.28.0
New features
Bug fixes
- #1390: Fix an incorrect autocorrect for
Rails/SelectMap
whenselect
has no receiver and method chains are used. (@masato-bkn) - #1382: Fix false negatives for
Rails/RedundantActiveRecordAllMethod
when usingall
method in block. (@masato-bkn) - #1397: Fix
Rails/FilePath
cop error onjoin
method with implicit receiver. (@viralpraxis) - #1398: Fix
Rails/FilePath
cop error in case of extra operations inRails.root
interpolation. (@viralpraxis) - #1392: Fix
Rails/FilePath
cop error with rescuedRails.root
. (@viralpraxis)
Changes
- #1388: Modify
Rails/Pluck
to ignoremap/collect
when used inside blocks to prevent potential N+1 queries. (@masato-bkn)
RuboCop Rails 2.27.0
Bug fixes
- #1377: Fix an error for
Rails/EnumSyntax
when positional arguments are used and options are not passed as keyword arguments. (@koic) - #1367: Fix
Rails/TimeZone
should not report offense onString#to_time
with timezone specifier. (@armandmgt)
Changes
- #727: Disable
Rails/TransactionExitStatement
on Rails >= 7.2. (@earlopain) - #1374: Change
Rails/EnvLocal
to handle negated conditions. (@fatkodima) - #1195: Change
Rails/SelectMap
to handle safe navigation operators. (@fatkodima)
RuboCop Rails 2.26.2
Bug fixes
- #1362: Fix false positives for
Rails/EnumSyntax
when using Ruby 2.7. (@koic) - #1269: Fix false positives for
Rails/ActionControllerFlashBeforeRender
in combination with implicit returns. (@earlopain) - #1326: Fix wrong autocorrect for
Rails/FilePath
when passing an array toFile.join
. (@earlopain)
Changes
- #1359: Support
filter
inRails/CompactBlank
. (@masato-bkn)