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::EnforceSuperclassbeing redefined. (@davidrunger)
RuboCop Rails v2.30.3
Bug fixes
- #1458: Fix a false positive for
Rails/RelativeDateConstantwhen assigning a lambda/proc with numblock. (@earlopain) - #1457: Fix a false positive for
Rails/ReversibleMigrationindrop_tablewith numblock. (@earlopain) - #1456: Fix a false positive for
Rails/CreateTableWithTimestampswith numblocks. (@earlopain) - #1459: Fix a false positive for
Rails/UniqBeforePluckwhen using a numblock withuniq. (@earlopain) - #1455: Make
Rails/SaveBangaware of numblocks. (@earlopain) - #1453: Make
Rails/TransactionExitStatementaware of numblocks. (@earlopain)
Changes
- #1179:
Rails/ReflectionClassName: Accept method calls on local variables. (@exterm) - #1385: Make
Lint/UselessAccessModifieraware ofActiveSupport::ConcernandModule#concerning/Module#concerncore extensions. (@earlopain) - #1454: Disable
Rails/Delegatefor controllers. (@earlopain)
RuboCop Rails 2.30.2
Bug fixes
- #1447: Fix false positive for
Rails/LexicallyScopedActionFilterwhen action methods are delegated. (@vlad-pisanov) - #1446: Fix false positives for
Rails/Delegatewhenmodule_functionis used. (@ydakuka) - #1427: Fix an error for
Rails/UniqBeforePluckwhenpluckanduniqueare on different lines. (@earlopain)
RuboCop Rails 2.30.1
RuboCop Rails 2.30.0
New features
Bug fixes
- #1071: Fix
Rails/FilePathcop to correctly handleFile.joinwith variables and ignore leading and multiple slashes in string literal arguments forRails.root.joinandFile.join. (@ydakuka) - #912: Enhance
Rails/Delegateby 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/StrongParametersExpectwhen usingpermitwith no arguments. (@koic) - #1417: Fix an incorrect autocorrect for
Rails/StrongParametersExpectwhen using a leading dot multiline call torequirewithpermit. (@koic) - #1356: Enhance
Rails/DuplicateAssociationto handle alias. (@ydakuka) - #1389: Handle
TypeErrorcaused by passing array literals as arguments toFilemethods inRails/FilePathcop. (@ydakuka) - #1389: Handle
TypeErrorcaused by passing array literals as arguments toFilemethods inRails/RootPathnameMethodscop. (@ydakuka) - #1228: Enhance
Rails/SaveBangto properly handle instance variables. (@ydakuka)
RuboCop Rails 2.29.0
New features
- #1407: Add new
Rails/MultipleRoutePathscop. (@koic) - #1358: Add new
Rails/StrongParametersExpectcop. (@koic)
Bug fixes
- #1409: Fix an error for
Rails/ReversibleMigrationwhen callingdrop_tablewithout any arguments. (@earlopain) - #1397: Fix an incorrect autocorrect for
Rails/TimeZonewhen Time.new has a string argument. (@mterada1228) - #1406: Fix autocorrection for
Rails/IndexByandRails/IndexWithwhenmap { ... }.to_his enclosed in another block. (@franzliedke, @eugeneius) - #1404: Update
Rails/IndexByandRails/IndexWithto support numbered block parameters. (@eugeneius) - #1405: Fix autocorrection for
Rails/IndexWithwhen the value is a hash literal without braces. (@koic, @eugeneius) - #1414: Fix
Rails/HttpPositionalArgumentscop false positives with arguments forwarding. (@viralpraxis)
Changes
RuboCop Rails 2.28.0
New features
Bug fixes
- #1390: Fix an incorrect autocorrect for
Rails/SelectMapwhenselecthas no receiver and method chains are used. (@masato-bkn) - #1382: Fix false negatives for
Rails/RedundantActiveRecordAllMethodwhen usingallmethod in block. (@masato-bkn) - #1397: Fix
Rails/FilePathcop error onjoinmethod with implicit receiver. (@viralpraxis) - #1398: Fix
Rails/FilePathcop error in case of extra operations inRails.rootinterpolation. (@viralpraxis) - #1392: Fix
Rails/FilePathcop error with rescuedRails.root. (@viralpraxis)
Changes
- #1388: Modify
Rails/Pluckto ignoremap/collectwhen used inside blocks to prevent potential N+1 queries. (@masato-bkn)
RuboCop Rails 2.27.0
Bug fixes
- #1377: Fix an error for
Rails/EnumSyntaxwhen positional arguments are used and options are not passed as keyword arguments. (@koic) - #1367: Fix
Rails/TimeZoneshould not report offense onString#to_timewith timezone specifier. (@armandmgt)
Changes
- #727: Disable
Rails/TransactionExitStatementon Rails >= 7.2. (@earlopain) - #1374: Change
Rails/EnvLocalto handle negated conditions. (@fatkodima) - #1195: Change
Rails/SelectMapto handle safe navigation operators. (@fatkodima)
RuboCop Rails 2.26.2
Bug fixes
- #1362: Fix false positives for
Rails/EnumSyntaxwhen using Ruby 2.7. (@koic) - #1269: Fix false positives for
Rails/ActionControllerFlashBeforeRenderin combination with implicit returns. (@earlopain) - #1326: Fix wrong autocorrect for
Rails/FilePathwhen passing an array toFile.join. (@earlopain)
Changes
- #1359: Support
filterinRails/CompactBlank. (@masato-bkn)