All Versions
151
Latest Version
Avg Release Cycle
7 days
Latest Release
1225 days ago

Changelog History
Page 2

  • v1.1.0 Changes

    October 29, 2020

    ๐Ÿ†• New features

    • ๐Ÿ‘• #8896: Add new Lint/DuplicateRegexpCharacterClassElement cop. (@owst)
    • ๐Ÿ‘• #8895: Add new Lint/EmptyBlock cop. (@fatkodima)
    • ๐Ÿ’… #8934: Add new Style/SwapValues cop. (@fatkodima)
    • ๐Ÿ’… #7549: Add new Style/ArgumentsForwarding cop. (@koic)
    • ๐Ÿ‘• #8859: Add new Lint/UnmodifiedReduceAccumulator cop. (@dvandersluis)
    • ๐Ÿ’… #8951: Support auto-correction for Style/MultipleComparison. (@koic)
    • ๐Ÿ‘• #8953: Add AllowMethodComparison option for Lint/MultipleComparison. (@koic)
    • #8960: Add Regexp::Expression#loc and #expression to replace parsed_tree_expr_loc. (@marcandre)
    • #8930: Add rake tasks for alternative way to specify Changelog entries. (@marcandre)
    • ๐Ÿ’… #8940: Add new Style/DocumentDynamicEvalDefinition cop. (@fatkodima)
    • ๐Ÿ‘• #7753: Add new Lint/ToEnumArguments cop. (@fatkodima)

    ๐Ÿ› Bug fixes

    • ๐Ÿ‘• #8921: Prevent Lint/LiteralInInterpolation from removing necessary interpolation in %W[] and %I[] literals. (@knu)
    • ๐Ÿ‘• #8708: Fix bad regexp recognition in Lint/OutOfRangeRegexpRef when there are multiple regexps. (@dvandersluis)
    • ๐Ÿ— #8945: Fix changelog task to build a correct changelog item when Fix #123 is encountered. (@dvandersluis)
    • #8914: Fix autocorrection for Layout/TrailingWhitespace in heredocs. (@marcandre)
    • ๐Ÿ’… #8913: Fix an incorrect auto-correct for Style/RedundantRegexpCharacterClass due to quantifier. (@ysakasin)
    • #8917: Fix rubocop comment directives handling of cops with multiple levels in department name. (@fatkodima)
    • #8918: Fix a false positives for Bundler/DuplicatedGem when a gem conditionally duplicated within if-elsif or case-when statements. (@fatkodima)
    • #8933: Fix an error for Layout/EmptyLinesAroundAccessModifier when the first line is a comment. (@matthieugendreau)
    • ๐Ÿ’… #8954: Fix autocorrection for Style/RedundantRegexpCharacterClass with %r. (@ysakasin)

    ๐Ÿ”„ Changes

    • ๐Ÿ‘• #8920: Remove Capybara's save_screenshot from Lint/Debugger. (@ybiquitous)
    • #8919: Require RuboCop AST 1.0.1 or higher. (@koic)
    • ๐Ÿ’… #8939: Accept comparisons of multiple method calls for Style/MultipleComparison. (@koic)
    • ๐Ÿ‘• #8950: Add IgnoredMethods and IgnoredClasses to Lint/NumberConversion. (@dvandersluis)
  • v1.0.0 Changes

    October 21, 2020

    The first stable RuboCop release ever is finally here! You can read more about this special release here.

    ๐Ÿ†• New features

    • ๐Ÿ’… #7944: Add MaxUnannotatedPlaceholdersAllowed option to Style/FormatStringToken cop. (@Tietew)
    • ๐Ÿ’… #8379: Handle redundant parentheses around an interpolated expression for Style/RedundantParentheses cop. (@fatkodima)

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #8892: Fix an error for Style/StringConcatenation when correcting nested concatenable parts. (@fatkodima)
    • ๐Ÿ’… #8781: Fix handling of comments in Style/SafeNavigation autocorrection. (@dvandersluis)
    • #8907: Fix an incorrect auto-correct for Layout/ClassStructure when heredoc constant is defined after public method. (@koic)
    • #8889: Cops can use new after_<type> callbacks (only for nodes that may have children nodes, like :send and unlike :sym). (@marcandre)
    • #8906: Fix a false positive for Layout/SpaceAroundOperators when upward alignment. (@koic)
    • ๐Ÿ’… #8585: Fix false positive in Style/RedundantSelf cop with nested self access. (@marcotc)

    ๐Ÿ”„ Changes

    • #8882: (Potentially breaking) RuboCop assumes that Cop classes do not define new on_<type> methods at runtime (e.g. via extend in initialize). (@marcandre)
    • #7966: (Breaking) Enable all pending cops for RuboCop 1.0. (@koic)
    • #8490: (Breaking) Change logic for cop department name computation. Cops inside deep namespaces (5 or more levels deep) now belong to departments with names that are calculated by joining module names starting from the third one with slashes as separators. For example, cop Rubocop::Cop::Foo::Bar::Baz now belongs to Foo/Bar department (previously it was Bar). (@dsavochkin)
    • 0๏ธโƒฃ #8692: Default changed to disallow Layout/TrailingWhitespace in heredoc. (@marcandre)
    • ๐Ÿ”’ #8894: Make Security/Open aware of URI.open. (@koic)
    • #8901: Fix false positive for Naming/BinaryOperatorParameterName when defining =~. (@zajn)
    • #8908: Show extension cop versions when using --verbose-version option. (@koic)
  • v0.93.1 Changes

    October 12, 2020

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #8782: Fix incorrect autocorrection for Style/TernaryParentheses with defined?. (@dvandersluis)
    • ๐Ÿ‘• #8867: Rework Lint/RedundantSafeNavigation to be more safe. (@fatkodima)
    • ๐Ÿ’… #8864: Fix false positive for Style/RedundantBegin with a postfix while or until. (@dvandersluis)
    • ๐Ÿ’… #8869: Fix a false positive for Style/RedundantBegin when using begin for or assignment and method call. (@koic)
    • ๐Ÿ‘• #8862: Fix an error for Lint/AmbiguousRegexpLiteral when using regexp without method calls in nested structure. (@koic)
    • #8872: Fix an error for Metrics/ClassLength when multiple assignments to constants. (@koic)
    • ๐Ÿ’… #8871: Fix a false positive for Style/RedundantBegin when using begin for method argument or part of conditions. (@koic)
    • ๐Ÿ’… #8875: Fix an incorrect auto-correct for Style/ClassEqualityComparison when comparing class name. (@koic)
    • ๐Ÿ’… #8880: Fix an error for Style/ClassLength when overlapping constant assignments. (@koic)
  • v0.93.0 Changes

    October 08, 2020

    ๐Ÿ†• New features

    • ๐Ÿ‘• #8796: Add new Lint/HashCompareByIdentity cop. (@fatkodima)
    • ๐Ÿ’… #8833: Add new Style/ClassEqualityComparison cop. (@fatkodima)
    • ๐Ÿ‘• #8668: Add new Lint/RedundantSafeNavigation cop. (@fatkodima)
    • #8842: Add notification about cache being used to debug mode. (@hatkyinc2)
    • ๐Ÿ’… #8822: Make Style/RedundantBegin aware of begin without rescue or ensure. (@koic)

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #8810: Fix multiple offense detection for Style/RaiseArgs. (@pbernays)
    • ๐Ÿ‘• #8151: Fix a false positive for Lint/BooleanSymbol when used within %i[...]. (@fatkodima)
    • ๐Ÿ’… #8809: Fix multiple offense detection for Style/For. (@pbernays)
    • 0๏ธโƒฃ #8801: Fix Layout/SpaceAroundEqualsInParameterDefault only registered once in a line. (@rdunlop)
    • ๐Ÿ’… #8514: Correct multiple Style/MethodDefParentheses per file. (@rdunlop)
    • ๐Ÿ’… #8825: Fix crash in Style/ExplicitBlockArgument when code is called outside of a method. (@ghiculescu)
    • #8718: Fix undefined methods of pseudo location. (@ybiquitous)
    • ๐Ÿ’… #8354: Detect regexp named captures in Style/CaseLikeIf cop. (@dsavochkin)
    • ๐Ÿ’… #8821: Fix an incorrect autocorrect for Style/NestedTernaryOperator when using a nested ternary operator expression with no parentheses on the outside. (@koic)
    • ๐Ÿ’… #8834: Fix a false positive for Style/ParenthesesAsGroupedExpression when method argument parentheses are omitted and hash argument key is enclosed in parentheses. (@koic)
    • ๐Ÿ’… #8830: Fix bad autocorrect of Style/StringConcatenation when string includes double quotes. (@tleish)
    • ๐Ÿ’… #8807: Fix a false positive for Style/RedundantCondition when using assignment by hash key access. (@koic)
    • ๐Ÿ’… #8848: Fix a false positive for Style/CombinableLoops when using the same method with different arguments. (@dvandersluis)
    • ๐Ÿ‘• #8843: Fix an incorrect autocorrect for Lint/AmbiguousRegexpLiteral when sending method to regexp literal receiver. (@koic)
    • #8842: Save actual status to cache, except corrected. (@hatkyinc2)
    • ๐Ÿ’… #8835: Fix an incorrect autocorrect for Style/RedundantInterpolation when using string interpolation for non-operator methods. (@koic)
    • ๐Ÿ‘• #7495: Example for Lint/AmbiguousBlockAssociation cop. (@AllanSiqueira)
    • ๐Ÿ’… #8855: Fix an error for Layout/EmptyLinesAroundAccessModifier and Style/AccessModifierDeclarations when using only access modifier. (@koic)

    ๐Ÿ”„ Changes

    • #8803: (Breaking) RegexpNode#parsed_tree now processes regexps including interpolation (by blanking the interpolation before parsing, rather than skipping). (@owst)
    • ๐Ÿ’… #8625: Improve Style/RedundantRegexpCharacterClass and Style/RedundantRegexpEscape by using regexp_parser gem. (@owst)
    • #8646: Faster find of all files in TargetFinder class which improves initial startup speed. (@tleish)
    • #8102: Consider class length instead of block length for Struct.new. (@tejasbubane)
    • ๐Ÿ’Ž #7408: Make Gemspec/RequiredRubyVersion cop aware of Gem::Requirement. (@tejasbubane)
  • v0.92.0 Changes

    September 25, 2020

    ๐Ÿ†• New features

    ๐Ÿ› Bug fixes

    • #8774: Fix a false positive for Layout/ArrayAlignment with parallel assignment. (@dvandersluis)

    ๐Ÿ”„ Changes

    • โšก๏ธ #8785: Update TargetRubyVersion 2.8 to 3.0 (experimental). (@koic)
    • #8650: Faster find of hidden files in TargetFinder class which improves rubocop initial startup speed. (@tleish)
    • ๐Ÿ’… #8783: Disable Style/ArrayCoercion cop by default. (@koic)
  • v0.91.1 Changes

    September 23, 2020

    ๐Ÿ› Bug fixes

    • ๐Ÿ‘• #8720: Fix an error for Lint/IdentityComparison when calling object_id method without receiver in LHS or RHS. (@koic)
    • ๐Ÿ’… #8767: Fix a false positive for Style/RedundantReturn when a rescue has an else clause. (@fatkodima)
    • #8710: Fix a false positive for Layout/RescueEnsureAlignment when Layout/BeginEndAlignment cop is not enabled status. (@koic)
    • #8726: Fix a false positive for Naming/VariableNumber when naming multibyte character variable name. (@koic)
    • ๐Ÿ‘• #8730: Fix an error for Lint/UselessTimes when there is a blank line in the method definition. (@koic)
    • ๐Ÿ’… #8740: Fix a false positive for Style/HashAsLastArrayItem when the hash is in an implicit array. (@dvandersluis)
    • ๐Ÿ‘• #8739: Fix an error for Lint/UselessTimes when using empty block argument. (@koic)
    • #8742: Fix some assignment counts for Metrics/AbcSize. (@marcandre)
    • ๐Ÿ’… #8750: Fix an incorrect auto-correct for Style/MultilineWhenThen when line break for multiple condidate values of when statement. (@koic)
    • ๐Ÿ’… #8754: Fix an error for Style/RandomWithOffset when using a range with non-integer bounds. (@eugeneius)
    • #8756: Fix an infinite loop error for Layout/EmptyLinesAroundAccessModifier with Layout/EmptyLinesAroundBlockBody when using access modifier with block argument. (@koic)
    • ๐Ÿ‘• #8372: Fix Lint/RedundantCopEnableDirective autocorrection to not leave orphaned empty # rubocop:enable comments. (@dvandersluis)
    • ๐Ÿ‘• #8372: Fix Lint/RedundantCopDisableDirective autocorrection. (@dvandersluis)
    • #8764: Fix Layout/CaseIndentation not showing the cop name in output messages. (@dvandersluis)
    • ๐Ÿ’… #8771: Fix an error for Style/OneLineConditional when using if-then-elsif-then-end. (@koic)
    • ๐Ÿ’… #8576: Fix Style/IfUnlessModifier to ignore cop disable comment directives when considering conversion to the modifier form. (@dsavochkin)

    ๐Ÿ”„ Changes

    • #8489: Exclude method respond_to_missing? from OptionalBooleanParameter cop. (@em-gazelle)
    • ๐Ÿ’… #7914: Style/SafeNavigation marked as having unsafe auto-correction. (@marcandre)
    • ๐Ÿ’… #8749: Disable Style/IpAddresses by default in Gemfile and gemspec files. (@dvandersluis)
  • v0.91.0 Changes

    September 15, 2020

    ๐Ÿ†• New features

    • New option --cache-root and support for the RUBOCOP_CACHE_ROOT environment variable. Both can be used to override the AllCops: CacheRootDirectory config, especially in a CI setting. (@sascha-wolf)
    • #8582: Add new Layout/BeginEndAlignment cop. (@koic)
    • ๐Ÿ‘• #8699: Add new Lint/IdentityComparison cop. (@koic)
    • โž• Add new Lint/UselessTimes cop. (@dvandersluis)
    • ๐Ÿ‘• #8707: Add new Lint/ConstantDefinitionInBlock cop. (@eugeneius)

    ๐Ÿ› Bug fixes

    • ๐Ÿ‘• #8627: Fix a false positive for Lint/DuplicateRequire when same feature argument but different require method. (@koic)
    • #8674: Fix an error for Layout/EmptyLineAfterMultilineCondition when conditional is at the top level. (@fatkodima)
    • ๐Ÿ’… #8658: Fix a false positive for Style/RedundantSelfAssignment when calling coercion methods. (@fatkodima)
    • ๐Ÿ‘• #8669: Fix an offense creation for Lint/EmptyFile. (@fatkodima)
    • ๐Ÿ‘• #8607: Fix a false positive for Lint/UnreachableLoop when conditional branch includes continue statement preceding break statement. (@fatkodima)
    • ๐Ÿ’… #8572: Fix a false positive for Style/RedundantParentheses when parentheses are used like method argument parentheses. (@koic)
    • ๐Ÿ’… #8630: Fix some false positives for Style/HashTransformKeys and Style/HashTransformValues when the receiver is an array. (@eugeneius)
    • #8653: Fix a false positive for Layout/DefEndAlignment when using refinements and private def. (@koic)
    • ๐Ÿ’… #8655: Fix a false positive for Style/ClassAndModuleChildren when using cbase class name. (@koic)
    • ๐Ÿ’… #8654: Fix a false positive for Style/SafeNavigation when checking foo&.empty? in a conditional. (@koic)
    • ๐Ÿ’… #8660: Fix a false positive for Style/ClassAndModuleChildren when using cbase module name. (@koic)
    • #8664: Fix a false positive for Naming/BinaryOperatorParameterName when naming multibyte character method name. (@koic)
    • #8604: Fix a false positive for Bundler/DuplicatedGem when gem is duplciated in condition. (@tejasbubane)
    • ๐Ÿ’… #8671: Fix an error for Style/ExplicitBlockArgument when using safe navigation method call. (@koic)
    • ๐Ÿ’… #8681: Fix an error for Style/HashAsLastArrayItem with no_braces for empty hash. (@fsateler)
    • #8682: Fix a positive for Style/HashTransformKeys and Style/HashTransformValues when the each_with_object hash is used in the transformed key or value. (@eugeneius)
    • ๐Ÿ’… #8688: Mark Style/GlobalStdStream as unsafe autocorrection. (@marcandre)
    • ๐Ÿ’… #8642: Fix a false negative for Style/SpaceInsideHashLiteralBraces when a correct empty hash precedes the incorrect hash. (@dvandersluis)
    • #8683: Make naming cops work with non-ascii characters. (@tejasbubane)
    • ๐Ÿ‘• #8626: Fix false negatives for Lint/UselessMethodDefinition. (@marcandre)
    • ๐Ÿ‘ป #8698: Fix cache to avoid encoding exception. (@marcandre)
    • ๐Ÿ‘• #8704: Fix an error for Lint/AmbiguousOperator when using safe navigation operator with a unary operator. (@koic)
    • ๐Ÿ’… #8661: Fix an incorrect auto-correct for Style/MultilineTernaryOperator when returning a multiline ternary operator expression. (@koic)
    • ๐Ÿ’… #8526: Fix a false positive for Style/CaseEquality cop when the receiver is not a camel cased constant. (@koic)
    • ๐Ÿ“œ #8673: Fix the JSON parse error when specifying --format=json and --stdin options. (@koic)

    ๐Ÿ”„ Changes

    • ๐Ÿ’… #8470: Do not autocorrect Style/StringConcatenation when parts of the expression are too complex. (@dvandersluis)
    • ๐Ÿ‘• #8561: Fix Lint/UselessMethodDefinition to not register an offense when method definition includes optional arguments. (@fatkodima)
    • ๐Ÿ’… #8617: Fix Style/HashAsLastArrayItem to not register an offense when all items in an array are hashes. (@dvandersluis)
    • ๐Ÿ‘• #8500: Add in? to AllowedMethods for Lint/SafeNavigationChain cop. (@tejasbubane)
    • ๐Ÿ— #8629: Fix the cache being reusable in CI by using crc32 to calculate file hashes rather than mtime, which changes each CI build. (@dvandersluis)
    • ๐Ÿ’… #8663: Fix multiple autocorrection bugs with Style/ClassMethodsDefinitions. (@dvandersluis)
    • #8621: Add helpful Infinite Loop error message. (@iSarCasm)
  • v0.90.0 Changes

    September 01, 2020

    ๐Ÿ†• New features

    • ๐Ÿ’… #8451: Add new Style/RedundantSelfAssignment cop. (@fatkodima)
    • #8384: Add new Layout/EmptyLineAfterMultilineCondition cop. (@fatkodima)
    • ๐Ÿ’… #8390: Add new Style/SoleNestedConditional cop. (@fatkodima)
    • ๐Ÿ’… #8562: Add new Style/KeywordParametersOrder cop. (@fatkodima)
    • ๐Ÿ’… #8486: Add new Style/CombinableLoops cop. (@fatkodima)
    • ๐Ÿ’… #8381: Add new Style/ClassMethodsDefinitions cop. (@fatkodima)
    • ๐Ÿ‘• #8474: Add new Lint/DuplicateRequire cop. (@fatkodima)
    • ๐Ÿ‘• #8472: Add new Lint/UselessMethodDefinition cop. (@fatkodima)
    • ๐Ÿ‘• #8531: Add new Lint/EmptyFile cop. (@fatkodima)
    • โž• Add new Lint/TrailingCommaInAttributeDeclaration cop. (@drenmi)
    • #8578: Add :restore_registry context and stub_cop_class helper class. (@marcandre)
    • ๐Ÿ“š #8579: Add Cop.documentation_url. (@marcandre)
    • ๐Ÿ“œ #8510: Add RegexpNode#each_capture and parsed_tree. (@marcandre)
    • โšก๏ธ #8365: Cops defining on_send can be optimized by defining the constant RESTRICT_ON_SEND with a list of acceptable method names. (@marcandre)

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #8508: Fix a false positive for Style/CaseLikeIf when conditional contains comparison with a class. Mark Style/CaseLikeIf as not safe. (@fatkodima)
    • #8618: Fix an infinite loop error for Layout/EmptyLineBetweenDefs. (@fatkodima)
    • ๐Ÿ‘• #8534: Fix Lint/BinaryOperatorWithIdenticalOperands for binary operators used as unary operators. (@marcandre)
    • #8537: Allow a trailing comment as a description comment for Bundler/GemComment. (@pocke)
    • ๐Ÿ’… #8507: Fix Style/RescueModifier to handle parentheses around rescue modifiers. (@dsavochkin)
    • ๐Ÿ’… #8527: Prevent an incorrect auto-correction for Style/CaseEquality cop when comparing with === against a regular expression receiver. (@koic)
    • #8524: Fix Layout/EmptyLinesAroundClassBody and Layout/EmptyLinesAroundModuleBody to correctly handle an access modifier as a first child. (@dsavochkin)
    • ๐Ÿ‘• #8518: Fix Lint/ConstantResolution cop reporting offense for module and class definitions. (@tejasbubane)
    • ๐Ÿ’… #8158: Fix Style/MultilineWhenThen cop to correctly handle cases with multiline body. (@dsavochkin)
    • ๐Ÿ’… #7705: Fix Style/OneLineConditional cop to handle if/then/elsif/then/else/end cases. Add AlwaysCorrectToMultiline config option to this cop to always convert offenses to the multi-line form (false by default). (@Lykos, @dsavochkin)
    • #8590: Fix an error when auto-correcting encoding mismatch file. (@koic)
    • ๐Ÿ’… #8321: Enable auto-correction for Layout/{Def}EndAlignment, Lint/EmptyEnsure, Style/ClassAndModuleChildren. (@marcandre)
    • ๐Ÿ’… #8583: Fix Style/RedundantRegexpEscape false positive for line continuations. (@owst)
    • ๐Ÿ’… #8593: Fix Style/RedundantRegexpCharacterClass false positive for interpolated multi-line expressions. (@owst)
    • ๐Ÿ’… #8624: Fix an error with the Style/CaseLikeIf cop where it does not properly handle overridden equality methods with no arguments. (@Skipants)

    ๐Ÿ”„ Changes

    • โš  #8413: Pending cops warning now contains snippet that can be directly copied into .rubocop.yml as well as a notice about NewCops: enable config option. (@colszowka)
    • #8362: Add numbers of correctable offenses to summary. (@nguyenquangminh0711)
    • ๐Ÿ“š #8513: Clarify the ruby warning mentioned in the Lint/ShadowingOuterLocalVariable documentation. (@chocolateboy)
    • ๐Ÿ’… #8517: Make Style/HashTransformKeys and Style/HashTransformValues aware of to_h with block. (@eugeneius)
    • ๐Ÿ‘• #8529: Mark Lint/FrozenStringLiteralComment as Safe, but with unsafe auto-correction. (@marcandre)
    • ๐Ÿ’Ž #8602: Fix usage of to_enum(:scan, regexp) to work on TruffleRuby. (@jaimerave)
  • v0.90.0-antora

    September 01, 2020
  • v0.89.1 Changes

    August 10, 2020

    ๐Ÿ› Bug fixes

    • ๐Ÿ‘• #8463: Fix false positives for Lint/OutOfRangeRegexpRef when a regexp is defined and matched in separate steps. (@eugeneius)
    • #8464: Handle regexps matched with when, grep, gsub, gsub!, sub, sub!, [], slice, slice!, scan, index, rindex, partition, rpartition, start_with?, and end_with? in Lint/OutOfRangeRegexpRef. (@eugeneius)
    • ๐Ÿ‘• #8466: Fix a false positive for Lint/UriRegexp when using regexp method without receiver. (@koic)
    • ๐Ÿ‘• #8478: Relax Lint/BinaryOperatorWithIdenticalOperands for mathematical operations. (@marcandre)
    • ๐Ÿ‘• #8480: Tweak callback list of Lint/MissingSuper. (@marcandre)
    • ๐Ÿ’… #8481: Fix autocorrect for elements with newlines in Style/SymbolArray and Style/WordArray. (@biinari)
    • ๐Ÿ’… #8475: Fix a false positive for Style/HashAsLastArrayItem when there are duplicate hashes in the array. (@wcmonty)
    • ๐Ÿ’… #8497: Fix Style/IfUnlessModifier to add parentheses when converting if-end condition inside a parenthesized method argument list. (@dsavochkin)

    ๐Ÿ”„ Changes

    • ๐Ÿ’… #8487: Detect < and > as comparison operators in Style/ConditionalAssignment cop. (@biinari)