Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
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)
Changes
RuboCop Rails 2.3.2
RuboCop Rails 2.3.1
RuboCop Rails 2.3.0
New features
- #78: Add new
Rails/EnumHashcop. (@fedeagripa, @brunvez, @santib)
Bug fixes
- #53: Fix a false positive for
Rails/SaveBangwhen implicitly return using finder method and creation method connected by||. (@koic) - #97: Fix two false negatives for
Rails/EnumUniqueness. 1. Whenenumname is not a literal. 2. Whenenumhas multiple definitions. (@santib)
Changes
- #98: Mark
Rails/ActiveRecordAliasesasSafeAutoCorrectfalse and disable autocorrect by default. (@prathamesh-sonpatki) - #101: Mark
Rails/SaveBangasSafeAutoCorrectfalse and disable autocorrect by default. (@prathamesh-sonpatki) - #102: Include
create_or_find_byinRails/SaveBangcop. (@MaximeLaurenty)