Skip to content

Releases: rubocop/rubocop-rails

RuboCop Rails v2.33.3

13 Aug 15:19
Compare
Choose a tag to compare

Bug fixes

  • #1516: Fix wrong autocorrect for Rails/FindByOrAssignmentMemoization. (@earlopain)

RuboCop Rails v2.33.2

13 Aug 08:46
Compare
Choose a tag to compare

Bug fixes

  • #1488: Fix an error for Rails/ReadWriteAttribute with a frozen string attribute name. (@viralpraxis)

RuboCop Rails v2.33.1

11 Aug 22:52
Compare
Choose a tag to compare

Bug fixes

  • #1508: Fix an error for Rails/TransactionExitStatement when transaction is part of a method chain. (@earlopain)
  • #1510: Fix Rails/OrderArguments cop false positives when using column index argument. (@viralpraxis)
  • #1511: Don't register offenses for Rails/WhereExists when exists? is given multiple or splat arguments. (@lovro-bikic)

RuboCop Rails v2.33.0

10 Aug 03:27
Compare
Choose a tag to compare

New features

Bug fixes

  • #1497: Fix bugs in Rails/PluckId and Rails/PluckInWhere. (@r7kamura)
  • #1478: Fix a false negative for Rails/EnvLocal when having preceding conditions. (@fatkodima)
  • #1505: Fix false negatives for Rails/Pluck when map method call is used in a block without a receiver. (@koic)
  • #1486: Fix false positives for Rails/Output when p method is a DSL. (@koic)
  • #1495: Fix false positives for Rails/TransactionExitStatement when break is used in loop in transactions. (@koic)
  • #1483: Fix autocorrection error when Rails/IndexWith has nested offenses. (@lovro-bikic)

Changes

  • #1500: Exclude controllers and mailers from Lint/UselessMethodDefinition. (@r7kamura)
  • #1474: Make Rails/EnumSyntax include the lib directory by default. (@koic)
  • #1463: Mark Rails/IndexWith as unsafe autocorrect. (@tejasbubane)

RuboCop Rails v2.32.0

17 May 13:42
Compare
Choose a tag to compare

Bug fixes

  • #1475: Fix Rails/TimeZone cop error on invalid string literal encoding. (@viralpraxis)
  • #1477: Fix an error for Rails/SchemaComment when the comment is passed as a local variable. (@earlopain)

Changes

  • #234: Use globs that are compatible with Engine or Packwerk. (@tdeo)

RuboCop Rails v2.31.0

01 Apr 02:48
Compare
Choose a tag to compare

New features

  • #1471: Support it block parameter in Rails cops. (@koic)

Bug fixes

  • #1465: Avoid warnings about methods of RuboCop::Cop::EnforceSuperclass being redefined. (@davidrunger)

RuboCop Rails v2.30.3

03 Mar 03:07
Compare
Choose a tag to compare

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 in drop_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 with uniq. (@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 of ActiveSupport::Concern and Module#concerning/Module#concern core extensions. (@earlopain)
  • #1454: Disable Rails/Delegate for controllers. (@earlopain)

RuboCop Rails 2.30.2

24 Feb 08:00
Compare
Choose a tag to compare

Bug fixes

  • #1447: Fix false positive for Rails/LexicallyScopedActionFilter when action methods are delegated. (@vlad-pisanov)
  • #1446: Fix false positives for Rails/Delegate when module_function is used. (@ydakuka)
  • #1427: Fix an error for Rails/UniqBeforePluck when pluck and unique are on different lines. (@earlopain)

RuboCop Rails 2.30.1

17 Feb 07:18
Compare
Choose a tag to compare

Bug fixes

  • #1442: Fix an incorrect behavior when using AllCops: TargetRailsVersion. (@koic)
  • #1444: Fix an incorrect behavior when using AllCops: MigratedSchemaVersion. (@koic)

RuboCop Rails 2.30.0

15 Feb 16:53
Compare
Choose a tag to compare

New features

Bug fixes

  • #1071: Fix Rails/FilePath cop to correctly handle File.join with variables and ignore leading and multiple slashes in string literal arguments for Rails.root.join and File.join. (@ydakuka)
  • #912: Enhance Rails/Delegate by adding delegation detection for self.class, constants, class variables, global variables, and instance variables. (@ydakuka)