Recent Releases of https://github.com/rubocop/rubocop-rails
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.34.3
Bug fixes
- #1473: Fix an error for
Rails/SelectMapwhenselect(:column_name).map(&:column_name)with parentheses. (@koic) - #1569: Fix an error in
Rails/SelectMapwhen multipleselectcalls are present beforemap. (@koic)
- Ruby
Published by github-actions[bot] about 2 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.34.2
Changes
- Ruby
Published by github-actions[bot] 3 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.34.1
Bug fixes
- #1556: Fix an error for
Rails/Envwhen assigningRails.env. (@koic) - #1557: Fix false positives for
Rails/Presencewith comparison and assignment operators. (@davidenglishmusic) - #1558: This PR fixes incorrect autocorrect for
Rails/RedirectBackOrTowhen additional options as double splat are used. (@koic) - #1561: Fix incorrect autocorrect for
Rails/RedirectBackOrTowhenfallback_locationargument is a hash and the call has no argument parentheses. (@koic)
- Ruby
Published by github-actions[bot] 3 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.34.0
New features
- #1520: New
Rails/HttpStatusNameConsistencycop. (@tuxagon) - #1376: Add new
Rails/Envcop. (@cdudas17) - #1541: Add new
Rails/RedirectBackOrTocop to suggest usingredirect_back_or_toinstead ofredirect_backwithfallback_location. (@davidenglishmusic)
Bug fixes
- #1539: Fix an error in
Rails/ActionControllerFlashBeforeRenderwhenflashis used inside a block followed by method chaining. (@koic) - #1553: Fix false positives for
Rails/OutputSafetywhen using non-interpolated multiline heredoc. (@koic) - #1532: Fix false positives for
Rails/FindByOrAssignmentMemoizationwhen assigning a memoization instance variable atinitializemethod. (@koic) - #1549: Fix
Rails/InverseOfcop false positives when using dynamic association options. (@viralpraxis)
Changes
- #1537: Add
abortto theRails/Exitcop. (@adamstegman) - #932: Add support for chained method calls in
Rails/Presence. (@vlad-pisanov) - #1525: Change
Rails::HelperInstanceVariablenot to detect offenses for instance variables within classes. (@viralpraxis) - #1481: Recognize
Rails.env.to_syminRails/EnvironmentComparison. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 4 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.33.4
Bug fixes
- #1530: Fix an incorrect autocorrect for
Rails/FindByOrAssignmentMemoizationwhen using endless method definition. (@koic) - #1522: Fix an error for
Rails/FindBywhenwheretakes a block. (@earlopain) - #1182: Fix a false positive for
Rails/ActionControllerFlashBeforeRenderwhen flash is called in a block. (@5hun-s)
- Ruby
Published by github-actions[bot] 5 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.33.3
Bug fixes
- #1516: Fix wrong autocorrect for
Rails/FindByOrAssignmentMemoization. (@earlopain)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.33.2
Bug fixes
- #1488: Fix an error for
Rails/ReadWriteAttributewith a frozen string attribute name. (@viralpraxis)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.33.1
Bug fixes
- #1508: Fix an error for
Rails/TransactionExitStatementwhentransactionis part of a method chain. (@earlopain) - #1510: Fix
Rails/OrderArgumentscop false positives when using column index argument. (@viralpraxis) - #1511: Don't register offenses for
Rails/WhereExistswhenexists?is given multiple or splat arguments. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.33.0
New features
- #1324: Add
Rails/FindByOrAssignmentMemoizationcop. (@r7kamura) - #1501: Add new cop
Rails/OrderArguments. (@lovro-bikic)
Bug fixes
- #1497: Fix bugs in
Rails/PluckIdandRails/PluckInWhere. (@r7kamura) - #1478: Fix a false negative for
Rails/EnvLocalwhen having preceding conditions. (@fatkodima) - #1505: Fix false negatives for
Rails/Pluckwhenmapmethod call is used in a block without a receiver. (@koic) - #1486: Fix false positives for
Rails/Outputwhenpmethod is a DSL. (@koic) - #1495: Fix false positives for
Rails/TransactionExitStatementwhenbreakis used in loop in transactions. (@koic) - #1483: Fix autocorrection error when
Rails/IndexWithhas nested offenses. (@lovro-bikic)
Changes
- #1500: Exclude controllers and mailers from
Lint/UselessMethodDefinition. (@r7kamura) - #1474: Make
Rails/EnumSyntaxinclude the lib directory by default. (@koic) - #1463: Mark
Rails/IndexWithas unsafe autocorrect. (@tejasbubane)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.32.0
Bug fixes
- #1475: Fix
Rails/TimeZonecop error on invalid string literal encoding. (@viralpraxis) - #1477: Fix an error for
Rails/SchemaCommentwhen the comment is passed as a local variable. (@earlopain)
Changes
- Ruby
Published by github-actions[bot] 10 months ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails v2.31.0
New features
Bug fixes
- #1465: Avoid warnings about methods of
RuboCop::Cop::EnforceSuperclassbeing redefined. (@davidrunger)
- Ruby
Published by github-actions[bot] 11 months ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by github-actions[bot] about 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic about 1 year ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.30.1
Bug fixes
- #1442: Fix an incorrect behavior when using
AllCops: TargetRailsVersion. (@koic) - #1444: Fix an incorrect behavior when using
AllCops: MigratedSchemaVersion. (@koic)
- Ruby
Published by koic about 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic about 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic about 1 year ago
https://github.com/rubocop/rubocop-rails - 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
- Ruby
Published by koic about 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic about 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic over 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic over 1 year ago
https://github.com/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)
- Ruby
Published by koic over 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic over 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic over 1 year ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic almost 2 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic almost 2 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic about 2 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic about 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 1.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)
- Ruby
Published by koic about 2 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.22.1
Bug fixes
- #1168: Fix a false positive for
Rails/DuplicateAssociationwhen using duplicatebelongs_toassociations of same class without other arguments. (@koic)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.22.0
New features
- #906: Add
Rails/EnvLocalcop. (@sambostock) - #1128: Make
Rails/DuplicateAssociationaware of duplicateclass_name. (@koic) - #1157: Support some Rails 7.1's new querying methods for
Rails/RedundantActiveRecordAllMethod. (@koic) - #1147: Support the Trilogy adapter for MySQL. (@koic)
Bug fixes
- #952: Fix a false positive for
Rails/NotNullColumnwhen usingnull: falsefor MySQL's TEXT type. (@koic) - #1041: Fix a false positive for
Rails/Outputwhen output method is called with block argument. (@koic) - #1143: Fix an error for
Rails/RedundantActiveRecordAllMethodwhen using RuboCop 1.51 or lower. (@koic) - #1105: Fix false positives for
Rails/RedundantPresenceValidationOnBelongsTowhen usingvalidateswith:ifor:unlessoptions. (@koic) - #1158:
Rails/HasManyOrHasOneDependentdoes not add offence when has_many or has_one is called on an explicit receiver. (@samrjenkins) - #1160: Fix
Rails/SaveBangto ignore parenthesis. (@fatkodima)
Changes
- #1152: Add more dangerous column names to
Rails/DangerousColumnNames. (@r7kamura) - #1039: Deprecate
Rails/ActionFiltercop; it will be disabled by default. (@koic) - #893: Support
localas an environment forRails/UnknownEnvfrom Rails 7.1 onward. (@ghiculescu)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.21.2
Bug fixes
- #1126: Fix a false positive for
Rails/RedundantActiveRecordAllMethodwhen using someEnumerable's methods with block argument. (@koic) - #1121: Fix an error for
Rails/SelectMapwhen usingselect(:column_name).map(&:column_name)without receiver model. (@koic) - #1119: Fix an incorrect autocorrect for
Rails/RedundantActiveRecordAllMethodwhenallhas parentheses. (@masato-bkn) - #1130: Fix crash for
Rails/UniqueValidationWithoutIndexwith bare validate. (@jamiemccarthy) - #1124: Fix false positives for
Rails/RedundantActiveRecordAllMethodwhen receiver is not an Active Record model. (@koic)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.21.1
Bug fixes
- #1108: Fix an incorrect autocorrect for
Rails/TimeZonewhen usingString#to_time. (@koic) - #1109: Fix error for
Rails/RedundantActiveRecordAllMethodwhenallis an argument for AR methods. (@masato-bkn) - #1110: Fix false positive for
Rails/RedundantActiveRecordAllMethodwhenallhas any parameters. (@masato-bkn)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.21.0
New features
- #1075: Add new
Rails/SelectMapcop that checks for uses ofselect(:column_name)withmap(&:column_name). (@koic) - #158: Add
Rails/DangerousColumnNamescop. (@r7kamura) - #1072: Add
TransactionMethodsconfig forRails/TransactionExitStatementto detect custom transaction methods. (@marocchino) - #967: Add new
Rails/UnusedRenderContentcop. (@samrjenkins) - #1052: Add explicit style to
Rails/I18nLazyLookup. (@sunny) - #1016: Add new
Rails/RedundantActiveRecordAllMethodcop. (@masato-bkn)
Bug fixes
- #1078: Fix a false negative for
Rails/LexicallyScopedActionFilterwhen no methods are defined. (@vlad-pisanov) - #1060: Fix a false positive for
Rails/HttpStatuswhen using symbolic value that have no numeric value mapping. (@koic) - #1004: Fix a false-positive for
Rails/RootPathnameMethodson Ruby 2.4 or lower. (@r7kamura) - #1066: Fix an error for
Rails/FilePathwhen string interpolatedRails.rootis followed by a message starting with.. (@koic) - #1049: Fix an incorrect autocorrect for
Rails/FilePathwhen File.join with Rails.root and path starting with/. (@ydah) - #1045: Fix an incorrect autocorrect for
Rails/NegateIncludewhen usingStyle/InverseMethods's autocorrection together. (@koic) - #1062: Fix autocorrection for
Rails/RakeEnvironmentwhen rake task accepts arguments. (@fastjames) - #1036: Fix an error for
UniqueValidationWithoutIndexwhendb/schema.rbis empty. (@fatkodima) - #1042: Fix no offences for
Rails/SchemaCommentwhen create_table with multi t columns. (@nipe0324)
Changes
- #1056: Fix database adapter detection for nested config. (@mjankowski)
- #1031: Make
Lint/SafeNavigationChainallowpresence_in. (@koic) - #1080: Make
Rails/HttpStatusaware of string number status. (@r7kamura) - #1094: Make
Rails/TimeZoneaware ofString#to_time. (@koic) - #1015: Make
Style/InvertibleUnlessConditionaware of Active Support methods. (@koic) - #903: Read database config for
Rails/BulkChangeTablefrom environment variable. (@joergschiller) - #1058: Relax
Includepath forRails/FindByandRails/FindEach. (@koic) - #994: Restrict DuplicateAssociation cop to ActiveRecord. (@mjankowski)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.20.2
Bug fixes
- #1028: Fix an error for
Rails/UniqueValidationWithoutIndexwhen thepresence: trueoption is used alone for thevalidatesmethod. (@koic)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.20.1
Bug fixes
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.20.0
New features
- #999: Add autocorrection for
Rails/Date. (@r7kamura) - #991: Add autocorrection for
Rails/FilePath. (@r7kamura) - #988: Add autocorrection for
Rails/IgnoredSkipActionFilterOption. (@r7kamura)
Bug fixes
- #1005: Flag
breakinwith_lockforRails/TransactionExitStatement. (@splattael) - #997: Fix to Allow
NotNullColumnto work with method calls and variables. (@fidalgo) - #989: Fix
Rails/FilePathto detect offenses from complex string interpolation. (@r7kamura) - #1010: Fix
Rails/ThreeStateBooleanColumnfor dynamic tables/columns. (@fatkodima) - #1008: Fix
UniqueValidationWithoutIndexto not detect offenses when a validation specifiesuniqueness: false. (@samrjenkins)
Changes
- #1011: Add
*_create_active_storage_variant_records.active_storage.rbtoRails/CreateTableWithTimestampsexclude file list. (@tka5) - #995: Check for
ormethod inRails/FindEachcop. (@masato-bkn) - #1019: Change db migration file pattern so that it supports multiple db. (@r7kamura)
- #986: (Breaking) Drop Ruby 2.6 support. (@koic)
- #992: Exclude
app/assets/**/*by default. (@r7kamura) - #1014: Make
Lint/RedundantSafeNavigationaware ofpresenceandpresent?methods. (@koic) - #1007: Support
flash.nowforRails/I18nLocaleTexts. (@fatkodima)
- Ruby
Published by koic over 2 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.19.1
Bug fixes
- Ruby
Published by koic almost 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.19.0
New features
- #337: Add new
Rails/ThreeStateBooleanColumncop. (@fatkodima) - #45: Make
Rails/Delegateaware ofself. (@koic)
Bug fixes
- #934: Fix a false negative for
Rails/Outputwhen print methods without arguments. (@koic) - #99: Fix a false positive for
Rails/HttpPositionalArgumentswhen usinginclude Rack::Test::Methods. (@koic) - #501: Fix a false positive for
Rails/OutputSafetywhen usinghtml_safeforI18nmethods. (@koic) - #860: Fix a false positive for
Rails/Pluckwhen using regexp literal key forString#[]. (@koic) - #938: Fix an error for
Rails/WhereNotWithMultipleConditionswhen usingwhere.not.lt(condition)as a Mongoid API'. (@koic) - #941: Remove redundant config for
Style/InverseMethods. (@koic)
Changes
- #299: Add autocorrection for
Rails/ReflectionClassName. (@tejasbubane) - #34: Allow
CreateTableWithTimestampswhen usingid: falseand not includetimestamps. (@koic) - #694: Mark
Rails/FindEachas unsafe. (@koic) - #940: Mark
Rails/ResponseParsedBodyas unsafe. (@koic)
- Ruby
Published by koic almost 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.18 (a.k.a. Ruby 30th Anniversary Edition)
New features
Bug fixes
- #824: Fix a false negative for
Rails/ActionControllerTestCasewhen the class is namespaced. (@vlad-pisanov) - #909: Fix a false positive for
Rails/ActionControllerFlashBeforeRenderwhen usingflashbeforeredirect_toinifbranch. (@koic) - #898: Fix a false positive for
Rails/ActiveRecordAliaseswhen arguments ofupdate_attributesis empty. (@koic) - #920: Fix an error for
Rails/NegateIncludewhen there is no receiver. (@fatkodima) - #931: Fix error in
Rails/Presencewhen ternary operators are used in multiple lines. (@r7kamura) - #687: Fix
Rails/HasManyOrHasOneDependentto correctly handle association methods with receiver. (@fatkodima) - #929: Prevent
Rails/SquishedSQLHeredocsapplying when single-line comments are present. (@john-h-k) - #887: Fix a false positive for
Rails/NotNullColumnwhen adding a:virtualcolumn. (@fatkodima) - #918: Fix
Rails/FreezeTimerunning against Rails < 5.2 apps. (@DRBragg) - #895: Fix
Rails/UnusedIgnoredColumnsnot recognizing columns added via+=. (@lucthev)
Changes
- #263: Accept actions defined via
aliasinRails/LexicallyScopedActionFilter. (@fatkodima) - #902: Ignore
redirectmethod forStyle/FormatStringTokenby default. (@javierjulio) - #935: Make
Style/InverseMethodsaware of Active Support'spresent?,blank?,include?, andexclude?methods. (@koic) - #914: Make
Style/InverseMethodsaware ofvalid?andinvalid?methods. (@koic) - #826: Mark
Rails/Pluckas unsafe. (@fatkodima) - #896: Raise severity of
Rails/ActiveRecordOverride,Rails/DeprecatedActiveModelErrorsMethods,Rails/DuplicateAssociation,Rails/DuplicateScope,Rails/TopLevelHashWithIndifferentAccess, andRails/WhereNotWithMultipleConditionscops to warning. (@koic)
- Ruby
Published by koic about 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.17.4
Bug fixes
- #870: Fix an error for
Rails/RootPathnameMethodswhen usingRails.envargument withinDir.glob. (@koic) - #881: Fix a false positive for
Rails/ActionControllerFlashBeforeRenderwhen usingflashin multilinerescuebranch beforeredirect_to. (@gurix) - #871: Fix a false positive for
Rails/WhereMissingwhenleft_joins(:foo)andwhere(foos: {id: nil})separated byor,and. (@ydah) - #875: Make
Rails/RootPathnameMethodsaware of enforced style ofStyle/StringLiterals. (@koic) - #882: Fix false positive for
Rails/UniqueValidationWithoutIndexwith :conditions option. (@etiennebarrie) - #821: Enhance
Rails/TimeZoneto accept methods with the:intimezone option. (@fatkodima)
Changes
- #880: Add Rails/I18nLocaleTexts match for redirect_back. (@bensheldon)
- Ruby
Published by koic about 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.17.3
% cat relnotes/v2.17.3.md
Bug fixes
- #843: Fix a false positive for
Rails/ActionControllerFlashBeforeRenderwhen usingflashin multilineifbranch beforeredirect_to. (@koic) - #841: Fix an error for
Rails/ActionOrderwhen using unconventional order of multiple actions. (@koic) - #838: Fix an incorrect autocorrect for
Rails/ActionOrderwhen using unconventional order of actions in conditions. (@koic) - #867: Fix autocorrection bug when
::Hashis used onRails/IndexByandRails/IndexWith. (@r7kamura) - #848: Fix a false positive for
Rails/FreezeTimewhen usingtravel_towith an argument ofTime.new(...).in_time_zone. (@koic) - #869: Fix false-positives that non Rails formats are offended on
Rails/ToSWithArgument. (@r7kamura) - #866: Fix false-positives when constant is used with receiver on
Rails/DurationArithmetic,Rails/IndexBy,Rails/IndexWIth, andRails/RequireDependency. (@r7kamura) - #850: Fix default configuration for
Rails/I18nLazyLookup. (@vlad-pisanov) - #837: Fix incorrect autocorrection of
Rails/ActionOrderabout comments. (@r7kamura) - #855: Fix Rails/RootPathnameMethods autocorrection for Pathname calls without parens. (@gsamokovarov)
- #868: Support
::prefixed constants onRails/ActionControllerFlashBeforeRender,Rails/ActionControllerTestCase,Rails/ApplicationController,Rails/ApplicationJob,Rails/ApplicationMailer,Rails/ApplicationRecord,Rails/DotSeparatedKeys,Rails/DynamicFindBy,Rails/FindEach,Rails/FreezeTime,Rails/HasManyOrHasOneDependent,Rails/HelperInstanceVariable,Rails/MailerName,Rails/MigrationClassName,Rails/Output,Rails/ReversibleMigrationMethodDefinition,Rails/ReversibleMigration,Rails/ShortI18n,Rails/SkipsModelValidations, andRails/TimeZoneAssignment. (@r7kamura) - #865: Support
::Railsand::FileonRails/FilePathcop. (@r7kamura)
Changes
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.17.2
Bug fixes
- #825: Fix a false positive for
Rails/ActionControllerFlashBeforeRenderwhen using condition beforeredirect_to. (@koic) - #833: Fix a false positive for
Rails/Pluckwhen receiver is not block argument for[]. (@koic) - #834: Fix an error for
Rails/WhereNotWithMultipleConditionswhen usingwhere.notwith empty hash literal. (@koic) - #833: Fix a false positive for
Rails/Pluckwhen using multiple block arguments. (@koic)
Changes
- #832: Mark
Rails/ActionControllerFlashBeforeRender,Rails/ActionControllerTestCase, andRails/RootPathnameMethodscops as unsafe autocorrection. (@koic)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.17.1
Bug fixes
- #829: Revert "Extends
Rails/HttpStatuscop to checkroutes.rb" introduced in 2.17.0. (@jdufresne) - #831: Fix a false positive for
Rails/Pluckwhen using block argument in[]. (@koic)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.17.0
New features
- #547: Add new
Rails/ActionOrdercop. (@mollerhoj) - #565: Add cop Rails/WhereNotWithMultipleConditions. (@niklas-hasselmeyer)
- #771: Add new
Rails/IgnoredColumnsAssignmentcop. (@fsateler, @kkitadate) - #790: Make
Style/HashExceptaware of TargetRubyVersion: 2.x because Rails hasHash#except. (@koic)
Bug fixes
- #786: Fix a false negative for
Rails/ActionControllerTestCasewhen extendingActionController::TestCaseand having a method definition. (@koic) - #792: Fix a false negative for
Rails/RedundantPresenceValidationOnBelongsTowhen belongs_to at least one block and one hash likebelongs_to :company, -> { where(foo: true) }, inverse_of: :employee. (@PedroAugustoRamalhoDuarte) - #781: Make
Rails/DynamicFindByaware offind_by_token_for. (@koic) - #809: Fix an error for
Rails/FreezeTimewhen usingtravel_towithout argument. (@koic) - #794: Fix an error for
Rails/RedundantReceiverInWithOptionswhen calling a method with a receiver inwith_optionswithout block arguments. (@koic) - #782: Fix an incorrect autocorrect for
Rails/EagerEvaluationLogMessagewhen usingStyle/MethodCallWithArgsParentheses's autocorrection together. (@koic) - #776: Fix an incorrect autocorrect for
Rails/Presencewhen using arithmetic operation inelsebranch. (@koic) - #813: Fix errors that occur when unrelated
tagis investigated byRails/ContentTag. (@r7kamura) - #808: Fix false positive for
Rails/ActionControllerFlashBeforeRenderwhenrendercall precedesflashcall. (@americodls) - #778: Fix a false positive for
Rails/DynamicFindBywhen usingpage.find_by_idas a Capybara testing API. (@koic) - #816: Fix an incorrect autocorrect for
Rails/Presencewhen a right-hand side of the relational operator. (@ydah)
Changes
- #779: Add
mailtoAllowedMethodsofStyle/SymbolProc. (@koic) - #796: Add several directories to
Excludeto prevent slow investigation. (@koic) - #822: Extends
Rails/HttpStatuscop to checkroutes.rb. (@anthony-robin) - #787: Make
Rails/Pluckaware of all keys. (@koic) - #800: Make
Rails/TimeZoneaware of timezone UTF offset. (@inkstak)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.16.1
Bug fixes
- #769: Fix a false positive for
Rails/FreezeTimewhen usingtravel_towith an argument ofDateTime.newwith arguments. (@koic) - #772: Fix a false positive for
Rails/TopLevelHashWithIndifferentAccesswhen usingHashWithIndifferentAccessunder namespace module. (@koic) - #762: Fix an error for
Rails/FreezeTimewhen usingtravel_towith an argument ofcurrentmethod without receiver. (@koic) - #764: Fix an incorrect autocorrect for
Rails/FreezeTimewhen usingtravel_towith an argument of the current time and proc argument. (@koic) - #763: Mark
Rails/RootPathnameMethodsas unsafe and fix an incorrect autocorrect when usingDir.glob. (@koic)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.16.0
New features
- #714: Add new
Rails/FreezeTimecop. (@ydah) - #744: Add new
Rails/WhereMissingcop. (@ydah) - #587: Add new
Rails/RootPathnameMethodscop. (@leoarnold) - #752: Add
Rails/TopLevelHashWithIndifferentAccesscop. (@r7kamura) - #759: Add new
Rails/ActionControllerFlashBeforeRendercop. (@americodls) - #749: Add new
Rails/ActiveSupportOnLoadcop. (@bdewater) - #747: Add
Rails/ToSWithArgumentcop. (@r7kamura) - #746: Enable
ActiveSupportExtensionsEnabledoption by default. (@koic)
Bug fixes
- #757: Fix a false positive for
Rails/ReflectionClassNamewhen using Ruby 3.1's hash shorthand syntax. (@koic) - #741: Fix a bad autocorrection for
errors.details[:name] << valuein Rails/DeprecatedActiveModelErrorsMethods. (@BrianHawley) - #742: Rails/DeprecatedActiveModelErrorsMethods was missing the deprecated
values,to_h, andto_xmlmethods. (@BrianHawley) - #740: Fix a NoMethodError on nil for
errors.keysin a model in Rails/DeprecatedActiveModelErrorsMethods. (@BrianHawley) - #753: Fix
Rails/CompactBlankbug when offense is found in block. (@r7kamura) - #756: Fix incorrect documentation URLs when using
rubocop --show-docs-url. (@r7kamura) - #754: Make
Rails/RedundantReceiverInWithOptionsandRails/ReversibleMigrationcops aware of numbered block parameter. (@koic)
Changes
- #750: Deprecate
IgnoredMethodsoption in integrate toAllowedMethodsandAllowedPatternsoption. (@koic) - #729: Change the minimum required
rubocopdependency version to 1.31.0. (@pirj)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.15.2
Bug fixes
- #712: Fix false negative in
Rails/Delegatewhen preceding nested class declares private or protected methods. (@Darhazer) - #737: Fix a false positive for
Rails/DeprecatedActiveModelErrorsMethodswhen usingkeysmethod with Rails 6.0. (@koic) - #737: Make
Rails/ExpandedDateRangeawarebeginning_of_weekwith an argument. (@koic) - #731: Fix an incorrect autocorrect for
Rails/StripHeredoc. (@kazarin)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.15.1
Bug fixes
- #723: Fix include value in
Rails/AttributeDefaultBlockValue. (@kkitadate) - #717: Fix an error for
Rails/DeprecatedActiveModelErrorsMethodswhen root receiver is a variable. (@koic) - #719: Fix a false negative for
Rails/FormattedSwhen using safe navigation operator. (@koic) - #725: Fix an incorrect autocorrect for
Rails/DotSeparatedKeyswhen a key starts with dot. (@koic)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.15.0
New features
- #325: Add new
Rails/DotSeparatedKeyscop. (@fatkodima) - #704: Add new
Rails/StripHeredoccop. (@koic) - #691: Add new
Rails/ToFormattedScop. (@koic) - #588: Add new
Rails/RootPublicPathcop. (@leoarnold) - #702: Make
keysmethod aware ofRails/DeprecatedActiveModelErrorsMethodscop. (@koic) - #688: Support autocorrection for
Rails/DeprecatedActiveModelErrorsMethods. (@koic)
Bug fixes
- #696: Fix a false negative for
Rails/TransactionExitStatementwhenreturnis used inrescue. (@koic) - #700: Fix a false positive for
Rails/FilePathwhen a list of paths separated by colon including Rails.root. (@tk0miya) - #680: Fix a false positive for
Rails/ReversibleMigrationMethodDefinitionwhen using an inner class. (@koic) - #692: Fix an error for
Rails/UnusedIgnoredColumnswhen using no tables db/schema.rb. (@koic) - #707: Fix an error when a variable is passed to has_many or has_one with double splat. (@nobuyo)
- #695: Fixes a false negative where the
in_rescue?check would bypass situations where the return was inside a transaction but outside of a rescue. (@dorkrawk) - #703: Fix not autocorrected for
Rails/DuplicateAssociation. (@ydah) - #708: Recover Ruby 2.2 code analysis using
TargetRubyVersion: 2.2. (@koic)
Changes
- #697: (Compatibility) Drop Ruby 2.5 support. (@koic)
- #705: Add mailers to default
filter/actioncallbacks cops. (@ojab) - #710: Rails/TransactionExitStatement - Inspect
ActiveRecord::Locking::Pessimistic#with_locktoo, as#with_lockopens a transaction. (@FunnyHector)
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.14.2
Bug fixes
- #660: Fix a false positive for
Rails/MigrationClassNamewhen defining another class. (@koic) - #664: Fix a false positive for
Rails/MigrationClassNamewhenActiveSupport::Inflectoris applied to the class name and the case is different. (@koic) - #658: Fix a false positive for
Rails/TransactionExitStatementwhenbreakis used inloopin transactions. (@koic) - #666: Fix an error for
Rails/TransactionExitStatementwhen transaction block is empty. (@koic) - #673: Fix a false negative for
Rails/TransactionExitStatementwhenreturnorthrowis used in a block in transactions. (@Tietew) - #669: Fix a false positive for
Rails/TransactionExitStatementwhenreturnis used inrescue. (@koic)
- Ruby
Published by koic almost 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.14.1
Bug fixes
- #656: Ignore gem name in paths for
Rails/MigrationClassName. (@sunny) - #657: Only consider migration classes for
Rails/MigrationClassName. (@sunny)
- Ruby
Published by koic almost 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.14.0
New features
- #624: Add new
Rails/I18nLocaleTextscop. (@fatkodima) - #326: Add new
Rails/I18nLazyLookupcop. (@fatkodima) - #644: Add new
Rails/MigrationClassNamecop. (@johnny-miyake) - #599: Add new
Rails/DuplicateAssociationcop. (@natematykiewicz) - #427: Add
Rails/DuplicateScopecop. (@natematykiewicz) - #642: New cop
Rails/TransactionExitStatementto disallowreturn,breakandthrowin transactions. (@teckwan) - #491: New
Rails/DeprecatedActiveModelErrorsMethodscop. (@lulalala) - #638: Add new
Rails/ActionControllerTestCasecop. (@gmcgibbon) - #574: Add new
Rails/TableNameAssignmentcop. (@MaximeDucheneS)
Bug fixes
- #636: Fix a false positive for
Rails/ContentTagwhen usingtagmethod in config/puma.rb. (@koic) - #635: Handle
t.removewith multiple columns inRails/BulkChangeTable. (@eugeneius)
Changes
- #646: Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default. (@koic)
- #650: Make
Rails/CompactBlankaware ofdelete_if(&:blank). (@koic) - #631: Update
Rails/Pluckto be aware of numblocks. (@sammiya)
- Ruby
Published by koic almost 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.13.2
New features
- #614: Add
IgnoreScopesconfig option forRails/InverseOfcop. (@composerinteralia)
Bug fixes
- #620: Fix a false positive for
Rails/RedundantPresenceValidationOnBelongsTousing presence with a message. (@koic) - #626: Fix a false positive for
Rails/CompactBlankwhen using the receiver ofblank?is not a block variable. (@koic) - #622: Add
month(s)andyear(s)toRails/DurationArithmeticcop. (@agrobbin) - #623: Fix method shadowing check for
Rails/ReadWriteAttributecop. (@nvasilevski)
Changes
- #615: Change
Rails/RedundantPresenceValidationOnBelongsTotoSafeAutoCorrect: false. (@TonyArra) - #463: Support multiple databases for
ReversibleMigrationandReversibleMigrationMethodDefinitioncops. (@fatkodima)
- Ruby
Published by koic about 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.13.1
Bug fixes
- #601: Handle ignored_columns from mixins for
Rails/UnusedIgnoredColumnscop. (@tachyons) - #603: Fix autocorrection of multiple attributes for
Rails/RedundantPresenceValidationOnBelongsTocop. (@pirj) - #608: Fix autocorrection of strict validation for
Rails/RedundantPresenceValidationOnBelongsTocop. (@pirj)
Changes
- #585: Make
Rails/ReadWriteAttributecop aware of shadowing methods. (@drenmi) - #604: Remove
remove_referenceandremove_belongs_tomethods fromRails/ReversibleMigrationcop offenses. (@TonyArra)
- Ruby
Published by koic about 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.13.0
New features
- #586: Add new
Rails/RootJoinChaincop. (@leoarnold) - #571: Add
Rails/DurationArithmeticcop. (@pirj) - #594: Add
Rails/RedundantPresenceValidationOnBelongsTocop. (@pirj) - #568: Add
Rails/SchemaCommentcop. (@vitormd)
Changes
- #591: Add
change_columncheck toRails/ReversibleMigration. (@mattmccormick) - Add
remove_referencecheck toRails/ReversibleMigration. (@mattmccormick) - #576: Mark
Rails/TimeZoneas unsafe auto-correction from unsafe. (@koic) - #582: Unmark
AutoCorrect: falsefromRails/RelativeDateConstant. (@koic) - #580: Unmark
AutoCorrect: falsefromRails/UniqBeforePluck. (@koic)
- Ruby
Published by koic about 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.12.4
Bug fixes
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.12.3
Bug fixes
- #556: Fix a false positive for
Rails/ContentTagwhen using using thetagmethod with 3 or more arguments. (@koic) - #551: Fix a false positive for
Rails/FindEachwhen usingmodel.errors.wherein Rails 6.1. (@koic) - #543: Fix an error for
Rails/ContentTagwhentagis not a top-level method. (@koic) - #559: Fix an error for
Rails/RelativeDateConstantwhen using multiple assignment. (@koic) - #553: Fix a false positive for
Rails/ReversibleMigrationwhen usingt.removewithtypeoption in Rails 6.1. (@koic)
Changes
- #546: Exclude
app/modelsby default forRails/ContentTag. (@koic) - #570: Make
Rails/CreateTableWithTimestampsrespectactive_storage_variant_recordstable ofdb/migrate/*_create_active_storage_tables.active_storage.rbauto-generated bybin/rails active_storage:installeven ifcreated_atis not specified. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.12.2
Bug fixes
- #541: Fix an error for
Rails/HasManyOrHasOneDependentwhen using lambda argument and specifying:dependentstrategy. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.12.1
Bug fixes
- #535: Fix an error for
Rails/HasManyOrHasOneDependentwhen using lambda argument and not specifying any options. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.12.0
New features
- #521: Support auto-correction for
Rails/Output. (@koic) - #520: Support auto-correction for
Rails/ScopeArgs. (@koic) - #524: Add new
Rails/RedundantTravelBackcop. (@koic)
Bug fixes
- #528: Fix a false positive for
Rails/HasManyOrHasOneDependentwhen specifying:dependentstrategy with double splat. (@koic) - #529: Fix a false positive for
Rails/LexicallyScopedActionFilterwhen action method is aliased byalias_method. (@koic) - #532: Fix a false positive for
Rails/HttpPositionalArgumentswhen defininggetinRails.application.routes.drawblock. (@koic)
Changes
- #260: Change target of
Rails/ContentTagfromcontent_tagmethod totagmethod. (@tabuchi0919)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.11.3
Bug fixes
- #517: Fix an issue for
Rails/UniqueValidationWithoutIndexwhen validating uniqueness with a polymorphic scope. (@theunraveler)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.11.2
Bug fixes
- #515: Fix an error for
Rails/BulkChangeTablewhen using Psych 4.0. (@koic) - #512: Fix a false positive for
Rails/FindBywhen usingtakewith arguments. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.11.1
Bug fixes
- #509: Fix an error for
Rails/ReflectionClassNamewhen usingclass_name: to_s. (@skryukov) - #510: Fix an error for
Rails/FindBywhen calling#firstor#takeon aRangeobject. (@johnsyweb) - #507: Fix an error for
Rails/FindBywhen callingtakeafter block. (@koic) - #504: Fix a false positive for
Rails/FindBywhen receiver is not an Active Record. (@nvasilevski)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.11.0
New features
- #486: Add new
Rails/ExpandedDateRangecop. (@koic) - #494: Add new
Rails/UnusedIgnoredColumnscop. (@pocke) - #490: Make
Rails/HttpStatusaware ofheadmethod. (@koic) - #483: Add new
Rails/EagerEvaluationLogMessagecop. (@aesthetikx) - #495: Add new
Rails/I18nLocaleAssignmentcop. (@koic) - #497: Add new
Rails/AddColumnIndexcop. (@dvandersluis)
Bug fixes
- #482: Fix a false positive for
Rails/RelativeDateConstantwhen assigning (hashes/arrays/etc)-containing procs to a constant. (@jdelStrother) - #419: Fix an error for
Rails/UniqueValidationWithoutIndexwhen using a unique index andcheck_constraintthat hasnilfirst argument. (@koic) - #70: Fix a false positive for
Rails/TimeZonewhen settingEnforcedStyle: strictand usingTime.current. (@koic) - #488: Fix a false positive for
Rails/ReversibleMigrationMethodDefinitionwhen using cbase migration class. (@koic) - #500: Fix a false positive for
Rails/DynamicFindBywhen using dynamic finder with hash argument. (@koic)
Changes
- #288: Add
AllowToTimeoption (trueby default) toRails/Date. (@koic) - #499: Add
IgnoreWhereFirstoption (trueby default) toRails/FindBy. (@koic) - #505: Set disabled by default for
Rails/EnvironmentVariableAccess. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.10.1
Bug fixes
- Ruby
Published by koic almost 5 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.10.0
New features
- #457: Add new
Rails/ReversibleMigrationMethodDefinitioncop. (@leonp1991) - #446: Add new
Rails/RequireDependencycop. (@tubaxenor) - #458: Add new
Rails/TimeZoneAssignmentcop. (@olivierbuffon) - #442: Add new
Rails/EnvironmentVariableAccesscop. (@drenmi)
Bug fixes
- #421: Fix incorrect auto-correct for
Rails/LinkToBlankwhen usingtarget: '_blank'with hash brackets for the option. (@koic) - #436: Fix a false positive for
Rails/ContentTagwhen the first argument is a splat argument. (@koic) - #435: Fix a false negative for
Rails/BelongsTowhen usingbelongs_tolambda block withrequiredoption. (@koic) - #451: Fix a false negative for
Rails/RelativeDateConstantwhen a method is chained after a relative date method. (@koic) - #450: Fix a crash for
Rails/ContentTagwith nested content tags. (@tejasbubane) - #103: Fix a false positive for
Rails/FindEachwhen not inheritingActiveRecord::Baseand usingall.each. (@koic) - #466: Fix a false positive for
Rails/DynamicFindBywhen not inheritingApplicationRecordand without no receiver. (@koic) - #147: Fix a false positive for
Rails/HasManyOrHasOneDependentwhen specifying defaultdependent: nilstrategy. (@koic) - #137: Make
Rails/HasManyOrHasOneDependentaware ofreadonly?istrue. (@koic) - #474: Fix a false negative for
Rails/SafeNavigationwhen usingtry!without receiver. (@koic) - #126: Fix an incorrect auto-correct for
Rails/SafeNavigationwithStyle/RedndantSelf. (@koic) - #476: Fix a false positive for
Rails/ReversibleMigrationwhen usingdrop_tablewith symbol proc. (@koic)
Changes
- #409: Deconstruct "table.column" in
Rails/WhereNot. (@mobilutz) - #416: Make
Rails/HasManyOrHasOneDependentaccept combination of association extension andwith_options. (@ohbarye) - #432: Exclude gemspec file by default for
Rails/TimeZonecop. (@koic) - #440: This PR makes
Rails/TimeZoneaware of timezone specifier. (@koic) - #381: Update
IgnoredMethodslist forLint/NumberConversionto allow Rails' duration methods. (@dvandersluis) - #444: Mark
Rails/Blankas unsafe auto-correction. (@koic) - #451: Make
Rails/RelativeDateConstantaware ofyesterdayandtomorrowmethods. (@koic) - #454: Mark
Rails/WhereExistsas unsafe auto-correction. (@koic) - #403: Mark
Rails/WhereEqualsas unsafe auto-correction. (@koic) - #379: Mark
Rails/DynamicFindByas unsafe. (@koic) - #106: Mark
Rails/ReflectionClassNameas unsafe. (@koic) - #106: Make
Rails/ReflectionClassNameaware of the use of string withto_s. (@koic) - #456: Drop Ruby 2.4 support. (@koic)
- #462: Require RuboCop 1.7 or higher. (@koic)
- Ruby
Published by koic almost 5 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.9.1
Bug fixes
- #408: Fix bug in
Rails/FindEachwhere config was ignored. (@ghiculescu) - #401: Fix an error for
Rails/WhereEqualsusing only named placeholder template without replacement argument. (@koic)
Changes
- #404: Make
Rails/HelperInstanceVariableaccepts of instance variables when a class which inheritsActionView::Helpers::FormBuilder. (@koic) - #406: Deconstruct "table.column" in
Rails/WhereEquals. (@mobilutz)
- Ruby
Published by koic about 5 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.9.0
New features
- #362: Add new
Rails/WhereEqualscop. (@eugeneius) - #339: Add new
Rails/AttributeDefaultBlockValuecop. (@cilim) - #344: Add new
Rails/ArelStarcop which checks for quoted literal asterisks inarel_tablecalls. (@flanger001) - #389: Add
IgnoredMethodsconfig option forRails/FindEachcop. (@tejasbubane)
Bug fixes
- #371: Fix an infinite loop error for
Rails/ActiveRecordCallbacksOrderwhen callbacks have inline comments. (@fatkodima) - #364: Fix a problem that
Rails/UniqueValidationWithoutIndexdoesn't work in classes defined with compact style. (@sinsoku) - #384: Mark unsafe for
Rails/NegateInclude. (@koic) - #394: Fix false offense detection of
Rails/RedundantAllowNilwhen using both allow_nil and allow_blank on different helpers of the same validator`. (@ngouy)
Changes
- #383: Require RuboCop 0.90 or higher. (@koic)
- #365: Mark
Rails/SquishedSQLHeredocsunsafe for autocorrection. (@tejasbubane)
- Ruby
Published by koic about 5 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.8.1
Bug fixes
- #345: Fix error of
Rails/AfterCommitOverrideonafter_commitwith a lambda. (@pocke) - #349: Fix errors of
Rails/UniqueValidationWithoutIndex. (@Tietew) - #338: Fix a false positive for
Rails/IndexByandRails/IndexWithwhen theeach_with_objecthash is used in the transformed key or value. (@eugeneius) - #351: Add
<>operator toRails/WhereNotcop. (@Tietew) - #352: Do not register offense if given a splatted hash. (@dvandersluis)
- #346: Fix a false positive for
Rails/DynamicFindBywhen any of the arguments are splat argument. (@koic) - #357: Fix a false positive for
Rails/ReversibleMigrationwhen keyword arguments ofchange_column_defaultare in the order ofto,from. (@koic)
- Ruby
Published by koic over 5 years ago
https://github.com/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)
- Ruby
Published by koic over 5 years ago
https://github.com/rubocop/rubocop-rails - 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
- Ruby
Published by koic over 5 years ago
https://github.com/rubocop/rubocop-rails - 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
- #263: Change terminology to
ForbiddenMethodsandAllowedMethods. (@jcoyne) - #289: Update
Rails/SkipsModelValidationsto register an offense forinsert_all,touch_all,upsert_all, etc. (@eugeneius) - #293: Require RuboCop 0.87 or higher. (@koic)
- Ruby
Published by koic over 5 years ago
https://github.com/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
- #233: (BREAKING) Drop support for Ruby 2.3. (@koic)
- #236: (BREAKING) Drop support for Rails 4.1 or lower. (@koic)
- #210: Accept
redirecto_to(...) and returnand similar cases. (@koic) - #258: Drop support for RuboCop 0.81 or lower. (@koic)
- Ruby
Published by koic over 5 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.5.2
Bug fixes
- Ruby
Published by koic almost 6 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic almost 6 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic almost 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.4.2
Bug fixes
- #184: Fix
Rake/Environmentto allow task with no block. (@hanachin) - #122: Fix
Excludepaths that were not inherited. (@koic) - #187: Fix an issue that excluded files in rubocop-rails did not work. (@sinsoku)
- #190: Fix
Rails/SaveBangwhen return value is checked immediately. (@jas14)
- Ruby
Published by koic about 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.4.1
Bug fixes
- #170: Make
Rails/BulkChangeTablenot suggest combining methods with an intervening block. (@mvz) - #159: Fix autocorrect for
Rails/EnumHashwhen using % arrays notations. (@ngouy)
Changes
- Ruby
Published by koic about 6 years ago
https://github.com/rubocop/rubocop-rails - 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
- #156: Make
Rails/UnknownEnvcop aware ofRails.env == 'unknown_env'. (@pocke) - #141: Change default of
EnforcedStylefromargumentstoslashesforRails/FilePath. (@koic)
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.3.2
2.3.2 (2019-09-01)
Bug fixes
- #118: Fix an incorrect autocorrect for
Rails/Validationwhen attributes are specified with array literal. (@koic) - #116: Fix an incorrect autocorrect for
Rails/Presencewhenelsebranch of ternary operator is not nil. (@koic)
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.3.1
Bug fixes
- #104: Exclude Rails-independent
bin/bundleby default. (@koic) - #107: Fix style guide URLs when specifying
rubocop --display-style-guideoption. (@koic) - #111: Fix an incorrect autocorrect for
Rails/Presencewhen method arguments ofelsebranch is not enclosed in parentheses. (@koic)
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - 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)
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.2.1
Bug fixes
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.2.0
Bug fixes
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.1.0
Bug fixes
- #43: Remove
change_column_nullmethod fromBulkChangeTablecop offenses. ([@anthony-robin][]) - #79: Fix
RuboCop::Cop::Rails not defined (NameError). (@rmm5t)
Changes
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.0.1
Changes
- Ruby
Published by koic over 6 years ago
https://github.com/rubocop/rubocop-rails - RuboCop Rails 2.0.0
New features
- Extract Rails cops from rubocop-hq/rubocop repository. (@koic)
- #19: Add new
Rails/HelperInstanceVariablecop. (@andyw8)
- Ruby
Published by koic over 6 years ago