Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
RuboCop Rails 2.8.0
New features
- #291: Add new
Rails/SquishedSQLHeredocscop. (@mobilutz) - #52: Add new
Rails/AfterCommitOverridecop. (@fatkodima) - #323: Add new
Rails/OrderByIdcop. (@fatkodima) - #274: Add new
Rails/WhereNotcop. (@fatkodima) - #311: Make
Rails/HelperInstanceVariableaware of memoization. (@koic) - #332: Fix
Rails/ReflectionClassNamecop false negative when relation had a scope parameter. (@bubaflub)
Bug fixes
- #315: Allow to use frozen scope for
Rails/UniqueValidationWithoutIndex. (@krim) - #313: Fix
Rails/ActiveRecordCallbacksOrderto preserve the original callback execution order. (@eugeneius) - #319: Fix a false positive for
Rails/Inquirywhen#inquiry's receiver is a variable. (@koic) - #327: Fix
Rails/ContentTagautocorrect to handle html5 tag names with hyphens. (@jaredmoody)
Changes
- #312: Mark
Rails/MailerNameas unsafe for auto-correct. (@eugeneius) - #294: Update
Rails/ReversibleMigrationto register offenses forremove_columnsandremove_index. (@philcoggins) - #310: Add
EnforcedStyletoRails/PluckInWhere. By default, it does not register an offense ifpluckmethod's receiver is a variable. (@koic) - #320: Mark
Rails/UniqBeforePluckas unsafe auto-correction. (@kunitoo) - #324: Make
Rails/IndexByandRails/IndexWithaware ofto_hwith block. (@eugeneius) - #341: Make
Rails/WhereExistsconfigurable to allowwhere(...).exists?to be the preferred style. (@dvandersluis)
RuboCop Rails 2.7.1
Bug fixes
- #297: Handle an upstream Ruby issue where the DidYouMean module is not available, which would break the
Rails/UnknownEnvcop. (@taylorthurlow) - #300: Fix
Rails/RenderInlineerror on variable key in render options. (@tejasbubane) - #305: Fix crash in
Rails/MatchRoutecop whenviaoption is a variable. (@tejasbubane)
Changes
RuboCop Rails 2.7.0
New features
- #283: Add new
Rails/FindByIdcop. (@fatkodima) - #285: Add new
Rails/ActiveRecordCallbacksOrdercop. (@fatkodima) - #276: Add new
Rails/RenderPlainTextcop. (@fatkodima) - #76: Add new
Rails/DefaultScopecop. (@fatkodima) - #275: Add new
Rails/MatchRoutecop. (@fatkodima) - #286: Add new
Rails/WhereExistscop. (@fatkodima) - #271: Add new
Rails/RenderInlinecop. (@fatkodima) - #281: Add new
Rails/MailerNamecop. (@fatkodima) - #280: Add new
Rails/ShortI18ncop. (@fatkodima) - #282: Add new
Rails/Inquirycop. (@fatkodima) - #246: Add new
Rails/PluckInWherecop. (@fatkodima) - #17: Add new
Rails/NegateIncludecop. (@fatkodima) - #278: Add new
Rails/Pluckcop. (@eugeneius) - #272: Add new
Rails/PluckIdcop. (@fatkodima)
Bug fixes
- #261: Fix auto correction for
Rails/ContentTagwhencontent_tagis called with options hash and block. (@fatkodima)
Changes
RuboCop Rails 2.6.0
New features
- #51: Add allowed receiver class names option for
Rails/DynamicFindBy. (@tejasbubane) - #211: Add autocorrect to
Rails/RakeEnvironmentcop. (@tejasbubane) - #242: Add
Rails/ContentTagcop. (@tabuchi0919) - #249: Add new
Rails/Pickcop. (@eugeneius) - #257: Add new
Rails/RedundantForeignKeycop. (@eugeneius)
Bug fixes
- #12: Fix a false positive for
Rails/SkipsModelValidationswhen passing a boolean literal totouch. (@eugeneius) - #238: Fix auto correction for
Rails/IndexBywhen the.to_hinvocation is separated in multiple lines. (@diogoosorio) - #248: Fix a false positive for
Rails/SaveBangwhenupdateis called onENV. (@eugeneius) - #251: Fix a false positive for
Rails/FilePathwhen the result ofRails.root.joinis interpolated at the end of a string. (@eugeneius) - #91: Fix
Rails/UniqBeforePluckto not recommend usinguniqinActiveRecord::Relations anymore since it was deprecated in Rails 5.0. (@santib, @ghiculescu)
Changes
RuboCop Rails 2.5.2
RuboCop Rails 2.5.1
Bug fixes
- #213: Fix a false positive for
Rails/UniqueValidationWithoutIndexwhen using conditions. (@sunny) - #215: Fix a false positive for
Rails/UniqueValidationWithoutIndexwhen using Expression Indexes. (@koic) - #214: Fix an error for
Rails/UniqueValidationWithoutIndexwhen a table has no column definition. (@koic) - #221: Make
Rails/UniqueValidationWithoutIndexaware ofadd_indexin db/schema.rb. (@koic)
Changes
- #223: Mark
Rails/ApplicationController,Rails/ApplicationJob,Rails/ApplicationMailer, andRails/ApplicationRecordas unsafe autocorrect. (@hoshinotsuyoshi)
RuboCop Rails 2.5.0
New features
- #197: Add
Rails/UniqueValidationWithoutIndexcop. (@pocke) - #208: Add new
Rails/IndexByandRails/IndexWithcops. (@djudd, @eugeneius) - #150: Add
EnforcedStyle: refuteforRails/RefuteMethodscop. (@koic)
Bug fixes
- #180: Fix a false positive for
HttpPositionalArgumentswhen usinggetmethod with:tooption. (@koic) - #193: Make
Rails/EnvironmentComparisonaware ofRails.envis used in RHS or when!=is used for comparison. (@koic) - #205: Make
Rails/ReversibleMigrationaware of:to_tableoption ofremove_foreign_key. (@joshpencheon) - #207: Fix a false positive for
Rails/RakeEnvironmentwhen using Capistrano. (@sinsoku)
RuboCop Rails 2.4.2
RuboCop Rails 2.4.1
RuboCop Rails 2.4.0
New features
- #123: Add new
Rails/ApplicationControllerandRails/ApplicationMailercops. (@eugeneius) - #130: Add new
Rails/RakeEnvironmentcop. (@pocke) - #133: Add new
Rails/SafeNavigationWithBlankcop. (@gyfis)
Bug fixes
- #120: Fix message for
Rails/SaveBangwhen the save is in the body of a conditional. (@jas14) - #131: Fix an incorrect autocorrect for
Rails/Presencewhen using[]method. (@forresty) - #142: Fix an incorrect autocorrect for
Rails/EnumHashwhen using nested constants. (@koic) - #136: Fix a false positive for
Rails/ReversibleMigrationwhen usingchange_defaultwith:fromand:tooptions. (@sinsoku) - #144: Fix a false positive for
Rails/ReversibleMigrationwhen usingchange_table_commentorchange_column_commentwith a:fromand:tohash. (@DNA)