Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
RuboCop Rails 2.26.1
Bug fixes
- #1343: Fix false negatives for
Rails/EnumSyntaxfor non-literal mappings. (@earlopain) - #1340: Fix a false positive for
Rails/WhereEquals,Rails/WhereNot, andRails/WhereRangewhen qualifying the database name. (@earlopain)
Changes
- #1342: Change
Rails/ApplicationRecordto ignore migrations. (@fatkodima) - #1350: Change
Rails/EnumSyntaxto autocorrect underscored options. (@fatkodima)
RuboCop Rails 2.26.0
New features
- #1238: Add new
Rails/EnumSyntaxcop. (@maxprokopiev, @koic) - #1309: Support Rails 7 syntax for
Rails/EnumHashcop. (@ytjmt) - #1298: Support Rails 7 syntax for
Rails/EnumUniquenesscop. (@ytjmt)
Bug fixes
- #1335: Fix an error for
Rails/BulkChangeTablewhen the block forchange_tableis empty. (@earlopain) - #1325: Fix an error for
Rails/RenderPlainTextwhen the content type is passed as a constant. (@earlopain) - #1337: Fix an error for
Rails/Validationwhen passing no arguments. (@earlopain) - #1330: Fix an error for
Rails/WhereNotwhen using placeholder without second argument. (@earlopain) - #1311: Fix false negatives for
Rails/ActionControllerFlashBeforeRenderwhen using implicit render or rescue blocks. (@tldn0718) - #1313: Fix false positives for
Rails/CompactBlankwhen usingcollection.reject!. (@koic) - #1319: Fix a false positive for
Rails/RedundantPresenceValidationOnBelongsTowhen removingpresencewould leave other non-validation options likeallow_blankwithout validations. (@earlopain) - #1306: Make
Rails/PluralizationGrammaraware of byte methods. (@earlopain) - #1302: Allow
paramsreceiver by default forStyle/CollectionMethods. (@koic) - #1321: Fix an error for
Rails/WhereEqualswhen the second argument is not yet typed (where("foo = ?", )). (@earlopain)
Changes
- #1308: Change
Rails/CompactBlankto handleselect(&:present?). (@fatkodima) - #1303: Change
Rails/IgnoredSkipActionFilterOptionto handle multiple callbacks. (@fatkodima) - #1199: Make
Rails/WhereEqualsaware ofwhere.not(...). (@earlopain) - #1003: Change
Rails/RootPathnameMethodsto detect offenses onDir.[]. (@r7kamura)
RuboCop Rails 2.25.1
Bug fixes
- #1280: Look for change_column_null for
Rails/BulkChangeTable. (@ccutrer) - #1299: Fix an error for
Rails/NotNullColumnwhen the block forchange_tableis empty. (@earlopain) - #1281: Fix
Rails/WhereRangeautocorrect for complex expressions. (@fatkodima) - #1282: Fix
Rails/WhereRangeto correctly handle template strings with extra spaces. (@fatkodima)
Changes
- #1295: Cover validates_comparison_of in
Rails/Validation. (@ChaelCodes) - #1288: Let
Rails/LinkToBlanklook intolink_to_ifandlink_to_unless, too. (@fwolfst) - #1286: Mark
Rails/SkipsModelValidationsas unsafe. (@koic) - #1283: Mark
Rails/WhereRangeas unsafe autocorrect. (@fatkodima)
RuboCop Rails 2.25.0
New features
- #1272: Add new
Rails/WhereRangecop. (@fatkodima)
Bug fixes
- #1270: Fix an incorrect autocorrect for
Rails/Validationwhen usingvalidates_size_of. (@koic) - #1278: Fix a false positive for
Rails/SkipsModelValidationswhen usinginsertorinsert!with a safe navigator. (@tldn0718) - #1260: Fix a performance regression caused by
Rails/UnknownEnvwhen using Rails 7.1. (@lukasfroehlich1)
Changes
- #1249: Disable
Rails/UnusedIgnoredColumnsby default. (@earlopain) - #1266: Check
change_tablecalls for offenses. (@ccutrer) - #1267: Make
Rails/HttpStatusaware of Rails-specific response assertions. (@tldn0718) - #1137: Migrate to
TargetRailsVersionthe newrequires_gemAPI. (@amomchilov)
RuboCop Rails 2.24.1
Bug fixes
- #1244: Fix a false positive for
Rails/ActionControllerFlashBeforeRenderwhen returningredirect_to. (@earlopain) - #1255: Fix an error for
Rails/UniqBeforePluckwithEnforcedStyle: aggressivewhen no receiver. (@earlopain) - #1247: Fix an error for
Rails/UnusedIgnoredColumnswhen without tables in db/schema.rb. (@koic) - #1253: Fix an error for
Rails/WhereMissingwith leadingwherewithout receiver. (@earlopain) - #1254: Fix an error for
Rails/ExpandedDateRangewhen passing an argument only to the first method call for weeks. (@earlopain) - #1256: Fix an error for
Rails/ActiveSupportOnLoadwhen calling without arguments. (@earlopain) - #1230: Fix a false positive for
Rails/SaveBangifpersisted?is checked on parenthesised expression. (@earlopain) - #1200: Make
Rails/TimeZoneaware of safe navigation. (@earlopain)
Changes
- #1257: Add Rails 7.1 load hooks and
active_record_sqlite3adaptertoRails/ActiveSupportOnLoad. (@earlopain)
RuboCop Rails 2.24.0
New features
Bug fixes
- #1234: Fix an incorrect autocorrect for
Rails/FindBywhen using multi-line leading dot method calls. (@ymap) - #1241: Fix an error for
Rails/WhereExistswithEnforcedStyle: whereand implicit receivers. (@earlopain)
Changes
- #1229: Make
Rails/EnvironmentVariableAccessaware of initializers. (@markokajzer) - #1231: Remove
object_idfromRails/DangerousColumnNamestargets. (@r7kamura)
RuboCop Rails 2.23.1
Bug fixes
- #1221: Fix an exception in
Rails/WhereNotwhen calling.whereon an implicit receiver (e.g. inside model code). (@bquorning)
RuboCop Rails 2.23.0 (The RubyConf Taiwan 2023 Edition)
New features
- #1183: Support PostGIS adapter for PostgreSQL. (@Dania02525)
Bug fixes
- #1206: Fix an error for
Rails/WhereMissingwhere join method is called without arguments. (@fatkodima) - #1189: Fix false negatives for
Rails/Pluckwhen using safe navigation method calls. (@koic) - #1204: Make
Rails/ActiveSupportAliases,Rails/FindBy,Rails/FindById,Rails/Inquiry,Rails/PickRails/PluckId,Rails/PluckInWhere,Rails/WhereEquals,Rails/WhereExists, andRails/WhereNotcops aware of safe navigation operator. (@koic)
Changes
- #1213: Update
Rails/PluckInWhereto check for.idscall. (@fatkodima) - #1181: Support
Nokogiri::HTML.parseandNokogiri::HTML5.parseonRails/ResponseParsedBody. (@r7kamura) - #1198: Support
where.notforRails/PluckInWhere. (@fatkodima)
RuboCop Rails 2.22.2
Bug fixes
- #1172: Fix an error for
Rails/UnknownEnvwhen using Rails 7.1. (@koic) - #1173: Fix an error for
Rails/RedundantActiveRecordAllMethodcop when used with RuboCop 1.51 or lower. (@koic)
Changes
- #1171: Change
Rails/RedundantActiveRecordAllMethodto ignoredelete_allanddestroy_allwhen receiver is an association. (@masato-bkn) - #1178: Require RuboCop AST 1.30.0+. (@koic)