Recent Releases of https://github.com/rubocop/rubocop
https://github.com/rubocop/rubocop - RuboCop v1.85.0
New features
- #14921: Add
mise.tomlas source for TargetRubyVersion. (@kitsane) - #14925: Add new
Lint/UnreachablePatternBranchcop. (@sferik) - #14942: Add new
Style/FileOpencop. (@sferik) - #14939: Add new
Style/MapJoincop. (@sferik) - #14924: Add new
Style/OneClassPerFilecop. (@sferik) - #14923: Add new
Style/PartitionInsteadOfDoubleSelectcop. (@sferik) - #14811: Add new
Style/PredicateWithKindcop. (@sferik) - #14938: Add new
Style/ReduceToHashcop. (@sferik) - #14812: Add new
Style/RedundantMinMaxBycop. (@sferik) - #13501: Add new
Style/RedundantStructKeywordInitcop. (@koic) - #14808: Add new
Style/SelectByKindcop. (@sferik) - #14810: Add new
Style/SelectByRangecop. (@sferik) - #14922: Add new
Style/TallyMethodcop. (@sferik) - #14773: Add new
Lint/DataDefineOverridecop. (@bbatsov) - #14781: Add new
InternalAffairs/ItblockHandlercop. (@bbatsov) - #14911: Support built-in MCP server (experimental). (@koic)
Bug fixes
- #14829: Allow classes without a superclass in
Style/EmptyClassDefinition. (@koic) - #14873: Fix an error in
Style/NegatedWhilewhen the last expression of anuntilcondition is negated. (@koic) - #14827: Improve
Style/EmptyClassDefinitionmessage wording. (@bbatsov) - #14800: Fix false obsolete configuration error for extracted cops when loaded as plugins. (@bbatsov)
- #14928: Fix a false positive for
Lint/Voidwhennilis used incasebranch. (@5hun-s) - #14857: Fix false positives in
Style/IfUnlessModifierwhen modifier forms are used inside string interpolations. (@koic) - #8773: Fix false positives in
Style/HashTransformKeysandStyle/HashTransformValues. (@sferik) - #6963: Fix false positives in
Lint/Voidforeachblocks where the return value may be meaningful (e.g.,Enumerator#each). (@sferik) - #14931: Ignore directive comments inside comments. (@koic)
- #14834: Fix
Layout/IndentationWidthfalse positive for chained method blocks whenEnforcedStyleAlignWithisstart_of_line. (@krororo) - #14756: Fix
Lint/Voidto detect void expressions incase/whenbranches. (@bbatsov) - #14874: Fix a
Parser::ClobberingErrorinLint/UselessAssignmentwhen autocorrecting a useless assignment that wraps a block containing another useless assignment. (@koic) - #14880: Fix a false negative in
Layout/MultilineAssignmentLayoutwhen usingnumblockoritblockwithSupportedTypes: ['block']. (@bbatsov) - #11462: Fix over-indentation when autocorrecting nested hashes with
Layout/FirstHashElementIndentation. (@ydakuka) - #14880: Recognize block on different line from left side of multi-line assignment in
Layout/MultilineAssignmentLayout. (@sanfrecce-osaka) - #14641: Fix false positive in
Lint/RedundantSafeNavigationwhen using&.respond_to?with methods defined onObject(e.g.,:class). (@bbatsov) - #14098: Mark
Lint/SafeNavigationConsistencyautocorrect as unsafe. (@bbatsov) - #14791: Fix autocorrect producing
SyntaxErrorinLint/InterpolationCheckwhen single quoted string contains double quotes with invalid interpolation. (@ydakuka)
Changes
- #14872: Tweak autocorrection in
Style/HashAsLastArrayItemwhen multiline hash elements. (@koic) - #14917: Change
Style/EndlessMethodcop to consider receivers. (@fatkodima) - #14851: Reduce precision in 'Finished in X.X seconds' message to 5 decimal places. (@ZimbiX)
- #14895: Rename
class_definitiontoclass_keywordinEnforcedStyleofStyle/EmptyClassDefinition. (@koic) - #14956: Add support for
String.newwith interpolated strings toStyle/RedundantInterpolationUnfreeze. (@lovro-bikic) - #14955: Register redundant parentheses around block body in
Style/RedundantParentheses. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 6 days ago
https://github.com/rubocop/rubocop - RuboCop v1.84.2
Bug fixes
- #14854: Fix a clobbering error in
Style/BlockDelimiterswhen autocorrecting nested multi-line blocks with adjacent curly braces. (@koic) - #14837: Fix an error for
Style/IfUnlessModifierwhen the first value uses a normalifand the others use modifierif. (@koic) - #14858: Fix an infinite loop error in
Layout/FirstArgumentIndentationwhen first arguments are over-indented in nested method calls. (@koic) - #14843: Fix an error in
Layout/MultilineMethodCallIndentationwhen a multiline method call follows a hash access. (@koic) - #14859: Fix an error in
Layout/MultilineMethodCallIndentationwhen a multiline method call includes a keyword argument whose value is a method call with a block. (@koic) - #14839: Fix a false positive for
Layout/EmptyLinesAfterModuleInclusionwhenincludeis nested inside an array. (@eugeneius) - #7436: Fix
Style/FormatStringTokento not autocorrect strings outside of format method context in aggressive mode. (@ydakuka) - #14841: Fix false negatives in
Style/HashAsLastArrayItemwhen an array contains only a single hash element. (@koic) - #14865: Fix false negatives in
Style/MethodDefParentheseswhen using splat or forwarding arguments without parentheses. (@koic) - #14833: Fix false positive for
Layout/MultilineMethodCallIndentationwhen a multi-dot method chain is inside a hash pair value. (@ydakuka) - #14847: Fix false positive for
Layout/MultilineMethodCallIndentationwhen a method is chained after a single-line block. (@ydakuka) - #14867: Fix
Offense#highlighted_areaforPseudoSourceRangelocations. (@rafaelfranca) - #14861: Fix an error in
Style/IfUnlessModifierwhen the first value uses a normalifand the others use ternary operator. (@koic) - #14816: Use toplevel cache configs for remote configuration files. (@nekketsuuu)
- Ruby
Published by github-actions[bot] 20 days ago
https://github.com/rubocop/rubocop - RuboCop v1.84.1
Bug fixes
- #14803: Fix an error for
Layout/IndentationWidthcop. (@viralpraxis) - #14806: Fix an error in
Style/NegativeArrayIndexwhen usingselfas array with implicitselfreceiver. (@koic) - #14813: Fix opt-in cop comments taking precedence over configuration file exclude patterns. (@afrase)
- #14819: Fix incorrect autocorrect for
Style/GuardClausewhen using heredoc as an argument of method call in raise inelsebranch. (@koic) - #14805: Bring back the original indentation from before version 1.84.0. (@Magikdidi24)
- #12754: Fix an infinite loop for
Style/IfUnlessModifierwhen multipleif/unlessstatements share the same line in arrays, method arguments, or hash values. (@ydakuka) - #14817: Fix an infinite loop between
Layout/FirstArgumentIndentationandLayout/LineLengthwhen correcting method chains. (@ydakuka) - #11513: Fix
Layout/MultilineMethodCallIndentationto properly handle method chains inside hash pair values. (@ydakuka) - #14814: Fix push/pop directives to properly handle nested scopes and state restoration. (@Magikdidi24)
Changes
- #14823: Add the built-in
infinite?method to the allowlists forNaming/PredicateMethod,Style/IfWithBooleanLiteralBranches, andStyle/RedundantCondition, in addition to the existingnonzero?. (@koic) - #14735: Remove deprecated InjectDefaults handling. (@afurm)
- Ruby
Published by github-actions[bot] 29 days ago
https://github.com/rubocop/rubocop - RuboCop v1.84.0
New features
- #14516: Add
AllowImplicitArrayLiteralstoLayout/FirstArrayElementLineBreak. (@koic) - #14750: Add new
Style/ReverseFindcop. (@koic) - #12343: Add new
Style/EmptyClassDefinitioncop to enforce consistent style for empty class definitions. The cop can enforce either a two-line class definition orClass.newfor classes with no body. (@ydakuka) - #14769: Add new
Style/HashLookupMethodcop to enforceHash#[]vsHash#fetchpreference. (@sferik) - #12051: Add new
Style/NegativeArrayIndexcop to enforce using negative array indices instead of calculating array length minus a value. The cop handles both simple index patterns and range patterns, and recognizes preserving methods and their combinations. (@ydakuka) - #14633: Make a new system to handle push and pop locally. (@Magikdidi24)
- #14722: Support
TargetRubyVersion 4.1(experimental). (@koic)
Bug fixes
- #14697: Allow non-method calls in
CategoriesforLayout/ClassStructure. (@fatkodima) - #14784: Fix an error for
Style/GuardClausewhen using heredoc as an argument of raise inelsebranch andifbranch is empty. (@koic) - #14790: Fix an error for
Style/HashLookupMethodcop when there's no receiver. (@viralpraxis) - #14779: Fix autocorrect crash with
ruby_extractorwhen usingoffset: 0and different source buffers. (@ydakuka) - #14762: Fix false negatives for
Style/RedundantConditionwhen the branches contains constant assignment. (@koic) - #14751: Fix
--force-default-confignot preventing project config loading when used with options that access configuration. (@sakuro) - #14783: Fix incorrect autocorrect for
Style/HashSyntaxwhen shorthand syntax is used in condition ofif/unless/while/until. (@ydakuka) - #14747: Fix a regression in
Layout/IndentationWidthby adding a newEnforcedStyleAlignWithstyle parameter. (@MikeMcQuaid) - #14716: Fix an infinite loop error for
Layout/LineLengthwhenSplitStringsoption is enabled and strings span multiple lines. (@HariprasanthMSH) - #14763: Fix an infinite loop error for
Layout/IndentationWidthandLayout/IndentationConsistencywhen usingEnforcedStyle: indented_internal_methodswith method chain blocks. (@ydakuka) - #9373: Fix an infinite loop error for
Layout/IndentationWidthwhen autocorrecting mixed tabs and spaces in blocks. Fix an infinite loop error forLayout/DefEndAlignmentandLayout/IndentationStylewhen autocorrecting mixed tabs and spaces. Autocorrection for tabs is disabled inAlignmentCorrectorfor indentation offenses, but enabled foralign_end. (@ydakuka) - #12295: Fix
Layout/FirstArgumentIndentationto correct entire method calls and chains for nested calls. (@ydakuka) - #12527: Fix
Offense#highlighted_areato return a validParser::Source::Range. (@ydakuka) - #14801: Preserve source tabs in Clang and Tap formatters when displaying offense highlight. (@lovro-bikic)
- #14761: Improved the remote configuration file name on the cache location. (@Jack12816)
- #14778: Fix a false positive for
Security/JSONLoadwhencreate_additionsoption is passed with other options in a hash. (@wktk) - #14796: Handle logical and operator assignment nodes in variable branch handling. (@lovro-bikic)
Changes
- #14753: Add support for
squishandsquish!applied to heredoc toLayout/HeredocIndentation. (@lovro-bikic) - #14798: Recognize
Forwardablemethods inLint/DuplicateMethods. (@lovro-bikic) - #14793: Make
Lint/RedundantSplatExpansionaware of constant assignment. (@koic) - #14770: Make
Style/AccessModifierDeclarationsaware of self class. (@koic) - #14748: Add support for other
Modulemember existence methods toStyle/ModuleMemberExistenceCheck. (@lovro-bikic) - #14795: Add
AllowedMethodsconfiguration toStyle/ModuleMemberExistenceCheck. (@lovro-bikic)
- Ruby
Published by github-actions[bot] about 1 month ago
https://github.com/rubocop/rubocop - RuboCop v1.82.1
Bug fixes
- #14736: Fix an error for
Style/TrailingCommaInArgumentswhenEnforcedStyleForMultilineisconsistent_commaand keyword arguments use a trailing comma. (@koic) - #14737: Fix crash in
Layout/RedundantLineBreakwhenLayout/LineLengthis disabled. (@ydakuka) - #14719: Fix crash on long lines when
Layout/LineLengthis disabled. (@floriandejonckheere) - #14743: Fix false positives for
Layout/MultilineMethodCallIndentationwhen multiline method chain with block has expected indent width and the method is preceded by splat or double splat. (@koic) - #12297: Fix false negative in
Layout/IndentationWidthfor multiline method chain blocks. (@rscq) - #14730: Fix the cache implementation to use consistent cache keys across workers. (@byroot)
- #14559: Fix false positives for
Lint/UselessAssignmentwhen a variable is assigned in loop body and used in loop condition. (@ydakuka)
- Ruby
Published by github-actions[bot] 2 months ago
https://github.com/rubocop/rubocop - RuboCop v1.82.0
New features
- #14655: Add
AllowRBSInlineAnnotationoption toLayout/LineLength. (@koic) - #14569: Add
IncludedMacroPatternsconfiguration option toStyle/MethodCallWithArgsParenthesesfor pattern-based macro method enforcement. (@mmenanno) - #14670: Add new cop
Style/ModuleMemberExistenceCheck. (@lovro-bikic) - #14644: Support
TargetRubyVersion 4.0(experimental). (@koic)
Bug fixes
- #14649: Fix an error for
Lint/LiteralAsConditionwhen there are literals in multiple branches. (@viralpraxis) - #14678: Fix an error when running deprecated
rake rubocop:auto_correcttask. (@koic) - #14650: Fix wrong autocorrect for
Lint/RedundantSplatExpansionwhen splatting a single literal. (@earlopain) - #14703: Fix false negatives for
Layout/RescueEnsureAlignmentwhen using self class definition. (@koic) - #14706: Fix false negatives for
Lint/NoReturnInBeginEndBlockswhen assigning instance variable, class variable, global variable, or constant. (@koic) - #14715: Fix false positives for
Layout/EmptyLineAfterGuardClausewhen a guard clause follows a multiline heredoc in a parenthesized method call. (@koic) - #14667: Fix false positives for
Layout/EndAlignmentwhen a conditional assignment is used on the same line and theendwith a safe navigation method call is aligned. (@koic) - #14688: Fix false positives for
Layout/EndAlignmentwhen a conditional assignment is used on the same line and theendwith a numbered block oritblock method call is aligned. (@koic) - #14699: Fix false positives for
Lint/RedundantSafeNavigationwhen the receiver is used outside the singleton method definition scope. (@koic) - #14663: Fix false positives for
Style/EndlessMethodwhen multiline or xstring heredoc is used in method body. (@koic) - #10173: Fix false positives for
Style/TrailingCommaInArgumentswhenEnforcedStyleForMultilineis set toconsistent_commaand a multiline braced hash argument appears after another argument. (@koic) - #14680: Handle all
OptionParsererrors when runningrubocopwith input that causes an error. (@dvandersluis) - #14658: Fix incorrect behavior when
Layout/LineLengthis disabled. (@koic) - #14704: Fix incorrect Position character value in LSP. (@tmtm)
- #14619: Store remote configuration caches in cache root. (@Jack12816)
- #14476: Fix
Style/ClassAndModuleChildrento skip compact style definitions inside another class or module whenEnforcedStyle: nested. (@rscq) - #14281: Update
Layout/EndAlignmentwithEnforcedStyleAlignWith: variableto handle conditionals insidebeginnodes properly. (@dvandersluis)
Changes
- #14662: Add autocorrection for
Lint/UselessOr. (@r7kamura) - #14668: Exclude
Severityfrom configuration parameters. (@r7kamura) - #14684: Make
Style/CaseEqualityallow regexp case equality where the receiver is a regexp literal. (@koic) - #14645: Change
Lint/CircularArgumentReferenceto detect offenses within long assignment chains. (@viralpraxis) - #14642: Make
Gemspec/RubyVersionGlobalsUsageaware ofRuby::VERSION. (@koic) - #14695: Make
Layout/EmptyLineAfterMagicCommentaware of# rbs_inlinemagic comment. (@koic) - #10147: Make
Lint/ElseLayoutallow a single-lineelsebody inthensingle-line conditional. (@koic) - #14661: Make
Lint/RedundantRequireStatementaware ofpathnamewhen analyzing Ruby 4.0. (@koic) - #14698: Make
Lint/UnreachableCodeaware of singleton method redefinition. (@koic) - #14677: Make
Style/RedundantArgumentaware ofto_i. (@koic) - #14660: Rename
IgnoreCopDirectivestoAllowCopDirectivesinLayout/LineLength. (@koic) - #14492: Revert #14492, which added support for LSP positionEncoding 'utf-8' and 'utf-32' due to critical performance regression reports. (@koic)
- Ruby
Published by github-actions[bot] 3 months ago
https://github.com/rubocop/rubocop - RuboCop v1.81.7
Bug fixes
- #14597: Fix an infinite loop error for
Layout/HashAlignmentwhenEnforcedStyle: with_fixed_indentationis specified forLayout/ArgumentAlignment. (@koic) - #14621: Fix an error for
Naming/PredicateMethodwhen using aninpattern with empty parentheses body. (@koic) - #14631: Fix an error for
Style/SoleNestedConditionalwhen using nested single lineif. (@koic) - #14626: Fix false positives in
Style/ConstantVisibilitywhen visibility is declared with multiple constants. (@koic) - #14628: Fix false positives for
Style/FloatDivisionwhen usingRegexp.last_matchor nth reference (e.g.,$1). (@koic) - #14617: Handle non-specific issues with the Gemfile to allow fallback. (@Fryguy)
- #14622: Fix an error for
Naming/MethodNamewhen the first argument toaliascontains interpolation. (@earlopain)
- Ruby
Published by github-actions[bot] 4 months ago
https://github.com/rubocop/rubocop - RuboCop v1.81.6
Bug fixes
- #14587: Fix an error for
Lint/SelfAssignmentwhen using[]=assignment with no arguments. (@koic) - #14572: Fix an error for
Style/ArrayIntersectwhenintersection(other).any?is called without a receiver. (@koic) - #14599: Fix a crash when
Style/ConditionalAssignmentis configured withassign_inside_conditionaland the conditional contains a multi-line regex. (@martinemde) - #14574: Fix false positives for
Style/RedundantInterpolationwhen using a one-line=>pattern matching. (@koic) - #14602: Fix false positives for
Style/EndlessMethodwhen heredoc is used in method body. (@koic) - #14594: Fix false positives for
Style/EndlessMethodwhen the endless method would exceed the maximum line length. (@koic) - #14605: Fix false positive for
Lint/EmptyInterpolationwhen interpolation is inside a%Wliteral. (@dvandersluis) - #14604: Fix
Style/RedundantFormatfalse positive when a interpolated value is given to a specifier with a width or precision. (@dvandersluis) - #14607: Fix
Style/RedundantFormathandling control characters like\n. (@dvandersluis) - #14577: Fix an incorrect autocorrect for
Style/Semicolonwhen a method call using hash value omission without parentheses is terminated with a semicolon. (@koic) - #14552: Fix a false positive for
Security/JSONLoadwhencreate_additionsis explicitly specified. (@earlopain)
Changes
- #14566: Enhance
Lint::ConstantOverwrittenInRescuecop to detect offenses within fully qualified constants. (@viralpraxis) - #14575: Enhance
Lint/ConstantOverwrittenInRescuecop to detect offenses within nested constants. (@viralpraxis) - #14596: Change
Lint/ConstantOverwrittenInRescueto detect any constant assignment. (@viralpraxis) - #14568: Make
Style/LambdaCallautocorrection contextual. (@koic)
- Ruby
Published by github-actions[bot] 4 months ago
https://github.com/rubocop/rubocop - RuboCop v1.81.1
Bug fixes
- #14563: Fix incorrect autocorrection for
Lint/DeprecatedOpenSSLConstantwhenCipherappears twice. (@koic)
Changes
- #14565: Allow multiline method chain for
Style/NumberedParametersandStyle/ItBlockParameterwithEnforcedStyle: allow_single_linewhen the block itself is on a single line. (@earlopain)
- Ruby
Published by github-actions[bot] 5 months ago
https://github.com/rubocop/rubocop - RuboCop v1.81.0
New features
- #14512: Add
Style/ArrayIntersectWithSingleElementcop. (@r7kamura) - #10971: Support
EnforcedStyleForMultiline: diff_commainStyle/TrailingCommaInArguments. (@akouryy)
Bug fixes
- #14560: Fix an error for
Style/NilComparisoncop when using thevar.==(nil)andvar.===(nil)syntax. (@viralpraxis) - #14535: Fix autocorrect for
Style/ExplicitBlockArgumentwhen there are two methods that share the same implementation. (@earlopain) - #14527: Fix false negatives for
Style/NumberedParametersandStyle/ItBlockParameterwhen using multiline method chain withEnforcedStyle: allow_single_line. (@koic) - #14522: Fix false negatives for
Layout/MultilineOperationIndentationwhen using indented code on LHS of equality operator in modifier method definition. (@koic) - #14496: Fix false negatives for
Layout/EmptyLineBetweenDefsforAllowAdjacentOneLineDefs: falseandDefLikeMacrosthat take no block. (@earlopain) - #14553: Fix false positives when
EnforcedStyle: allowed_in_returnsand!!appears across multiple lines in return position. (@koic) - #14557: Fix false positives for
Style/RedundantParentheseswhen parentheses are used around a one-linerescueexpression as a condition. (@koic) - #14525: Fix false positives for
Style/RedundantRegexpEscapewhen an escaped variable sigil follows#(e.g.,/#\@foo/,/#\@@bar/,/#\$baz/). (@koic) - #14529: Fix false negative in
Layout/RescueEnsureAlignmentwith a block whose send node is split over multiple lines. (@dvandersluis) - #14528: Fix
Style/RedundantFormatwhen the format string has a variable width that isn't given as a literal value. (@dvandersluis) - #14541: Fix gemspec parsing error when
ParserEngine: parser_prismis configured in a base config file. (@sudoremo) - #14544: Fix an incorrect autocorrect for
Lint/Voidwhen using a return value in assignment method definition. (@koic) - #14543: Fix an incorrect autocorrect for
Style/RedundantRegexpArgumentwhen using escaped single quote character. (@koic) - #14540: Fix an incorrect autocorrect for
Style/UnlessElsewhen usingunlesswiththen. (@koic) - #14507: Fix the built-in Ruby LSP add-on not restarting when config files (
.rubocop.yml,.rubocop_todo.yml) change. (@earlopain) - #14514: Fix the built-in Ruby LSP add-on not respecting
.rubocopconfig file. (@earlopain) - #14508: Fix the built-in Ruby LSP add-on getting in an irrecoverable state when the config is invalid on startup. (@earlopain)
- #14534: Prevent
Layout/LineLengthautocorrection from splitting a block if its receiver contains a heredoc. (@dvandersluis) - #14497: Fix a false positive for
Lint/ShadowedArgumentwhen assigning inside arescueblock. (@earlopain)
Changes
- Ruby
Published by github-actions[bot] 5 months ago
https://github.com/rubocop/rubocop - RuboCop v1.80.2
Bug fixes
- #14477: Fix a false positive for
Style/SafeNavigationwhen using ternary expression with index access call with method chain. (@koic) - #14486: Fix false positives for
Style/RedundantParentheseswith unary operators andyield,super, ordefined?. (@earlopain) - #14489: Fix false negatives for
Style/RedundantParentheseswith method calls taking argument without parentheses likereturn (x y) if z. (@earlopain) - #14499: Fix wrong autocorrect for
Style/StringConcatenationwhen a double-quoted string contains escaped quotes and interpolation. (@earlopain) - #14502: Fix wrong autocorrect for
Style/StringConcatenationwhen a single-quoted string contains interpolation like'#{foo}'. (@earlopain)
Changes
- Ruby
Published by github-actions[bot] 6 months ago
https://github.com/rubocop/rubocop - RuboCop v1.80.1
Bug fixes
- #14479: Don't invalidate cache when
--display-timeoption is used on the CLI. (@lovro-bikic) - #14473: Fix a false negative for
Style/RedundantBeginusingbeginwith multiple statements withoutrescueorensure. (@koic) - #14475: Fix cop errors during autocorrect for the build in LSP when analyzing as Ruby 3.4. (@earlopain)
Changes
- #14474: Fix false negative for
Layout/EndAlignmentwhenendis not on a separate line. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 6 months ago
https://github.com/rubocop/rubocop - RuboCop v1.80.0
Bug fixes
- #14469: Fix an incorrect autocorrect for
Style/BitwisePredicatewhen using&with LHS flags in conjunction with==for comparisons. (@koic) - #14459: Fix wrong autocorrect for
Style/Forwith save navigation in the collection. (@earlopain) - #14435: Fix false negatives for regexp cops when
Lint/DuplicateRegexpCharacterClassElementis enabled. (@earlopain) - #14419: Fix false positives for
Lint/UselessAssignmentwhen duplicate assignments appear in nestedifbranches inside a loop and the variable is used outsidewhileloop. (@koic) - #14468: Fix false positives for
Naming/MethodNamewhen an operator method is defined using a string. (@koic) - #14427: Fix false positives for
Style/RedundantParentheseswhendo...endblock is wrapped in parentheses as a method argument. (@koic) - #14441: Better hash access handling in
Style/SafeNavigation. (@issyl0) - #14443: Fix false positive in
Layout/EmptyLinesAfterModuleInclusionwhenincludedoes not have exactly one argument. (@issyl0) - #14424: Fix
Style/SafeNavigationcop to preserve existing safe navigation in fixed code. (@martinemde) - #14455: Follow module inclusion with nonzero args with an empty line. (@issyl0)
- #14445: Fix false positives for
Lint/UselessAssignmentwithforloops when the variable is referenced in the collection. (@earlopain) - #14447: Fix wrong autocorrect for
Style/RedundantConditionwith a parenthesised method call in the condition. (@earlopain)
Changes
- #14428: Enhance
Lint/SelfAssignmentto handle indexed assignment with multiple arguments. (@viralpraxis) - #14464: Exclude
AutoCorrectandIncludefrom configuration parameters. (@r7kamura) - #14472: Make
Style/RedundantBeginaware ofcasepattern matching. (@koic) - #14448: Register array intersection size checks as offenses under
Style/ArrayIntersect. (@lovro-bikic) - #14431: Support LSP
TextDocumentSyncKind.Incremental. (@tmtm) - #14453: Update
Style/RedundantBeginto registerbeginblocks insideif,unless,case,whileanduntilas redundant. (@dvandersluis)
- Ruby
Published by github-actions[bot] 6 months ago
https://github.com/rubocop/rubocop - RuboCop v1.79.2
Bug fixes
- #11664: Cache wasn't getting used when using parallelization. (@jvlara)
- #14411: Fix false negatives for
Layout/EmptyLinesAroundClassBodywhen a class body starts with a blank line and defines a multiline superclass. (@koic) - #14413: Fix a false positive for
Layout/EmptyLinesAroundArgumentswith multiline strings that contain only whitespace. (@earlopain) - #14408: Fix false-positive for
Layout/EmptyLinesAfterModuleInclusionwhen inclusion is called with modifier. (@r7kamura) - #14402: Fix false positives for
Lint/UselessAssignmentwhen duplicate assignments appear inifbranch inside a loop and the variable is used outsidewhileloop. (@koic) - #14416: Fix false positives for
Style/MapToHashwhen usingto_hwith block argument. (@koic) - #14418: Fix false positives for
Style/MapToSetwhen usingto_setwith block argument. (@koic) - #14420: Fix false positives for
Style/SafeNavigationwhen ternary expression with operator method call with method chain. (@koic)
Changes
- #14407: Register offense for parentheses around method calls with blocks in
Style/RedundantParentheses. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop - RuboCop v1.79.1
Bug fixes
- #14390: Fix wrong autocorrect for
Style/ArgumentsForwardingwhen the method arguments contain*,**or&, and the method call containsselfas the first argument. (@earlopain) - #14399: Fix false positives for
Layout/EmptyLinesAfterModuleInclusionwhenprependis used with block methods. (@koic) - #14396: Fix a false positive for
Style/RedundantParentheseswhen parentheses are used around a one-linerescueexpression inside a ternary operator. (@koic) - #14383: Fix false positives for
Lint/UselessAssignmentwhen duplicate assignments inifbranch inside a loop. (@koic) - #14394: Fix false positive for
Lint/UselessAssignmentwithretryinrescuebranch. (@earlopain) - #14386: Fix false positives for
Style/RedundantParentheseswhen parentheses are used around a one-linerescueexpression inside array or hash literals. (@koic) - #14395: Fix LSP handling of URI-encoded paths with spaces. (@hakanensari)
Changes
- #14403: Enhance
Naming/MethodNamecop to detect offenses withinaliasandalias_methodcalls. (@viralpraxis) - #14389: Add support for
||toLint/LiteralAsCondition. (@zopolis4)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop - RuboCop v1.79.0
New features
- #14348: Add new cop
Layout/EmptyLinesAfterModuleInclusion. (@lovro-bikic) - #14374: Enhance
Naming/MethodNamecop to detect offenses withinDatamembers. (@viralpraxis)
Bug fixes
- #14373: Fix an error for
Style/ParallelAssignmentwhen a lambda with parallel assignment is used on the RHS. (@koic) - #14370: Fix comment duplication bug in
Style/AccessorGroupingseparated autocorrect. (@r7kamura) - #14377: Fix a false positive for
Lint/UselessAssignmentwhen the assignment is inside a loop body. (@5hun-s) - #14355: Fix a false negative for
Style/RedundantParentheseswhen using parentheses around arescueexpression on a one-line. (@koic) - #14354: Fix incorrect autocorrect for
Style/AccessModifierDeclarationswhen using a grouped access modifier declaration. (@girasquid) - #14367: Fix an incorrect autocorrect for
Style/SingleLineMethodswhen defining a single-line singleton method. (@koic) - #14344: Fix incorrect autocorrect for
Style/SingleLineMethodswhen a single-line method definition contains a modifier. (@koic) - #14350: Fix
Naming/MethodNamecop false positives withdefine_methodand operator names. (@viralpraxis) - #14333: Fix
Naming/PredicateMethodignoring the implicitnilfrom missingelsebranches. (@earlopain) - #14356: Fix
Style/ItBlockParametercop error onalwaysstyle and missing block body. (@viralpraxis) - #14362: Update
Lint/RequireRangeParenthesesto not register false positives when range elements span multiple lines. (@dvandersluis) - #14309: Update
Style/SoleNestedConditionalto properly correct assignments withinand. (@dvandersluis)
Changes
- #14358: Add
tsortgem to runtime dependency for Ruby 3.5-dev. (@koic) - #14322: Expand the scope of
Style/ItAssignmentto consider all local variable and method parameter names. (@dvandersluis) - #14378: Change
Layout/SpaceAroundKeywordto offend for missing whitespace betweenreturnand opening parenthesis. (@lovro-bikic) - #14360: Make
Layout/SpaceAroundOperatorsaware of alternative and as pattern matchings. (@koic) - #14375: Make
Lint/RedundantSafeNavigationaware of builtin convert methodsto_s,to_i,to_f,to_a, andto_h. (@koic) - #13835: Add
InferNonNilReceiverconfig toLint/RedundantSafeNavigationto check previous code paths if the receiver is non-nil. (@fatkodima) - #14381: Offend
array1.any? { |elem| array2.member?(elem) }andarray1.none? { |elem| array2.member?(elem) }inStyle/ArrayIntersect. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 7 months ago
https://github.com/rubocop/rubocop - RuboCop v1.78.0
New features
- #14331: Enhance
Naming/MethodNamecop to detect offenses withindefine_methodcalls. (@viralpraxis) - #14325: Enhance
Naming/MethodNamecop to handle offenses withinStructmembers. (@viralpraxis) - #14335: Enhance
Security/Evalcop to detectKernel.evalcalls. (@viralpraxis)
Bug fixes
- #14343: Fix autocorrect code for
Style/HashConversionto avoid syntax error. (@koic) - #14346: Avoid requiring parentheses for
Style/SingleLineMethods. (@koic) - #14339: Fix bug where specifying
--formatdisables parallelization. (@r7kamura) - #14300: Fix false positives for
Lint/DuplicateMethodscop when self-alias trick is used. (@viralpraxis) - #14329: Fix false positives for
Lint/LiteralAsConditionwhen a literal is used inside||incasecondition. (@koic) - #14326: Fix additional autocorrection errors in
Style/HashConversionfor nestedHash[]calls. (@dvandersluis) - #14031: Honor --config options on server mode. (@steiley)
- #14319: Fix the following incorrect autocorrect for
Lint/RedundantTypeConversionwhen using parentheses with no arguments or any arguments. (@koic) - #14336: Fix incorrect autocorrect for
Style/ItBlockParameterwhen using a single numbered parameter after multiple numbered parameters in a method chain. (@koic) - #11782: Move pending cops warning out of ConfigLoader. (@nobuyo)
Changes
- #14318: Add
WaywardPredicatesconfig toNaming/PredicateMethodto handle methods that look like predicates but aren't. (@dvandersluis)
- Ruby
Published by github-actions[bot] 8 months ago
https://github.com/rubocop/rubocop - RuboCop v1.77.0
New features
- #14223: Add new
Gemspec/AttributeAssignmentcop. (@viralpraxis) - #14128: Allow long fully-qualified namespace strings to exceed max length. (@niranjan-patil)
- #14288: Add new cop
Style/CollectionQuerying. (@lovro-bikic) - #14165: Add new
DefaultToNiloption toStyle/FetchEnvVarcop. (@Yuhi-Sato) - #14314: Enhance
Gemspec/RequireMFAcop autocorrect to insert MFA directive after lastmetadataassignment. (@viralpraxis) - #14159: Enhance
Layout/SpaceInsideArrayLiteralBracketscop to analyze nested constant patterns. (@viralpraxis)
Bug fixes
- #14306: Fix an error for
Style/HashConversionwhen using nestedHash[]. (@koic) - #14298: Fix an error for
Style/SoleNestedConditionalwhen autocorrecting nested if/unless/if. (@ssagara00) - #14313: Fix a false positive for
Layout/SpaceBeforeBracketswhen call desugaredHash#[]to lvar receiver with a space around the dot. (@koic) - #14292: Fix false positives for
Style/RedundantParentheseswhen assigning a parenthesized one-lineinpattern matching. (@koic) - #14296: Fix false positives for
Style/RedundantSelfwhen receiver and lvalue have the same name in or-assignment. (@koic) - #14303: Fix
Lint/SelfAssignmentto allow inline RBS comments. (@Morriar) - #14307: Fix
Style/MethodCallWithArgsParenthesesfalse positive on forwarded keyword argument with additional arguments. (@viralpraxis) - #14301: Fix autocorrection syntax error for multiline expressions in
Style/RedundantParentheses. (@lovro-bikic)
Changes
- #14295: Update
Naming/PredicateMethodto consider negation (!/not) as boolean values. (@dvandersluis) - #14255: Update
Naming/PredicateMethodto treat returned predicate method calls as boolean values. (@dvandersluis)
- Ruby
Published by github-actions[bot] 9 months ago
https://github.com/rubocop/rubocop - RuboCop v1.76.2
Bug fixes
- #14273: Fix an error for
Lint/EmptyInterpolationwhen using a boolean literal inside interpolation. (@koic) - #14260: Fix an error for
Lint/UselessDefaultValueArgumentwhenfetchcall without a receiver. (@koic) - #14267: Fix an error for
Style/ConditionalAssignmentcop when using one-line branches. (@viralpraxis) - #14275: Fix false positives for
Style/RedundantParentheseswhen using parenthesized one-line pattern matching in endless method definition. (@koic) - #14269: Fix false positives for
Style/RedundantSelfwhen local variable assignment name is used in nestedif. (@koic) - #14286: Fix incorrect autocorrect for
Lint/SafeNavigationChainwhen a safe navigation is used on the left-hand side of a-operator when inside an array. (@koic)
Changes
- #14232: Add
AllowedPatternsandAllowBangMethodsconfiguration toNaming/PredicateMethod. (@dvandersluis) - #14268: Register operator expression range boundaries as offenses in
Lint/AmbiguousRange. (@lovro-bikic) - #14264: Offend access modifiers used on top-level in
Lint/UselessAccessModifier. (@lovro-bikic) - #14278: Register conditions wrapped in parentheses as offenses in
Style/MinMaxComparison. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 9 months ago
https://github.com/rubocop/rubocop - RuboCop v1.76.1
Bug fixes
- #14245: Fix an error for
Lint/EmptyInterpolationwhen using primitives in interpolation. (@ka8725) - #14233: Fix an error for
Style/SafeNavigationwhen using ternary expression with index access call. (@koic) - #14236: Fix an error for
Style/SafeNavigationwhen using ternary expression with operator method call. (@koic) - #14249: Fix false positives for
Style/RedundantArrayFlattenwhenArray#joinis used with an argument other than the defaultnil. (@koic) - #14239: Fix false positives for
Style/RedundantParentheseswhen using one-lineinpattern matching in operator. (@koic) - #14240: Fix
Naming/PredicateMethodcop error on empty parentheses method body. (@viralpraxis) - #14235: Fix
Style/SafeNavigationcop error on indexed assignment in ternary expression. (@viralpraxis) - #14247: Fix
Style/SafeNavigationinvalid autocorrection on double colon method call. (@viralpraxis)
- Ruby
Published by github-actions[bot] 9 months ago
https://github.com/rubocop/rubocop - RuboCop v1.76.0
New features
- #12360: Add new
Naming/PredicateMethodcop to check that predicate methods end with?and non-predicate methods do not. (@dvandersluis) - #13121: Add new
Style/EmptyStringInsideInterpolationcop. (@zopolis4) - #14091: Add new cop
Style/RedundantArrayFlatten. (@lovro-bikic) - #14184: Add new cop
Lint/UselessOr. (@lovro-bikic) - #14221: Enhance
Gemspecdepartment cops to detect offenses if specification variable isitor a numbered parameter. (@viralpraxis) - #14166: Add new cop
Lint/UselessDefaultValueArgument. (@lovro-bikic)
Bug fixes
- #14228: Fix a false positive for
Style/RedundantParentheseswhen using a one-linerescueexpression as a method argument. (@koic) - #14224: Fix false negatives for
Style/RedundantParentheseswhen using one-line pattern matching. (@koic) - #14205: False negatives in
Style/SafeNavigationwhen a ternary expression is used in a method argument. (@steiley) - #14226: Fix
Lint/LiteralAsConditionautocorrect when branches of a condition have comments. (@zopolis4)
Changes
- #14066: Add
EnforcedStyle: allow_single_lineas the default toStyle/ItBlockParameter. (@koic) - #13788: Disable
Lint/ShadowingOuterLocalVariableby default. (@nekketsuuu) - #14215: Recognize inequation (
!=) inLint/IdentityComparison. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 9 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.8
Bug fixes
- #14191: Fix
Lint/FloatComparisoncop to detect floating-point number comparisons incasestatements. (@daisuke) - #14209: Fix an error for
Style/RedundantFormatwith invalid format arguments. (@earlopain) - #14200: Fix false positives for
Style/DefWithParentheseswhen using endless method definition with empty parentheses and a space before=. (@koic) - #14197: Fix infinite loop error for
EnforcedStyle: with_fixed_indentationofLayout/ArgumentAlignmentandEnforcedStyle: consistentofLayout/FirstArgumentIndentationandLayout/HashAlignment. (@koic) - #14204: Fix
Layout/EmptyLinesAroundAccessModifiercop error on trailing access modifier. (@viralpraxis) - #14198: Fix
Lint/DuplicateMethodscop error ontooption is dynamically generated andprefixis enabled. (@viralpraxis) - #14199: Fix wrong autocorrection for
Style/MapToHashwith destructuring argument. (@lovro-bikic) - #14050: Modify condition for
rubocop:todoEOL comment. (@jonas054)
- Ruby
Published by github-actions[bot] 9 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.7
Bug fixes
- #14185: Fix an error for
Style/IfUnlessModifierOfIfUnlesswhen using nested modifier. (@koic) - #14192: Fix negatives for
Layout/SpaceBeforeBracketswhen using space between method argument parentheses and left bracket. (@koic) - #14189: Fix incorrect autocorrect for
Layout/SpaceBeforeBracketswhen using space between receiver and left brackets, and a space inside left bracket. (@koic) - #14170: Fix
Style/AccessModifierDeclarationscop error on semicolon after modifier. (@viralpraxis) - #14195: Fix
Style/AccessModifierDeclarationscop error on symbol modifier without surrounding scope. (@viralpraxis) - #14172: Fix
Style/AccessModifierDeclarationscop false positives when there are no method definitions and style isinline. (@viralpraxis) - #14193: Fix
Lint/UselessAssignmentcop error when using nested assignment with splat. (@earlopain)
Changes
- #14188: Enhance
Gemspec/DuplicatedAssignmentcop to detect duplicated indexed assignment. (@viralpraxis) - #14183: Recognize
prefixargument fordelegatemethod inLint/DuplicateMethods. (@lovro-bikic)
- Ruby
Published by github-actions[bot] 10 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.6
Bug fixes
- #14176: Fix an error for
Style/MultilineIfModifierwhen using nested modifier. (@koic) - #14077: Change
nilrepresentation in todo file comments. (@jonas054) - #14164: Fix an error for
Lint/UselessAssignmentwhen variables are assigned using unary operator in chained assignment and remain unreferenced. (@koic) - #14173: Fix an error for
Style/StringConcatenationwhen using implicit concatenation with string interpolation. (@koic) - #14177: Fix false positives for
Style/SoleNestedConditionalwhen using nestedifandnotin condition. (@koic) - #14152: Fix
Layout/SpaceInsideArrayLiteralBracketscop error on array pattern without brackets. (@viralpraxis) - #14153: Fix
Style/PercentQLiteralscop error on Unicode escape sequence. (@viralpraxis)
Changes
- #14082: Mark
Style/ComparableBetweenas unsafe. (@earlopain) - #14181: Make
Lint/DuplicateMethodsaware of Active Support'sdelegatemethod. (@lovro-bikic) - #14156: Make
Style/IfUnlessModifierallow endless method definition in theifbody. (@koic)
- Ruby
Published by github-actions[bot] 10 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.5
Bug fixes
- #14148: Fix an infinite loop error for
Layout/SpaceAfterSemicolonwithLayout/SpaceBeforeSemicolonwhen a sequence of semicolons appears. (@koic) - #14145: Fix
Lint/ArrayLiteralInRegexpcop error on empty interpolation. (@viralpraxis) - #14072: Fix autocorrect issue in
Layout/HashAlignment. (@jonas054) - #14131: Fix false positives for
Style/ArgumentsForwardingwhen using anonymous block argument forwarding to a method with a block. (@koic) - #14140: Fix
Layout/LeadingCommentSpaceto allow splitting long inline RBS comment signatures across multiple lines. (@Morriar) - #14147: Fix
Lint/LiteralAsConditioncop error onifwithout body. (@viralpraxis) - #14151: Fix
Lint/Voidcop error on nested emptybegin. (@viralpraxis) - #13547: Fix
Style/IdenticalConditionalBranchescop failure in case ofifnode with implicitthen. (@viralpraxis) - #14146: Fix
Style/MethodCallWithArgsParenthesescop error on complex numbers whenEnforcedStyleis set toomit_parentheses. (@viralpraxis) - #14137: Fix
Style/TrailingCommaInArgumentscop error ifEnforcedStyleForMultilineis set tocomma. (@viralpraxis)
Changes
- #14144:
Layout/SpaceInsideArrayLiteralBracketsmake aware of array pattern matching. (@koic) - #14142:
Layout/SpaceInsideHashLiteralBracesmake aware of hash pattern matching. (@koic)
- Ruby
Published by github-actions[bot] 10 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.4
Bug fixes
- #14123: Fix an infinite loop error for
Lint/BooleanSymbolwhen using the rocket hash syntax with a boolean symbol key. (@koic) - #14134: Fix an error for
Style/ComparableBetweenwhen comparing the value with itself. (@earlopain) - #14111: Fix an error for
Style/SafeNavigationwhen the RHS of&&is a complex||expression composed of&&conditions. (@koic) - #14129: Fix false positives for
Style/ArgumentsForwardingwhen using default positional arg, keyword arg, and block arg in Ruby 3.1. (@koic) - #14110: Fix false positives for
Style/RedundantParentheseswhen parens around basic conditional as the second argument of a parenthesized method call. (@koic) - #14120: Fix false positives for
Style/RedundantParentheseswhen parens around unparenthesized method call as the second argument of a parenthesized method call. (@koic) - #14133: Fix
Lint/LiteralAsConditionautocorrect when a literal is the condition of an elsif followed by an else. (@zopolis4) - #14116: Make
Style/TrailingCommaInArgumentscop aware of trailing commas in[]method call. (@viralpraxis) - #14114: Fix
Style/ClassAndModuleChildrencop error on tab-intended compactable modules. (@viralpraxis)
Changes
- #13611: Enable
Lint/CircularArgumentReferenceon Ruby 3.4. (@earlopain)
- Ruby
Published by github-actions[bot] 10 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.3
Bug fixes
- #13676: Allow RuboCop to inspect hidden directories if they are explicitly provided. (@viralpraxis)
- #14080: Allow writing RBS::Inline annotation
#:after end keyword inStyle/CommentedKeyword. (@dak2) - #14075: Fix an error for
Layout/EmptyLineAfterGuardClausewhen calling a method on the result of a single-lineifwithreturn. (@koic) - #14067: Fix false negatives for
Style/RedundantParentheseswhen using parens around singleton method body. (@koic) - #14070: Fix false positives for
EnforcedStyleForMultiline: diff_commaofStyle/TrailingCommaInArrayLiteralandStyle/TrailingCommaInHashLiteralwhen trailing comma with comment. (@koic) - #14092: Fix false negative for
Style/RedundantParentheseswhen using some operator methods with a parenthesized argument. (@koic) - #14103: Fix
Layout/MultilineOperationIndentationcop error onindexasgnnode without arguments. (@viralpraxis) - #14089: Fix redundant current directory prefix regexp. (@sferik)
- #14099: Fix
Style/ClassAndModuleChildrencop error on one-liner class definition and nested enforced style. (@viralpraxis) - #14083: Fix
Style/ConditionalAssignmentcop error on one-line if-then-else. (@viralpraxis) - #14104: Fix
Style/ConditionalAssignmentcop error on indexed assignment without arguments. (@viralpraxis) - #14084: Fix
Style/RedundantLineContinuationcop error on multiline assignment with line continuation. (@viralpraxis) - #14096: Fix error for
Style/SafeNavigationwith longer&&chain (e.g.a && a.b && a.b.c). (@lovro-bikic) - #14068: Fix wrong autocorrection for
Style/MapIntoArraywhen usingpushorappendwith hash argument without braces. (@lovro-bikic)
Changes
- #14093: Register offenses for redundant parens around method arguments for
Style/RedundantParentheses. (@lovro-bikic) - #14064: Prefer
ReferencesoverReferencein cop configs. (@sambostock)
- Ruby
Published by github-actions[bot] 11 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.2
Changes
- #14065: Update
Lint/RedundantTypeConversionto register an offense forto_json.to_s. (@lovro-bikic)
Bug fixes
- #14041: Fix an error when using ERB templated config YAML with server mode. (@koic)
- #14048: Do not emit a warning for a zero-sized file while checking if it is executable. (@viralpraxis)
- #14053: Fix incorrect autocorrect for
Lint/DeprecatedOpenSSLConstantcipher constant argument is notcbc. (@koic) - #14051: Fix incorrect autocorrect for
Style/RedundantConditionwhen true is used as the true branch and the condition takes arguments. (@koic) - #14062: Fix false positives for
Lint/ReturnInVoidContextwhen returning insidedefine_methodor a nested singleton method. (@earlopain) - #14057: Fix
Style/ConditionalAssignmentcop error on dynamic string node in branch. (@viralpraxis) - #14047: Fix
Style/FrozenStringLiteralCommentcop errors on emacs-styled magic comment. (@viralpraxis)
- Ruby
Published by github-actions[bot] 11 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.1
Changes
- #14038: Rename
EnforcedStyle: allow_named_parametertoEnforcedStyle: only_numbered_parametersinStyle/ItBlockParameter. (@koic)
- Ruby
Published by github-actions[bot] 11 months ago
https://github.com/rubocop/rubocop - RuboCop v1.75.0
New features
- #12049: Add new
Style/HashFetchChaincop to detect chainedfetchcalls that can be replaced with a single call todig. (@dvandersluis) - #13597: Add new
Style/ItBlockParametercop. (@koic) - #13899: Enable reusable Prism parse result for Ruby LSP add-on. (@koic)
- #14015: Support
itblock parameter inLayoutcops. (@koic) - #14017: Support
itblock parameter inLintcops. (@koic) - #14018: Support
itblock parameter inMetricscops. (@koic) - #14013: Support
itblock parameter inStylecops. (@koic) - #14025: Support
TargetRubyVersion: 3.5(experimental). (@earlopain)
Bug fixes
- #14022: Fix an error for
Style/HashFetchChainwhen no arguments are given tofetch. (@koic) - #14028: Fix false negative for
Layout/MultilineMethodParameterLineBreakswhen class method definitions are used. (@vlad-pisanov) - #14027: Fix false negative for
Layout/LineLengthwhen autocorrecting class method definitions. (@vlad-pisanov) - #8099: Fix infinite loop between
Layout/SpaceAroundOperatorsandLayout/HashAlignmentwithEnforcedHashRocketStylebeing an array containingtable. (@dvandersluis) - #14021: Fix handling of long heredoc lines with SplitStrings enabled. (@mauro-oto)
- #13968: Fix
InternalAffairs/RedundantDescribedClassAsSubjectcop error on missingdescribe. (@viralpraxis) - #14036: Fix false negative for
Lint/ShadowingOuterLocalVariablewhen block local variable is used inside a condition. (@lovro-bikic) - #13990: Fix a false positive for
Lint/UselessAssignmentwhen a variable is reassigned in a different branch. (@eugeneius) - #14012: Fix incorrect autocorrections for
Style/SoleNestedConditional. (@lovro-bikic) - #14020: Fix comment autocorrection for
Style/IfInsideElse. (@lovro-bikic)
Changes
- #12358: Add
doesas a forbidden prefix toNaming/PredicateName. (@dvandersluis) - #13621: Add
ForbiddenIdentifiersandForbiddenPatternsconfig options toNaming/MethodNamecop. (@tejasbubane) - #13986: Add support for
Array#intersectiontoStyle/ArrayIntersect. (@dvandersluis) - #14006: Allow cop renames to trigger warnings instead of fatal errors. (@dvandersluis)
- #13617: Use the
prismtranslation layer to analyze Ruby 3.4+ by default. (@earlopain) - #14024: Change
Style/RedundantParenthesesto offend parentheses for chained&&expressions. (@lovro-bikic) - #14029: Add
AllowConsecutiveConditionalssetting toStyle/Nextto allow consecutive conditional statements. (@vlad-pisanov) - #14016: Update
Style/RedundantFormatto register offenses when the only argument toformatorsprintfis a constant. (@dvandersluis)
- Ruby
Published by github-actions[bot] 11 months ago
https://github.com/rubocop/rubocop - RuboCop v1.74.0
New features
- #13936: Adds new cop
Style/ComparableBetween. (@lovro-bikic) - #13943: Allow writing steep annotation to method definition for
Style/CommentedKeyword. (@dak2)
Bug fixes
- #13969: Fix a false positive for
Lint/SharedMutableDefaultwhencapacitykeyword argument is used. (@koic) - #13945: Fix a false positive for
Style/DoubleNegationwhen callingdefine_method/define_singleton_methodwith a numblock. (@earlopain) - #13971: Fix false alarm for config obsoletion. (@koic)
- #13960: Fix a false negative for
Lint/ReturnInVoidContextwhen returning out of a block. (@earlopain) - #13947: Fix a false negative for
Lint/UselessConstantScopingfor constants defined inclass << self. (@earlopain) - #13949: Fix a false negative for
Lint/NonLocalExitFromIteratorwith numblocks. (@earlopain) - #13975: Fix false positives for
Style/RedundantCurrentDirectoryInPathwhen using a complex current directory path inrequire_relative. (@koic) - #13963: Fix wrong autocorrect for
Lint/LiteralAsConditionwhen the literal is followed byreturn,break, ornext. (@earlopain) - #13946: Fix some false positives for
Style/MethodCallWithArgsParentheseswithEnforcedStyle: omit_parenthesesstyle and numblocks. (@earlopain) - #13950: Fix sporadic errors about
rubocop-railsorrubocop-performanceextraction, even if they are already part of the Gemfile. (@earlopain) - #13981: Prevent redundant plugin loading when a duplicate plugin is specified in an inherited config. (@koic)
- #13965: Update
Lint/RedundantCopDisableDirectiveto register an offense when cop names are given with improper casing. (@dvandersluis) - #13948: Fix wrong autocorrect for
Style/RescueModifierwhen using parallel assignment and the right-hand-side is not a bracketed array. (@earlopain)
Changes
- #12851: Add
EnforcedStyleForClassesandEnforcedStyleForModulesconfiguration options toStyle/ClassAndModuleChildren. (@dvandersluis) - #13979: Add
Mode: conservativeconfiguration toStyle/FormatStringTokento make the cop only register offenses for strings given toprintf,sprintf,format, and%. (@dvandersluis) - #13977: Allow
TLS1_1andTLS1_2by default inNaming/VariableNumberto accommodate OpenSSL version parameter names. (@koic) - #13967: Make
Lint/RedundantTypeConversionaware of redundantto_d. (@koic)
- Ruby
Published by github-actions[bot] 12 months ago
https://github.com/rubocop/rubocop - RuboCop v1.73.2
Bug fixes
- #13942: Fix incorrect disabling of departments when inheriting configuration. (@koic)
- #13766: Fix false positives for
Style/InverseMethodswhen usingany?ornone?with safe navigation operator. (@koic) - #13938: Fix false positives for
Style/RedundantConditionwhen a variable or a constant is used. (@koic) - #13935: Fix a false negative for
Style/RedundantFreezewhen calling methods that produce frozen objects with numblocks. (@earlopain) - #13928: Fix
end pattern with unmatched parenthesis: / (RegexpError)on Ruby 3.2.0. (@dvandersluis) - #13933: Fix wrong autocorrect for
Style/KeywordParametersOrderwhen the arguments are on multiple lines and contain comments. (@earlopain)
Changes
- #12669: Update autocorrection for
Lint/EmptyConditionalBodyto be safe. (@dvandersluis)
- Ruby
Published by github-actions[bot] 12 months ago
https://github.com/rubocop/rubocop - RuboCop v1.73.1
Bug fixes
- #13920: Fix an error for
Lint/MixedCaseRangewhen/[[ ]]/is used. (@koic) - #13912: Fix wrong autocorrect for
Lint/EmptyConditionalBodywhen assigning to a variable with only a single branch. (@earlopain) - #13913: Fix false positives for
Style/RedundantConditionwhen using when true is used as the true branch and the condition is not a predicate method. (@koic) - #13909: Fix false positive with
Layout/ClosingParenthesisIndentationwhen first parameter is a hash. (@tejasbubane) - #13915: Fix writing generics type of rbs-inline annotation for nested class in
Style/CommentedKeyword. (@dak2) - #13916: Fix
Lint/LiteralAsConditionacting on the right hand side of && nodes. (@zopolis4)
- Ruby
Published by github-actions[bot] about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.73
New features
- #11024: Add
require_alwaysoption toStyle/EndlessMethod. (@koic) - #11024: Add
require_single_lineoption toStyle/EndlessMethod. (@jtannas) - #9935: Introduce
EnforcedStyleForMultiline"diff_comma". (@flavorjones)
Bug fixes
- #13867: Fix an error for plugins when not running RuboCop through Bundler. (@earlopain)
- #13902: Fix false negative for
Style/RedundantSelfAssignmentwhen the method receives a block. (@vlad-pisanov) - #13826: Fix false positives for regex cops when
Lint/MixedCaseRangeis enabled. (@earlopain) - #13818: Fix false positives for
Lint/Voidwhen using operator method call without argument. (@koic) - #13896: Fix a false positive for
Style/TrivialAccessorswithinstance_evaland numblocks. (@earlopain) - #13910: Fix false positives for
Style/EndlessMethodwhen using setter method definitions. (@koic) - #13889: Fix autocorrection for
Layout/LineLengthwith interpolated strings when not on the first line. (@dvandersluis) - #13900: Fix infinite loop between
Layout/EmptyLinesAroundAccessModifierandLayout/EmptyLinesAroundBlockBodywithEnforcedStyle: no_empty_lines. (@dvandersluis) - #12692: Fix
Style/AccessorGroupingwith constants. (@tejasbubane) - #13882: Fix
Style/RedundantFormatfor annotated template strings with missing hash keys. (@dvandersluis) - #13880: Fix
Style/RedundantFormatwhen given double-splatted arguments. (@dvandersluis) - #13907: Don't offer autocorrect for
Style/StringConcatenationwhen numblocks are used. (@earlopain) - #13876: Don't consider
require 'pp'to be redundant forLint/RedundantRequireStatement. (@earlopain) - #13885: Update
Style/HashExceptandStyle/HashSliceto not register an offense if selecting over the hash value. (@dvandersluis)
Changes
- #12948: Add
ForbiddenNamesconfiguration toNaming/VariableNameto specify names that are forbidden. (@dvandersluis) - #13117: Add partial autocorrect support to
Lint/LiteralAsConditioncop to check for redundant conditions. (@zopolis4) - #13892: Allow merging of configured arrays and non-arrays. (@sambostock)
- #13833: Add
Referenceto common params. (@sambostock) - #13890: Update
Lint/RedundantTypeConversionto not register an offense when given a constructor withexception: false. (@dvandersluis) - #13729: Update
Style/RedundantConditioncop to detect conditional expressions where the true branch istrueand suggest replacing them with a logical OR. (@datpmt)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.72.2
Bug fixes
- #13853: Fix exclusion of relative paths in plugin's
AllCops: Excludeas expected. (@koic) - #13844: Fix an error for
Style/RedundantFormatwhen a template argument is used without keyword arguments. (@koic) - #13857: Fix an error for
Style/RedundantFormatwhen numeric placeholders is used in the template argument. (@koic) - #13861: Fix
ArgumentErrorrelated to two deprecatedAllowedPatternAPIs. (@koic) - #13849: Fix an error for
Lint/UselessConstantScopingwhen multiple assigning to constants afterprivateaccess modifier. (@koic) - #13856: Fix false positives for
Lint/UselessConstantScopingwhen a constant is used afterprivateaccess modifier with arguments. (@koic)
Changes
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.72.1
Bug fixes
- #13836: Fix an error for
Style/RedundantParentheseswhen a different expression appears before a range literal. (@koic) - #13839: Fix false positives for
Lint/RedundantTypeConversionwhen passing block arguments when generating a Hash or a Set. (@koic)
Changes
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.72
New features
- #13740: Add new
Lint/CopDirectiveSyntaxcop. (@kyanagi) - #13800: Add new
Lint/SuppressedExceptionInNumberConversioncop. (@koic) - #13702: Add new
Lint/RedundantTypeConversioncop. (@dvandersluis) - #13831: Add new
Lint/UselessConstantScopingcop. (@koic) - #13793: Add new
Style/RedundantFormatcop to check for uses offormatorsprintfwith only a single string argument. (@dvandersluis) - #13581: Add new
InternalAffairs/LocationExistscop to check for code that can be replaced withNode#loc?orNode#loc_is?. (@dvandersluis) - #13661: Make server mode detect local paths in .rubocop.yml under
inherit_fromandrequirefor automatically restart. (@koic) - #13721:
Naming/PredicateName: Optionally use Sorbet to detect predicate methods. (@issyl0) - #6012: Support RuboCop extension plugin. (@koic)
Bug fixes
- #13807: Fix false negatives for
Style/RedundantParentheseswhen chaining[]method calls. (@koic) - #13788: Fix false negatives for
Style/RedundantParentheseswhen[]method is called with variable or constant receivers. (@koic) - #13811: Fix false negatives for
Style/RedundantParentheseswhen handling range literals with redundant parentheses. (@koic) - #13796: Fix crash in
Layout/EmptyLinesAroundMethodBodyfor endless methods. (@dvandersluis) - #13817: Fix false positive for format specifier with non-numeric precision. (@dvandersluis)
- #12672: Fix false positives for
Lint/FormatParameterMismatchwhen the width value is interpolated. (@dvandersluis) - #12795: Fix
Layout/BlockAlignmentfor blocks that are the body of an endless method. (@dvandersluis) - #13822: Fix undefined method Logger when processing watched file notifications. (@vinistock)
- #13805: Make the language_server-protocol dependency version stricter. (@koic)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.71.2
Bug fixes
- #13782: Fix an error
Layout/ElseAlignmentwhenelseis part of a numblock. (@earlopain) - #13395: Fix a false positive for
Lint/UselessAssignmentwhen assigning in branch and block. (@pCosta99) - #13783: Fix a false positive for
Lint/Voidwheneachnumblock with conditional expressions that has multiple statements. (@earlopain) - #13787: Fix incorrect autocorrect for
Style/ExplicitBlockArgumentwhen using arguments ofzsuperin method definition. (@koic) - #13785: Fix
Style/EachWithObjectcop error in case of single block argument. (@viralpraxis) - #13781: Fix a false positive for
Lint/UnmodifiedReduceAccumulatorwhen omitting the accumulator in a nested numblock. (@earlopain)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.71.1
Bug fixes
- #10081: Add the missing
include RuboCop::RSpec::ExpectOffensein rubocop/rspec/support.rb. (@d4rky-pl) - #13765: Fix a false negative for
Lint/AmbiguousBlockAssociationwith numblocks. (@earlopain) - #13759: Fix a false negative for
Lint/ConstantDefinitionInBlockwith numblocks. (@earlopain) - #13741: Register an offense for
Naming/BlockForwardingandStyle/ArgumentsForwardingwith Ruby >= 3.4 when the block argument is referenced inside a block. This was previously disabled because of a bug in Ruby 3.3.0. (@earlopain) - #13777: Fix a false negative for
Layout/EmptyLineBetweenDefswithDefLikeMacrosand numblocks. (@earlopain) - #13769: Fix a false negative for
Style/RedundantParentheseswith numblocks. (@earlopain) - #13780: Fix a false positive
Style/AccessModifierDeclarationswhen using access modifier in a numblock. (@earlopain) - #13775: Fix a false positive for
Lint/AssignmentInConditionwhen assigning in numblocks. (@earlopain) - #13773: Fix false positives for
Layout/RedundantLineBreakwhen using numbered block parameter. (@koic) - #13761: Fix a false positive for
Style/SuperArgumentswhen calling super in a numblock. (@earlopain) - #13768: Fix a false positive for
Lint/UnreachableCodewithinstance_evalnumblock. (@earlopain) - #13750: Fix false positives for
Style/RedundantSelfAssignmentwhen assigning to attribute ofself. (@koic) - #13739: Fix false positive for
Style/HashExceptandStyle/HashSlicewhen checking for inclusion with a range. (@dvandersluis) - #13751: Fix false positive in
Layout/ExtraSpacingwithForceEqualSignAlignment: truefor endless methods. (@dvandersluis) - #13767: Fix
Style/IdenticalConditionalBranchesautocorrect when condition is inside assignment. (@dvandersluis) - #13764: Fix a false negative for
Layout/SingleLineBlockChainwith numblocks. (@earlopain) - #13771: Fix wrong autocorrect for
Style/SoleNestedConditionalwhen using numblocks. (@earlopain)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.71
New features
- #13735: Add new
Lint/ArrayLiteralInRegexpcop. (@dvandersluis) - #13507: Add new
Style/HashSlicecop. (@lovro-bikic)
Bug fixes
- #13684: Fix a false positive for
Style/FrozenStringLiteralCommentwhen using the frozen string literal magic comment in Active Admin's arb files. (@koic) - #13372: Add
rubocop_cacheto the path given by--cache-rootwhen pruning cache. (@capncavedan) - #13257: Fix department disable/enable comments enabling the cop for the whole file even if that file is excluded by the cop. (@earlopain)
- #13704: Fix false positives for
Lint/OutOfRangeRegexpRefwhen matching withmatchusing safe navigation. (@koic) - #13720: Fix false positives for
Style/BlockDelimiterswhen using brace blocks as conditions underEnforcedStyle: semantic. (@koic) - #13688: Fix false negative on
Style/RedundantLineContinuationwhen the continuation is preceded by an interpolated string. (@dvandersluis) - #13677: Fix false negative on
Style/RedundantLineContinuationwhen the continuation is followed by a percent array. (@dvandersluis) - #13692: Fix false positive in
Style/RedundantLineContinuationwhen the ruby code ends with a commented continuation. (@dvandersluis) - #13675: Fix invalid autocorrect for
Style/ArrayFirstLastwhen calling.[]or&.[]with 0 or -1. (@dvandersluis) - #13685: Fix syntax error introduced by
Lint/SafeNavigationChainwhen adding safe navigation to an operator call inside a hash. (@dvandersluis) - #13725: Fix an incorrect autocorrect for
Style/IfUnlessModifierwhen using omitted hash values in an assignment. (@elliottt) - #13667: Maintain precedence in autocorrect for
Style/SoleNestedConditional. (@tejasbubane) - #13679: Fix false positive for
Style/RedundantLineContinuationwhen calling methods with fully qualified constants. (@earlopain) - #13728: Fix a RuboCop error on provided glob pattern which matches directory. (@viralpraxis)
- #13693: Fix
Style/ConditionalAssignmentcop error onunlesswithoutelseandassign_inside_conditionenforced style. (@viralpraxis) - #13669: Fix
Style/FrozenStringLiteralCommentcop error on unnormalized magic comment andneverenforced style. (@viralpraxis) - #13696: Update
Metrics/CollectionLiteralLengthto only register for[]when called onSet. (@dvandersluis)
Changes
- #13709: Add support for safe navigation to
Lint/FloatComparison. (@dvandersluis) - #13711: Add support for safe navigation to
Layout/MultilineMethodCallBraceLayout. (@dvandersluis) - #13712: Add support for safe navigation to
Layout/MultilineMethodArgumentLineBreaks. (@dvandersluis) - #13714: Add support for safe navigation to
Security/CompoundHash. (@dvandersluis) - #13674: Add support for safe navigation to
Style/BlockDelimiters. (@dvandersluis) - #13673: Add support for safe navigation to
Style/CollectionMethods. (@dvandersluis) - #13672: Add support for safe navigation to
Style/MapToSet. (@dvandersluis) - #13671: Add support for safe navigation to
Style/MethodCallWithoutArgsParentheses. (@dvandersluis) - #13701: Add support for safe navigation to
Lint/NumericOperationWithConstantResult. (@dvandersluis) - #13700: Add support for safe navigation to
Lint/RedundantStringCoercion. (@dvandersluis) - #13698: Add support for safe navigation to
Lint/UselessNumericOperation. (@dvandersluis) - #13686: Add wildcard support to
--show-cops. (@kyanagi) - #13724: Make
Style/RedundantParenthesesaware of parenthesized assignment. (@koic) - #13732: Update
Style/RedundantLineContinuationto handle required continuations followingsuper. (@dvandersluis)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.70
New features
- #13474: Add new
Style/ItAssignmentcop to detect local assignments toitinside blocks. (@dvandersluis) - #11013: Add new
Lint/SharedMutableDefaultcop to alert on mutable Hash defaults. (@corsonknowles) - #13612: Create new cop
Lint/ConstantReassignment. (@lovro-bikic) - #13628: Make LSP server support quick fix code action. (@koic)
- #13607: Support passing the target ruby version through an environment variable. (@elliottt)
- #13628: Add support for Ruby LSP as a built-in add-on. (@koic)
- #13284: Add new
target_gem_versionAPI to change behavior of a cop at runtime depending on which gem version is present. (@earlopain)
Bug fixes
- #13589: Fix
Lint/NonAtomicFileOperationto detect offenses with fully qualified constants. (@viralpraxis) - #13630: Fix CLI
--formatoption to accept fully qualified formatter class names. (@viralpraxis) - #13624: Don't show warnings from
Lint/Syntaxwhen a syntax error occurs. (@earlopain) - #13605: Fix
RuboCop::Cop::Util.to_string_literalto work correctly with frozen strings. (@viralpraxis) - #12393: Fix false negatives for
Lint/Voidinside of non-modifier conditionals. (@GabeIsman) - #13623: Fix false negatives for
Style/MultipleComparisonwhen settingAllowMethodComparison: falseand comparing with simple method calls. (@koic) - #13644: Fix a false positive for
Layout/EmptyLinesAroundAccessModifierwhen an access modifier and an expression are on the same line. (@koic) - #13645: Fix a false positive for
Style/MethodCallWithArgsParentheseswhen settingEnforcedStyle: omit_parenthesesand last argument is an endless range. (@earlopain) - #13614: Fix false positives for
Style/RaiseArgswith anonymous splat and triple dot forwarding. (@earlopain) - #13591: Fix false positives for
Lint/NestedMethodDefinitionwhen defining a method on a constant or a method call. (@koic) - #13594: Fix false positives for
Style/MultipleComparisonwhen using multiple safe navigation method calls. (@koic) - #13654: Fix false positives for
Style/RedundantInitializewhen empty initialize method has arguments. (@marocchino) - #13608: Fix crash when running
rubocop -don a config with a remoteinherit_fromthat causes a duplicate setting warning. (@dvandersluis) - #12430: Fix false negatives in
Style/RedundantLineContinuationwith multiple line continuations. (@dvandersluis) - #13638: Fix false positive for
Naming/BlockForwardingwhen method just returns the block argument. (@mvz) - #13599: Fix incorrect autocorrect for
Layout/HashAlignmentwhen there is a multiline positional argument andLayout/ArgumentAlignmentis configured withEnforcedStyle: with_fixed_indentation. (@dvandersluis) - #13586: Fix regression in
Layout/SpaceAroundOperatorswhen different comparison operators were aligned with each other. (@dvandersluis) - #13603: Fix
Lint/LiteralInInterpolationcop error on invalid string literal. (@viralpraxis) - #13582: Fix
Lint/NonAtomicFileOperationcop error on non-constant receiver. (@viralpraxis) - #13598: Fix
Lint/Voidcop error onifwithout body. (@viralpraxis) - #13634: Fix
Style/ClassAndModuleChildrencop error oncompactenforced style and unindented body. (@viralpraxis) - #13642: Fix
Style/FloatDivisioncop error if#to_fhas implicit receiver. (@viralpraxis) - #13517: Fixes
Style/HashExceptto recognize safe navigation whenActiveSupportExtensionsEnabledconfig is enabled. (@lovro-bikic) - #13585: Fix
Style/HashSyntaxcop error on implicitcallmethod. (@viralpraxis) - #13632: Fix
Style/MissingElsecop error ifStyle/EmptyElse'sEnforcedStyleis notbothandifexpression containselsif. (@viralpraxis) - #13659: Fix
Style/MissingElsecop error ifStyle/EmptyElse'sEnforcedStyleis notbothandifexpression contains multipleelsif. (@viralpraxis) - #13596: Fix
Style/RedundantConditioncop error on parentheses and modifierifinelse. (@viralpraxis) - #13616: Fix incorrect autocorrect for
Style/RedundantRegexpArgumentwhen the regex contains a single quote. (@mrzasa) - #13619: Fix
Style/YodaExpressioncop error in case of suffix form of operator. (@viralpraxis) - #13578: Update
Layout/LineContinuationSpacingto ignore continuations inside aregexporxstr. (@dvandersluis) - #13601: Update
Style/SuperArgumentsto handlesuperwith a block or with a chained method with a block. (@dvandersluis) - #13568: Fix
NoMethodErrorinConfigValidatorwhen a Cop's config is not aHashand raiseValidationErrorinstead. (@amomchilov)
Changes
- #13665: Add support for safe navigation to
Style/ObjectThen. (@dvandersluis) - #13657: Add support for safe navigation to
Layout/HashAlignment. (@dvandersluis) - #13656: Add support for safe navigation to
Layout/HeredocArgumentClosingParenthesis. (@dvandersluis) - #13655: Add support for safe navigation to
Layout/LineLength. (@dvandersluis) - #13662: Add support for safe navigation to
Style/SendWithLiteralMethodName. (@dvandersluis) - #13557: Fix false positives for
Lint/NumericOperationWithConstantResult. (@earlopain) - #13658: Fix invalid autocorrect for
Style/SlicingWithRangewhen calling.[]or&.[]with a correctable range. (@dvandersluis) - #13548: Enhance
Lint/DuplicateSetElementto detect offences withinSortedSet. (@viralpraxis) - #13646: Update
Layout/TrailingWhitespaceto support blank characters other than space and tab. (@krororo) - #13652: Update
Metrics/MethodLengthto make use ofAllowedMethodsandAllowedPatternsfor methods defined dynamically withdefine_method. (@dvandersluis) - #13606: Update
Style/AccessModifierDeclarationsto addAllowModifiersOnAliasMethodconfiguration (defaulttrue). (@dvandersluis) - #13663: Update
Style/RedundantSelfAssignmentto handle safe navigation on the right-hand side of the assignment. (@dvandersluis)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.69.2
Bug fixes
- #13553: Fix an incorrect autocorrect for
Style/MultipleComparisonwhen a variable is compared multiple times after a method call. (@koic) - #13562: Fix
Bundler/DuplicatedGemcop error in case of empty branch. (@viralpraxis) - #13573: Fix
Lint/UnescapedBracketInRegexpcop failure with invalid multibyte escape. (@earlopain) - #13556: Fix false positives for
Style/FileNullwhen using'nul'string. (@koic) - #12995: Fix
--disable-uncorrectableto not insert directives inside a string. (@dvandersluis) - #13320: Fix incorrect autocorrect when
Layout/LineContinuationLeadingSpaceandStyle/StringLiteralsautocorrects in the same pass. (@dvandersluis) - #13299: Fix
Style/BlockDelimitersto always accept braces when an operator method argument is chained. (@dvandersluis) - #13565: Fix
Style/RedundantLineContinuationfalse negatives when a redundant continuation follows a required continuation. (@dvandersluis) - #13551: Fix an incorrect autocorrect for
Style/IfWithSemicolonwhen using multi value assignment inifwith a semicolon is used. (@koic) - #13534: Fix
Layout/LineLengthcop failure in case of YARD-comment-like string. (@viralpraxis) - #13558: Fix
Lint/NonAtomicFileOperationcop error in case of implicit receiver. (@viralpraxis) - #13564: Fix
Metrics/ClassLengthcop error in case of chained assignments. (@viralpraxis) - #13570: Fix
Naming/RescuedExceptionsVariableNamecop error when exception is assigned with writer method. (@viralpraxis) - #13559: Fix a false positive for
Style/RedundantLineContinuationwhen a method definition is used as an argument for a method call. (@davidrunger) - #13574: Fix
Style/ExactRegexpMatchcop error on invalid regular expression literal. (@viralpraxis) - #13554: Fix
Style/FrozenStringLiteralCommentfalse positive in case of non-downcased value literal. (@viralpraxis) - #13569: Fix
Style/MethodCallWithoutArgsParenthesescop error in case of mass hash assignment. (@viralpraxis) - #13542: Fix
Style/RedundantConditioncop failure in case of empty arguments. (@viralpraxis) - #13509: Update
Layout/ExtraSpacingandLayout/SpaceAroundOperatorsto handle preceding operators inside strings. (@dvandersluis)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.69.1
Bug fixes
- #13502: Fix an incorrect autocorrect for
Style/DigChainwhen using safe navigation method chain withdigmethod. (@koic) - #13505: Fix an error for
Style/ParallelAssignmentwhen using the anonymous splat operator. (@earlopain) - #13184: Fix some false positives in
Lint/UnreachableCode. (@isuckatcs) - #13494: Fix false positives for
Style/HashExceptcop when usingreject/!include?,reject/!in?orselect/!exclude?combinations. (@lovro-bikic) - #13522: Fix
Lint/UnescapedBracketInRegexpcop failure with invalid regular expression. (@viralpraxis) - #13523: Fix
Style::AccessModifierDeclarationscop failure in case ofifnode withoutelse. (@viralpraxis) - #13524: Fix
Style/RedundantArgumentcop failure while inspecting string literal with invalid encoding. (@viralpraxis) - #13528: Fix
Style/RedundantParenthesescop failure in case of splattedcasenode without condition. (@viralpraxis) - #13521: Fix
Style/RedundantSelfcop failure withkwnilargargument node. (@viralpraxis) - #13526: Fix
Style/StringConcatenationcop failure when there are mixed implicit and explicit concatenations. (@viralpraxis) - #13511: Fix false positive in
Lint/UnescapedBracketInRegexpwhen using regexp_parser 2.9.2 and earlier. (@dvandersluis) - #13096: Update
Style/BlockDelimitersto not change braces when they are required for syntax. (@dvandersluis) - #13512: Update
Style/LambdaCallto be aware of safe navigation. (@dvandersluis)
- Ruby
Published by bbatsov about 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.69
New features
- #13439: Add new
Lint/HashNewWithKeywordArgumentsAsDefaultcop. (@koic) - #11191: Add new
Lint/NumericOperationWithConstantResultcop. (@zopolis4) - #13486: Add new
Style/DigChaincop. (@dvandersluis) - #13490: Add new
Style/FileNullcop. (@dvandersluis) - #13484: Add new
Style/FileTouchcop. (@lovro-bikic) - #13437: Add a new cop
Lint/UselessDefinedto detect cases such asdefined?('Foo')whendefined?(Foo)was intended. (@earlopain)
Bug fixes
- #13455: Fix a false positive for
Layout/EmptyLineAfterGuardClausewhen using a guard clause outside oneliner block. (@koic) - #13412: Fix a false positive for
Style/RedundantLineContinuationwhen there is a line continuation at the end of Ruby code followed by__END__data. (@koic) - #13476: Allow to write generics type of RBS::Inline annotation after subclass definition in
Style/CommentedKeyword. (@dak2) - #13441: Fix an incorrect autocorrect for
Style/IfWithSemicolonwhen usingreturnwith value inifwith a semicolon is used. (@koic) - #13448: Fix an incorrect autocorrect for
Style/IfWithSemicolonwhen the then body contains an arithmetic operator method call with an argument. (@koic) - #13199: Make
Style/RedundantConditionskip autocorrection when a branch has a comment. (@koic) - #13411: Fix
Style/BitwisePredicatewhen having regular method. (@d4be4st) - #13432: Fix false positive for
Lint/FloatComparisonagainst nil. (@lovro-bikic) - #13461: Fix false positives for
Lint/InterpolationCheckwhen using invalid syntax in interpolation. (@koic) - #13402: Fix a false positive for
Lint/SafeNavigationConsistencywhen using unsafe navigation with both&&and||. (@koic) - #13434: Fix a false positive for
Naming/MemoizedInstanceVariableNamefor assignment methods`. (@earlopain) - #13415: Fix false positives for
Naming/MemoizedInstanceVariableNamewhen usinginitialize_clone,initialize_copy, orinitialize_dup. (@koic) - #13421: Fix false positives for
Style/SafeNavigationwhen using a method chain that exceeds theMaxChainLengthvalue and includes safe navigation operator. (@koic) - #13433: Fix autocorrection for
Style/AccessModifierDeclarationsfor multiple inline symbols. (@dvandersluis) - #13430: Fix EmptyLinesAroundMethodBody for methods with arguments spanning multiple lines. (@aduth)
- #13438: Fix incorrect correction in
Lint/Voidif an operator is called in a void context using a dot. (@dvandersluis) - #13419: Fix
Lint/DeprecatedOpenSSLConstantfalse positive when the argument is a safe navigation method call. (@dvandersluis) - #13404: Fix
Style/AccessModifierDeclarationsto register (as positive or negative, depending onAllowModifiersOnSymbolsvalue) access modifiers with multiple symbols. (@dvandersluis) - #13436: Fix incorrect offense and autocorrect for
Lint/RedundantSplatExpansionwhen percent literal array is used in a safe navigation method call. (@lovro-bikic) - #13442: Fix an incorrect autocorrect for
Style/NestedTernaryOperatorwhen ternary operators are nested and the inner condition is parenthesized. (@koic) - #13444: Fix an incorrect autocorrect for
Style/OneLineConditionalwhen the else branch of a ternary operator has multiple expressions. (@koic) - #13483: Fix an incorrect autocorrect for
Style/RedundantRegexpArgumentwhen using escaped double quote character. (@koic) - #13497: Fix infinite loop error for
Style/IfWithSemicolonwhen using nested if/;/end in if body. (@koic) - #13477: Update
Layout/LeadingCommentSpaceto accept multiline shebangs at the top of the file. (@dvandersluis) - #13453: Update
Style/AccessModifierDeclarationsto handleattr_*methods with multiple parameters. (@dvandersluis) - #12597: Update
Style/SingleLineDoEndBlockto not register an offense if it will introduce a conflictingLayout/RedundantLineBreakoffense. (@dvandersluis)
Changes
- #11680: Add autocorrection for strings to
Layout/LineLengthwhenSplitStringsis set totrue. (@dvandersluis) - #13470: Make
Style/ArrayIntersectaware ofnone?. (@earlopain) - #13481: Support unicode-display_width v3. (@gemmaro)
- #13473: Update
Lint/ItWithoutArgumentsInBlockto not register offenses in Ruby 3.4. (@dvandersluis) - #13420: Update
Lint/RedundantSafeNavigationto register an offense when the receiver isself. (@dvandersluis) - #11393: Update
Lint/UnusedMethodArgumentto allow the class names forIgnoreNotImplementedMethodsto be configured. (@dvandersluis) - #13058: Update
Style/AccessModifierDeclarationsto accept modifier with splatted method call. (@dvandersluis)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.68
New features
- #13050: Add new
Style/BitwisePredicatecop. (@koic) - #12140: Add new
Style/CombinableDefinedcop. (@dvandersluis) - #12988: Add new
Style/AmbiguousEndlessMethodDefinitioncop. (@dvandersluis) - #11514: Add new
Lint/UnescapedBracketInRegexpcop. (@dvandersluis) - #13360: Add
AllowSteepAnnotationconfig option toLayout/LeadingCommentSpace. (@tk0miya) - #13146: Add new
IgnoreDuplicateElseBranchoption toLint/DuplicateBranch. (@fatkodima) - #13171: Add new
Style/SafeNavigationChainLengthcop. (@fatkodima) - #13252: Add new
Style/KeywordArgumentsMergingcop. (@fatkodima)
Bug fixes
- #13401: Fix a false negative for
Style/RedundantLineContinuationwhen there is a line continuation at the EOF. (@koic) - #13368: Fix an incorrect autocorrect for
Naming/BlockForwardingwithStyle/ExplicitBlockArgument. (@koic) - #13391: Fix deserialization of unknown encoding offenses. (@earlopain)
- #13348: Ensure
Style/BlockDelimitersautocorrection does not move other code between the block and comment. (@dvandersluis) - #13382: Fix an error during error handling for custom ruby extractors when the extractor is a class. (@earlopain)
- #13309: Fix a false negative for
Lint/UselessAssignmentcop when there is a useless assignment followed by a block. (@pCosta99) - #13255: Fix false negatives for
Style/MapIntoArraywhen using non-splatted arguments. (@vlad-pisanov) - #13356: Fix a false positive for
Layout/SpaceBeforeBracketswhen there is a dot before[]=. (@earlopain) - #13365: Fix false positives for
Lint/SafeNavigationConsistencywhen using safe navigation on the LHS with operator method on the RHS of&&. (@koic) - #13390: Fix false positives for
Style/GuardClausewhen using a local variable assigned in a conditional expression in a branch. (@koic) - #13337: Fix false positives for
Style/RedundantLineContinuationwhen required line continuations for&&is used with an assignment after a line break. (@koic) - #13387: Fix false positives in
Style/RedundantParentheseswhen parentheses are used around method chain withdo...endblock in keyword argument. (@koic) - #13341: Fix false positives for
Lint/SafeNavigationChainwhen a safe navigation operator is used with a method call as the RHS operand of&&for the same receiver. (@koic) - #13324: Fix
--disable-uncorrectableto not insert a comment inside a string continuation. (@dvandersluis) - #13364: Fix incorrect autocorrect with
Lint/UselessAssignmenta multiple assignment orforcontains an inner assignment. (@dvandersluis) - #13353: Fix an incorrect autocorrect for
Style/BlockDelimiterswhenEnforcedStyle: semanticis set and used withLayout/SpaceInsideBlockBraces. (@koic) - #13361: Fix false positives for
Style/RedundantInterpolationUnfreezeandStyle/RedundantFreezewhen strings contain interpolated global, instance, and class variables. (@vlad-pisanov) - #13343: Prevent
Layout/LineLengthfrom breaking up a method with arguments chained onto a heredoc delimiter. (@dvandersluis) - #13374: Return exit code 0 with
--display-only-correctableand--display-only-safe-correctablewhen no offenses are displayed. (@dvandersluis) - #13193: Fix false positive in
Style/MultipleComparisonwhenComparisonsThresholdexceeds 2. (@fatkodima, @vlad-pisanov) - #13325: Fix an incorrect autocorrect for
Lint/NonAtomicFileOperationwhen using a postfixunlessfor file existence checks before creating a file, in cases withDir.mkdir. (@kotaro0522) - #13397: Update
PercentLiteralCorrectorto be able to write pairs of delimiters without excessive escaping. (@dvandersluis) - #13336: Update
Style/SafeNavigationto not autocorrect if the RHS of anandnode is anornode. (@dvandersluis) - #13378: When removing parens in
Style/TernaryParentheseswith asendnode condition, ensure its arguments are parenthesized. (@dvandersluis)
Changes
- #13347: When running
rubocop -V, show the analysis Ruby version of the current directory. (@earlopain)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.67
New features
- #13259: Add new
Lint/DuplicateSetElementcop. (@koic) - #13223: Add
AllowRBSInlineAnnotationconfig option toLayout/LeadingCommentSpaceto support RBS::Inline style annotation comments. (@tk0miya) - #13310: Display analysis Ruby version in
rubocop -V. (@koic)
Bug fixes
- #13314: Fix a false negative for
Style/Semicolonwhen using a semicolon between a closing parenthesis after a line break and a consequent expression. (@koic) - #13217: Fix a false positive in
Lint/ParenthesesAsGroupedExpressionwith compound ranges. (@gsamokovarov) - #13268: Fix a false positive for
Style/BlockDelimiterswhen a single line do-end block with an inlinerescuewith a semicolon beforerescue. (@koic) - #13298: Fix an error for
Layout/AccessModifierIndentationwhen the access modifier is on the same line as the class definition. (@koic) - #13198: Fix an error for
Style/OneLineConditionalwhen using nested if/then/else/end. (@koic) - #13316: Fix an incorrect autocorrect for
Lint/ImplicitStringConcatenationwithLint/TripleQuoteswhen string literals with triple quotes are used. (@koic) - #13220: Fix an incorrect autocorrect for
Style/ArgumentsForwardingwhen using only forwarded arguments in brackets. (@koic) - #13202: Fix an incorrect autocorrect for
Style/CombinableLoopswhen looping over the same data with different block variable names. (@koic) - #13291: Fix an incorrect autocorrect for
Style/RescueModifierwhen using modifier rescue for method call with heredoc argument. (@koic) - #13226: Fix
--auto-gen-configwhen passing an absolute config path. (@earlopain) - #13225: Avoid syntax error when correcting
Style/OperatorMethodCallwith/operations followed by a parenthesized argument. (@dvandersluis) - #13235: Fix an error for
Style/IfUnlessModifierwhen multilineifthat fits on one line and using implicit method call with hash value omission syntax. (@koic) - #13219: Fix a false positive for
Style/ArgumentsForwardingwith Ruby 3.0 and optional position arguments. (@earlopain) - #13271: Fix a false positive for
Lint/AmbiguousRangewhen using rational literals. (@koic) - #13260: Fix a false positive for
Lint/RedundantSafeNavigationwith namespaced constants. (@earlopain) - #13224: Fix false positives for
Style/OperatorMethodCallwith named forwarding. (@earlopain) - #13213: Fix false positives for
Style/AccessModifierDeclarationswhenAllowModifiersOnAttrs: trueand using splat with a percent symbol array, or with a constant. (@koic) - #13145: Fix false positives for
Style/RedundantLineContinuationwhen line continuations with comparison operator and the LHS is wrapped in parentheses. (@koic) - #12875: Fix false positive for
Style/ArgumentsForwardingwhen argument is used inside a block. (@dvandersluis) - #13239: Fix false positive for
Style/CollectionCompactwhen usingdelete_if. (@masato-bkn) - #13210: Fix omit_parentheses style for pattern match with value omission in single-line branch. (@gsamokovarov)
- #13149: Handle crashes in custom Ruby extractors more gracefully. (@earlopain)
- #13319: Handle literal forward slashes inside a
regexpinLint/LiteralInInterpolation. (@dvandersluis) - #13208: Fix an incorrect autocorrect for
Style/IfWithSemicolonwhen single-lineif/;/endwhen the then body contains a method call with[]or[]=. (@koic) - #13318: Prevent modifying blocks with
Style/HashEachMethodsif the hash is modified within the block. (@dvandersluis) - #13293: Fix
TargetRubyVersionfrom a gemspec when the gemspec is not named like the folder it is located in. (@earlopain) - #13211: Fix wrong autocorrect for
Style/GuardClausewhen using heredoc withoutelsebranch. (@earlopain) - #13215: Fix wrong autocorrect for
Lint/BigDecimalNewwhen using::BigDecimal.new. (@earlopain) - #13215: Fix wrong autocorrect for
Style/MethodCallWithArgsParentheseswithEnforcedStyle: omit_parenthesesand whitespace. (@earlopain) - #13302: Fix incompatible autocorrect between
Style/RedundantBeginandStyle/BlockDelimiterswithEnforcedStyle: braces_for_chaining. (@earlopain)
Changes
- #13221: Do not group accessors having RBS::Inline annotation comments in
Style/AccessorGrouping. (@tk0miya) - #13286: Add
AllowedMethodsconfiguration toLayout/FirstMethodArgumentLineBreak. (@dvandersluis) - #13110: Add support in
Style/ArgumentsForwardingfor detecting forwarding of all anonymous arguments. (@dvandersluis) - #13222: Allow to write RBS::Inline annotation comments after method definition in
Style/CommentedKeyword. (@tk0miya) - #13253: Emit a deprecation when custom cops inherit from
RuboCop::Cop::Cop. (@earlopain) - #13300: Set
EnforcedShorthandSyntax: eitherby default forStyle/HashSyntax. (@koic) - #13254: Enhance the autocorrect for
Naming/InclusiveLanguagewhen a sole suggestion is set. (@koic) - #13232: Make server mode aware of auto-restart for local config update. (@koic)
- #13270: Make
Style/SelectByRegexpaware offilterin Ruby version 2.6 or above. (@masato-bkn) - #9816: Refine
Lint/SafeNavigationConsistencycop to check that the safe navigation operator is applied consistently and without excess or deficiency. (@koic) - #13256: Report and correct more
Style/SafeNavigationoffenses. (@dvandersluis) - #13245: Support
filter/filter!inStyle/CollectionCompact. (@masato-bkn) - #13281: Support Ruby 3.4 for
Lint/UriRegexpto avoid obsolete API. (@koic) - #13229: Update
Style/MapIntoArrayto be able to handle arrays created using[].tap. (@dvandersluis) - #13305: Update
Style/ReturnNilInPredicateMethodDefinitionto detect implicitnilreturns insideif. (@dvandersluis) - #13327: Make server mode aware of auto-restart for .rubocop_todo.yml update. (@koic)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.66.1
Bug fixes
- #13191: Fix an error for
Style/IfWithSemicolonwhen using nested single-line if/;/end in block of if/else branches. (@koic) - #13178: Fix false positive for
Style/EmptyLiteralwithHash.new([]). (@earlopain) - #13176: Fix crash in
Style/EmptyElsewhenAllowComments: trueand the else clause is missing. (@vlad-pisanov) - #13185: Fix false negatives in
Style/MapIntoArrayautocorrection when usingensure,def,defsandfor. (@vlad-pisanov)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.66
New features
- #13077: Add new global
StringLiteralsFrozenByDefaultoption for correct analysis withRUBYOPT=--enable=frozen-string-literal. (@earlopain) - #13080: Add new
DocumentationExtensionglobal option to serve documentation with extensions different than.html. (@earlopain) - #13074: Add new
Lint/UselessNumericOperationcop to check for inconsequential numeric operations. (@zopolis4) - #13061: Add new
Style/RedundantInterpolationUnfreezecop to check fordupand@+on interpolated strings in Ruby >= 3.0. (@earlopain)
Bug fixes
- #13093: Fix an error for
Lint/ImplicitStringConcatenationwhen implicitly concatenating a string literal with a line break and string interpolation. (@koic) - #13098: Fix an error for
Style/IdenticalConditionalBrancheswhen handling empty case branches. (@koic) - #13113: Fix an error for
Style/IfWithSemicolonwhen a nestedifwith a semicolon is used. (@koic) - #13097: Fix an error for
Style/InPatternThenwhen using alternative pattern matching deeply. (@koic) - #13159: Fix an error for
Style/OneLineConditionalwhen using if/then/else/end with multiple expressions in thethenbody. (@koic) - #13092: Fix an incorrect autocorrect for
Layout/EmptyLineBetweenDefswhen two method definitions are on the same line separated by a semicolon. (@koic) - #13116: Fix an incorrect autocorrect for
Style/IfWithSemicolonwhen a single-lineif/;/endhas an argument in the then body expression. (@koic) - #13161: Fix incorrect autocorrect for
Style/IfWithSemicolonwhen using multiple expressions in theelsebody. (@koic) - #13132: Fix incorrect autocorrect for
Style/TrailingBodyOnMethodDefinitionwhen an expression precedes a method definition on the same line with a semicolon. (@koic) - #13164: Fix incorrect autocorrect behavior for
Layout/BlockAlignmentwhenEnforcedStyleAlignWith: either (default). (@koic) - #13087: Fix an incorrect autocorrect for
Style/MultipleComparisonwhen expression with more comparisons precedes an expression with less comparisons. (@fatkodima) - #13172: Fix an error for
Layout/EmptyLinesAroundExceptionHandlingKeywordswhenensureorelseandendare on the same line. (@koic) - #13107: Fix an error for
Lint/ImplicitStringConcatenationwhen there are multiple adjacent string interpolation literals on the same line. (@koic) - #13111: Fix an error for
Style/GuardClausewhen if clause is empty and correction would not fit on single line because ofLayout/LineLength. (@earlopain) - #13137: Fix an error for
Style/ParallelAssignmentwhen using__FILE__. (@earlopain) - #13143: Fix an error during
TargetRubyVersiondetection if the gemspec is not valid syntax. (@earlopain) - #13131: Fix false negatives for
Lint/Voidwhen usingensure,defsandnumblock. (@vlad-pisanov) - #13174: Fix false negatives for
Style/MapIntoArraywhen initializing the destination usingArray[],Array([]), orArray.new([]). (@vlad-pisanov) - #13173: Fix false negatives for
Style/EmptyLiteralwhen usingArray[],Hash[],Array.new([])andHash.new([]). (@vlad-pisanov) - #13126: Fix a false positive for
Style/Aliaswhen using multiplealiasindef. (@koic) - #13085: Fix a false positive for
Style/EmptyElsewhen a comment-onlyelseis used afterelsifandAllowComments: trueis set. (@koic) - #13118: Fix a false positive for
Style/MapIntoArraywhen splatting. (@earlopain) - #13105: Fix false positives for
Style/ArgumentsForwardingwhen forwarding kwargs/block arg with non-matching additional args. (@koic) - #13139: Fix false positives for
Style/RedundantConditionwhen using modifieriforunless. (@koic) - #13134: Fix false negative for
Lint/Voidwhen using using frozen literals. (@vlad-pisanov) - #13148: Fix incorrect autocorrect for
Lint/EmptyConditionalBodywhen missingelsifbody withendon the same line. (@koic) - #13109: Fix an error for the
Lockfileparser when it contains incompatibleBUNDLED WITHversions. (@earlopain) - #13112: Fix detection of
TargetRubyVersionthrough the gemfile if the gemfile ruby version is below 2.7. (@earlopain) - #13155: Fixes an error when the server cache directory has too long path, causing rubocop to fail even with caching disabled. (@protocol7)
Changes
- #13150: Allow
get_!,set_!,get_?,set_?,get_=, andset_=inNaming/AccessorMethodName. (@koic) - #13103: Make
Lint/UselessAssignmentautocorrection safe. (@koic) - #13099: Make
Style/RedundantRegexpArgumentrespect theEnforcedStyleofStyle/StringLiterals. (@koic) - #13165: Remove dependency on the
rexmlgem. (@bquorning) - #13090: Require RuboCop AST 1.32.0+ to use
RuboCop::AST::RationalNode. (@koic)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.65.1
New features
- #13068: Add config validation to
Naming/PredicateNameto check that allForbiddenPrefixesare being checked. (@maxjacobson)
Bug fixes
- #13051: Fix an error for
Lint/FloatComparisonwhen comparing with rational literal. (@koic) - #13065: Fix an error for
Lint/UselessAssignmentwhen same name variables are assigned using chained assignment. (@koic) - #13062: Fix an error for
Style/InvertibleUnlessConditionwhen using empty parenthesis as condition. (@earlopain) - #11438: Explicitly load
fileutilsbefore calculatingbefore_us. (@r7kamura) - #13044: Fix false negatives for
Lint/ImplicitStringConcatenationwhen using adjacent string interpolation literals on the same line. (@koic) - #13083: Fix a false positive for
Style/GlobalStdStreamwhen using namespaced constants likeFoo::STDOUT. (@earlopain) - #13081: Fix a false positive for
Style/ZeroLengthPredicatewhen using safe navigation and non-zero comparison. (@fatkodima) - #13041: Fix false positives for
Lint/UselessAssignmentwhen pattern match variable is assigned and used in a block. (@koic) - #13076: Fix an incorrect autocorrect for
Naming/RescuedExceptionsVariableNamewhen using hash value omission. (@koic)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.65
New features
Bug fixes
- #12954: Fix a false negative for
Style/ArgumentsForwardingwhen arguments forwarding inyield. (@koic) - #13033: Fix a false positive for
Layout/SpaceAroundOperatorswhen using multiple spaces between an operator and a tailing comment. (@koic) - #12885: Fix a false positive for
Lint/ToEnumArgumentswhen enumerator is created for another method. (@koic) - #13018: Fix a false positive for
Style/MethodCallWithArgsParentheseswhenEnforcedStyle: omit_parenthesesis set and parenthesized method call is used before constant resolution. (@koic) - #12986: Fix a false positive for
Style/RedundantBeginwhen endless method definition withrescue. (@koic) - #12985: Fix an error for
Style/RedundantRegexpCharacterClasswhen using regexp_parser gem 2.3.1 or older. (@koic) - #13010: Fix an error for
Style/SuperArgumentswhen the hash argument is or-assigned. (@koic) - #13023: Fix an error for
Style/SymbolProcwhen using lambda->with one argument and multilinedo...endblock. (@koic) - #12989: Fix an error for the
inherit_gemconfig when the Gemfile contains an uninstalled git gem. (@earlopain) - #12975: Fix an error for the
inherit_gemconfig when running RuboCop without bundler and no Gemfile exists. (@earlopain) - #12997: Fix an error for
Lint/UnmodifiedReduceAccumulatorwhen the block is empty. (@earlopain) - #12979: Fix false negatives for
Lint/Voidwhen void expression with guard clause is not on last line. (@koic) - #12716: Fix false negatives for
Lint/Voidwhen using parenthesized void operators. (@koic) - #12471: Fix false negatives for
Style/ZeroLengthPredicatewhen using safe navigation operator. (@koic) - #12960: Fix false positives for
Lint/NestedMethodDefinitionwhen definition of method on variable. (@koic) - #13012: Fix false positives for
Style/HashExceptwhen usingrejectand callinginclude?method with bang. (@koic) - #12983: Fix false positives for
Style/SendWithLiteralMethodNameusingsendwith writer method name. (@koic) - #12957: Fix false positives for
Style/SuperArgumentswhen calling super in a block. (@koic)
Changes
- #12970: Add
CountModifierFormsoption toMetrics/BlockNestingand set it tofalseby default. (@koic) - #13032: Display warning messages for deprecated APIs. (@koic)
- #13031: Enable YJIT by default in server mode. (@koic)
- #12557: Make server mode aware of auto-restart for
bundle update. (@koic) - #12616: Make
Style/MapCompactWithConditionalBlockaware offilter_map. (@koic) - #13035: Support autocorrect for
Lint/ImplicitStringConcatenation. (@koic)
- Ruby
Published by bbatsov over 1 year ago
https://github.com/rubocop/rubocop - RuboCop 1.64.1
Bug fixes
- #12951: Fix an error for
Style/CopyrightwhenAutocorrectNoticeis missing. (@koic) - #12932: Fix end position of diagnostic for LSP. (@ksss)
- #12926: Fix a false positive for
Style/SuperArgumentswhen the methods block argument is reassigned beforesuper. (@earlopain) - #12931: Fix false positives for
Style/RedundantLineContinuationwhen line continuations involvebreak,next, oryieldwith a return value. (@koic) - #12924: Fix false positives for
Style/SendWithLiteralMethodNamewhenpublic_sendargument is a method name that cannot be autocorrected. (@koic)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.64
New features
- #12904: Add new
either_consistentSupportedShorthandSyntaxtoStyle/HashSyntax. (@pawelma) - #12842: Add new
Style/SendWithLiteralMethodNamecop. (@koic) - #12309: Add new
Style/SuperArgumentscop. (@earlopain) - #12917: Suggest correct formatter name for
--formatcommand line option. (@koic) - #12242: Support
AllowModifiersOnAttrsoption forStyle/AccessModifierDeclarations. (@krororo) - #11585: Support
AllowedMethodsforStyle/DocumentationMethod. (@koic)
Bug fixes
- #7189: Fix a false positive for
Style/Copyrightwhen using multiline copyright notice. (@koic) - #12914: Fix a false negative for
Layout/EmptyCommentwhen using an empty comment next to code after comment line. (@koic) - #12919: Fix false negatives for
Style/ArgumentsForwardingwhen forward target issuper. (@koic) - #12923: Fix false negatives for
Style/ArgumentsForwardingwhen forward target is safe navigation method. (@koic) - #12894: Fix false positives for
Style/MapIntoArraywhen usingeachwithout receiver with<<to build an array. (@koic) - #12876: Fix an error for the lockfile parser if a gemfile exists but a lockfile doesn't. (@earlopain)
- #12888: Fix
--no-exclude-limitgenerating a todo withMaxconfig instead of listing everything out withExclude. (@earlopain) - #12898: Fix an error for
TargetRailsVersionwhen parsing from the lockfile with prerelease rails. (@earlopain)
Changes
- #12908: Add rubocop-rspec back to suggested extensions when rspec-rails is in use. (@pirj)
- #12884: Align output from
cop.documentation_urlwith--show-docs-urlwhen passing a config as argument. (@earlopain) - #12905: Support
ActiveSupportExtensionsEnabledforStyle/SymbolProc. (@koic) - #12897: Respect user's intentions with
workspace/executeCommandLSP method. (@koic)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.63.5
Bug fixes
- #12877: Fix an infinite loop error for
Layout/FirstArgumentIndentationwhen specifyingEnforcedStyle: with_fixed_indentationofLayout/ArrayAlignment. (@koic) - #12873: Fix an error for
Metrics/BlockLengthwhen theCountAsOneconfig is invalid. (@koic) - #12881: Fix incorrect autocorrect when
Style/NumericPredicateis used with negations. (@fatkodima) - #12882: Fix
Layout/CommentIndentationfor comment-only pattern matching. (@nekketsuuu)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.63.3
Bug fixes
- #12857: Fix false negatives for
Lint/UnreachableCodewhen using pattern matching. (@koic) - #12852: Fix an error for
Lint/EmptyFilein formatters when using cache. (@earlopain) - #12848: Fix an error that occurs in
RuboCop::Lockfilewhen the constant Bundler is uninitialized. (@koic)
Changes
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.63.4
Bug fixes
- #12871: Fix an error for
rubocop -Vwhen.rubocop.ymlcontains ERB. (@earlopain) - #12862: Fix a false positive for
Style/RedundantLineContinuationwhen line continuations involvereturnwith a return value. (@koic) - #12664: Fix handling of
textDocument/diagnostic. (@muxcmux) - #12865: Fix Rails Cops, which weren't reporting any violations unless running with
bundle exec. (@amomchilov)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.63.2
Bug fixes
- #12843: Fix an error for
Lint/MixedCaseRangewhen a character betweenZandais used in the regexp range. (@koic) - #12846: Fix an error for
RuboCop::Lockfilewhen there is no Bundler environment. (@koic) - #12832: Fix an error for
Style/ArgumentsForwardingwhen using block arg in nested method definitions. (@koic) - #12841: Fix false negatives for
Lint/UnreachableLoopwhen using pattern matching. (@koic) - #12835: Allow global offenses to be disabled by directive comments. (@earlopain)
Changes
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.63.1
Bug fixes
- #12828: Fix a false positive for
Lint/AssignmentInConditionif assigning inside a method call. (@earlopain) - #12823: Fixed "uninitialized constant
RuboCop::Lockfile::Bundler", caused when running RuboCop withoutbundler execon codebases that userubocop-rails. (@amomchilov)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.63
New features
- #11878: Add new
Style/MapIntoArraycop. (@ymap) - #12186: Add new
requires_gemAPI for declaring which gems a Cop needs. (@amomchilov)
Bug fixes
- #12769: Fix a false positive for
Lint/RedundantWithIndexwhen callingwith_indexwith receiver and a block. (@koic) - #12547: Added a comment recommending upgrading to the latest version of Rubocop in the error text when an Infinite loop detected error occurs. (@Hiroto-Iizuka)
- #12782: Fix an error for
Style/AliaswithEnforcedStyle: prefer_aliaswhen callingalias_methodwith fewer than 2 arguments. (@earlopain) - #12781: Fix an error for
Style/ExactRegexpMatchwhen callingmatchwithout a receiver. (@earlopain) - #12780: Fix an error for
Style/RedundantEachwhen usingreverse_each.eachwithout a block. (@earlopain) - #12731: Treat
&.the same way as.for setter methods inLint/AssignmentInCondition. (@jonas054) - #12793: Fix false positives for
Style/RedundantLineContinuationwhen using line continuation with modifier. (@koic) - #12807: Fix false positives for
Naming/BlockForwardingwhen using explicit block forwarding in block method and others. (@koic) - #12796: Fix false positives for
Style/EvalWithLocationwhen usingevalwith a line number from a method call or a variable. (@koic) - #12794: Fix false positives for
Style/RedundantArgumentwhen when single-quoted strings for cntrl character. (@koic) - #12797: Fix false positives for
Style/RedundantLineContinuationwhen using line continuations with&&or||operator in assignment. (@koic) - #12793: Fix false positives for
Style/RedundantLineContinuationwhen multi-line continuations with operators. (@koic) - #12801: Fix incorrect autocorrect for
Style/CollectionCompactwhen usingdelete_if. (@koic) - #12789: Make
Style/RedundantPercentQsafe on multiline strings. (@boardfish) - #12802: Return global offenses for
Naming/FileNameandNaming/InclusiveLanguagefor empty files. (@earlopain) - #12804: Return global offenses for
Style/Copyrightwhen the file is empty. (@earlopain)
Changes
- #12813: Add rubocop-rspec_rails to suggested extensions and extension doc. (@ydah)
- #12820: Add support more Capybara debugger entry points for
Lint/Debugger. (@ydah) - #12676: Adjust offending range in LSP. (@koic)
- #12815: Ignore
Rakefile.rbinNaming/FileNamein the default config. (@artur-intech) - #12800: Handle empty obsoletion config. (@sambostock)
- #12721: Make
Lint/Debuggeraware ofruby/debugrequires. (@earlopain) - #12817: Make
rubocop -Vdisplay rubocop-rspec_rails version when using it. (@ydah) - #12180: Replace regex with
Bundler::LockfileParser. (@amomchilov)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.62.1
Bug fixes
- #12761: Fix a false positive for
Style/HashEachMethodswhen the key block argument ofEnumerable#eachmethod is unused afterchunk. (@koic) - #12768: Fix a false positive for
Style/NilComparisonwithout receiver andEnforcedStyle: comparison. (@earlopain) - #12752: Fix an error for
Gemspec/RequiredRubyVersionwhen the file is empty. (@earlopain) - #12770: Fix an error for
Lint/RedundantWithIndexwhen the method has no receiver. (@earlopain) - #12775: Fix an error for
Lint/UselessTimeswhen no block is present. (@earlopain) - #12772: Fix an error for
Style/ClassVarswhen callingclass_variable_setwithout arguments. (@earlopain) - #12773: Fix an error for
Style/ForwithEnforcedStyle: forwhen no receiver. (@earlopain) - #12765: Fix an error for
Layout/MultilineMethodCallIndentationwith safe navigation and assignment method. (@earlopain) - #12703: Fix an error for
Lint/MixedCaseRangewith invalid byte sequence in UTF-8. (@earlopain) - #12755: Fix an exception for
RedundantCurrentDirectoryInPathin case ofrequire_relativewithout arguments. (@viralpraxis) - #12710: Fix a false negative for
Layout/EmptyLineAfterMagicCommentwhen the file is comments only. (@earlopain) - #12758: Fix false positives for
Layout/RedundantLineBreakwhen using&&or||after a backslash newline. (@koic) - #12763: Fix an infinite loop for
Style/MultilineMethodSignaturewhen there is a newline directly after the def keyword. (@earlopain) - #12774: Fix an infinite loop for
Style/RaiseArgswithEnforcedStyle: compactwhen passing more than 2 arguments toraise. (@earlopain) - #12663: Fix
Lint/Syntaxgetting disabled byrubocop:disable Lint/Syntax. (@earlopain) - #12756: Only parse target Ruby from gemspec if array elements are strings. (@davidrunger)
Changes
- #12730: Skip
LineLengthphase on--auto-gen-only-exclude. (@sambostock)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.62
Note: This is the first RuboCop release that features (experimental) support for using Prism instead of the parser gem. Check out the docs for more details.
See also this article for additional context.
New features
- #12600: Support Prism as a Ruby parser (experimental). (@koic)
- #12725: Support
TargetRubyVersion 3.4(experimental). (@koic)
Bug fixes
- #12746: Fix a false positive for
Lint/ToEnumArgumentswhen enumerator is created for another method in no arguments method definition. (@koic) - #12726: Fix a false positive for
Style/RedundantLineContinuationwhen using line concatenation and calling a method with keyword arguments without parentheses. (@koic) - #12738: Fix an error for
Style/Encodingwhen magic encoding with mixed case present. (@koic) - #12732: Fix error determining target Ruby when gemspec
required_ruby_versionis read from another file. (@davidrunger) - #12736: Fix invalid autocorrect in
Layout/SpaceInsideHashLiteralBraces. (@bquorning) - #12667: Don't load excluded configuration. (@jonas054)
- Ruby
Published by bbatsov almost 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.61
New features
- #12682: Add
--editor-modeCLI option. (@koic) - #12657: Support
AutoCorrect: contextualoption for LSP. (@koic) - #12273: Make
OffenseCountFormatterdisplay autocorrection information. (@koic) - #12679: Publish
RuboCop::LSP.enableAPI to enable LSP mode. (@koic) - #12699: Support searching for
.rubocop.ymlandrubocop/config.ymlin compliance with dot-config. (@koic)
Bug fixes
- #12720: Fix a false positive for
Style/ArgumentsForwardingwhen using block arg forwarding to within block with Ruby 3.3.0. (@koic) - #12714: Fix an error for
Gemspec/RequiredRubyVersionwhenrequired_ruby_versionis specified withGem::Requirement.newand is higher thanTargetRubyVersion. (@koic) - #12690: Fix an error for
Style/CaseLikeIfwhen using==with literal and using ternary operator. (@koic) - #12668: Fix an incorrect autocorrect for
Lint/EmptyConditionalBodywhen missingifbody with conditionalelsebody. (@koic) - #12683: Fix an incorrect autocorrect for
Style/MapCompactWithConditionalBlockwhen using guard clause withnextimplicitly nil. (@koic) - #12693: Fix an incorrect autocorrect for
Style/ObjectThenwhen usingyield_selfwithout receiver. (@koic) - #12646: Fix
--auto-gen-configbug forLayout/SpaceBeforeBlockBraces. (@jonas054) - #12717: Fix regexp for inline disable comments in
Style/CommentedKeyword. (@jonas054) - #12695: Fix bug in
Includefrom inherited file in a parent directory. (@jonas054) - #12656: Fix an error for
Layout/RedundantLineBreakwhen using index access call chained on multiline hash literal. (@koic) - #12691: Fix an error for
Style/MultilineTernaryOperatorwhen nesting multiline ternary operators. (@koic) - #12707: Fix false negative for
Style/RedundantAssignmentwhen using pattern matching. (@koic) - #12674: Fix false negatives for
Style/RedundantReturnwhen using pattern matching. (@koic) - #12673: Fix false negatives for
Lint/RedundantSafeNavigationwhen using safe navigation operator for literal receiver. (@koic) - #12719: Fix false negatives for
Style/ArgumentsForwardingwhen using forwardable block arguments with Ruby 3.2+. (@koic) - #12687: Fix a false positive for
Lint/Voidwheneachblock with conditional expressions that has multiple statements. (@koic) - #12649: Fix false positives for
Style/InverseMethodswhen using relational comparison operator with safe navigation. (@koic) - #12711: Handle implicit receivers in
Style/InvertibleUnlessCondition. (@sambostock) - #12648: Fix numblock regressions in
omit_parenthesesStyle/MethodCallWithArgsParentheses. (@gsamokovarov)
Changes
- #12641: Make error message clearer when the namespace is incorrect. (@maruth-stripe)
- #12637: Mark
Style/RaiseArgsas unsafe. (@r7kamura) - #12645: Change source order for target ruby to check gemspec after RuboCop configuration. (@jenshenny)
- Ruby
Published by bbatsov about 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.60.2
Bug fixes
- #12627: Fix a false positive for
Layout/RedundantLineBreakwhen using index access call chained on multiple lines with backslash. (@koic) - #12626: Fix a false positive for
Style/ArgumentsForwardingwhen naming a block argument&. (@koic) - #12635: Fix a false positive for
Style/HashEachMethodswhen both arguments are unused. (@earlopain) - #12636: Fix an error for
Style/HashEachMethodswhen a block with both parameters has no body. (@earlopain) - #12638: Fix an
Errno::ENOENTerror when using server mode. (@koic) - #12628: Fix a false positive for
Style/ArgumentsForwardingwhen using block arg forwarding with positional arguments forwarding to within block. (@koic) - #12642: Fix false positives for
Style/HashEachMethodswhen using array converter method. (@koic) - #12632: Fix an infinite loop error when
EnforcedStyle: explicitofNaming/BlockForwardingwithStyle/ArgumentsForwarding. (@koic)
- Ruby
Published by bbatsov about 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.60.1
Bug fixes
- #12625: Fix an error when server cache dir has read-only file system. (@Strzesia)
- #12618: Fix false positives for
Style/ArgumentsForwardingwhen using block argument forwarding with other arguments. (@koic) - #12614: Fix false positiveis for
Style/RedundantParentheseswhen parentheses in control flow keyword with multiline style argument. (@koic)
Changes
- Ruby
Published by bbatsov about 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.60
Bug fixes
- #12603: Fix an infinite loop error for
Style/MultilineTernaryOperatorwhen using a method call as a ternary operator condition with a line break between receiver and method. (@koic) - #12549: Fix a false positive for
Style/RedundantLineContinuationwhen line continuations for multiline leading dot method chain with a blank line. (@koic) - #12610: Accept parentheses in argument calls with blocks for
Style/MethodCallWithArgsParenthesesomit_parenthesesstyle. (@gsamokovarov) - #12580: Fix an infinite loop error for
Layout/EndAlignmentwhen misaligned in singleton class assignments withEnforcedStyleAlignWith: variable. (@koic) - #12548: Fix an infinite loop error for
Layout/FirstArgumentIndentationwhen specifyingEnforcedStyle: with_fixed_indentationofLayout/ArrayAlignment. (@koic) - #12236: Fix an error for
Lint/ShadowedArgumentwhen self assigning to a block argument infor. (@koic) - #12569: Fix an error for
Style/IdenticalConditionalBrancheswhen usingif...elsewith identical leading lines that assign toself.foo. (@koic) - #12437: Fix an infinite loop error for
EnforcedStyle: omit_parenthesesofStyle/MethodCallWithArgsParentheseswithStyle/SuperWithArgsParentheses. (@koic) - #12558: Fix an incorrect autocorrect for
Style/MapToHashwhen usingmap.to_hwithout receiver. (@koic) - #12179: Let
--auto-gen-configgenerateExcludewhenMaxis overridden. (@jonas054) - #12574: Fix bug for unrecognized style in --auto-gen-config. (@jonas054)
- #12542: Fix false positive for
Lint/MixedRegexpCaptureTypeswhen using look-ahead matcher. (@marocchino) - #12607: Fix a false positive for
Style/RedundantParentheseswhen regexp literal attempts to match against a parenthesized condition. (@koic) - #12539: Fix false positives for
Lint/LiteralAssignmentInConditionwhen a collection literal contains non-literal elements. (@koic) - #12571: Fix false positives for
Naming/BlockForwardingwhen using explicit block forwarding in block method. (@koic) - #12537: Fix false positives for
Style/RedundantParentheseswhenAllowInMultilineConditions: trueofStyle/ParenthesesAroundCondition. (@koic) - #12578: Fix false positives for
Style/ArgumentsForwardingwhen rest arguments forwarding to a method in block. (@koic) - #12540: Fix false positives for
Style/HashEachMethodswhen rest block argument ofEnumerable#eachmethod is used. (@koic) - #12529: Fix false positives for
Style/ParenthesesAroundCondition. (@koic) - #12556: Fix false positives for
Style/RedundantParentheseswhen parentheses are used around a semantic operator in expressions within assignments. (@koic) - #12541: Fix false negative in
Style/ArgumentsForwardingwhen a block is forwarded but other args aren't. (@dvandersluis) - #12581: Handle trailing line continuation in
Layout/LineContinuationLeadingSpace. (@eugeneius) - #12601: Make
Style/EachForSimpleLoopaccept block with no parameters. (@koic)
Changes
- #12535: Allow --autocorrect with --display-only-fail-level-offenses. (@naveg)
- #12572: Follow a Ruby 3.3 warning for
Security/Openwhenopenwith a literal string starting with a pipe. (@koic) - #12453: Make
Style/RedundantEachaware of safe navigation operator. (@koic) - #12233: Make
Style/SlicingWithRangeaware of redundant and beginless range. (@koic) - #12388: Reject additional 'expanded'
EnforcedStyleoptions when--no-auto-gen-enforced-styleis given. (@kpost) - #12593: Require Parser 3.3.0.2 or higher. (@koic)
- Ruby
Published by bbatsov about 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.59
New features
Bug fixes
- #12434: Fix a false positive for
Lint/LiteralAssignmentInConditionwhen using interpolated string or xstring literals. (@koic) - #12435: Fix a false positive for
Lint/SelfAssignmentwhen using attribute assignment with method call with arguments. (@koic) - #12444: Fix false positive for
Style/HashEachMethodswhen receiver literal is not a hash literal. (@koic) - #12524: Fix a false positive for
Style/MethodCallWithArgsParentheseswhenEnforcedStyle: omit_parenthesesand parens inwhenclause is used to pass an argument. (@koic) - #12505: Fix a false positive for
Style/RedundantParentheseswhen using parenthesizedlambdaorprocwithdo...endblock. (@koic) - #12442: Fix an incorrect autocorrect for
Style/CombinableLoopswhen looping over the same data as previous loop indo...endand{...}blocks. (@koic) - #12432: Fix a false positive for
Lint/LiteralAssignmentInConditionwhen using parallel assignment with splat operator in block of guard condition. (@koic) - #12441: Fix false positives for
Style/HashEachMethodswhen using destructed block arguments. (@koic) - #12436: Fix false positives for
Style/RedundantParentheseswhen a part of range is a parenthesized condition. (@koic) - #12429: Fix incorrect autocorrect for
Style/MapToHashwhen using dot method calls forto_h. (@koic) - #12488: Make
Lint/HashCompareByIdentityaware of safe navigation operator. (@koic) - #12489: Make
Lint/NextWithoutAccumulatoraware of safe navigation operator. (@koic) - #12490: Make
Lint/NumberConversionaware of safe navigation operator. (@koic) - #12491: Make
Lint/RedundantWithIndexaware of safe navigation operator. (@koic) - #12492: Make
Lint/RedundantWithObjectaware of safe navigation operator. (@koic) - #12493: Make
Lint/UnmodifiedReduceAccumulatoraware of safe navigation operator. (@koic) - #12473: Make
Style/ClassCheckaware of safe navigation operator. (@koic) - #12445: Make
Style/CollectionCompactaware of safe navigation operator. (@koic) - #12474: Make
Style/ConcatArrayLiteralsaware of safe navigation operator. (@koic) - #12476: Make
Style/DateTimeaware of safe navigation operator. (@koic) - #12479: Make
Style/EachWithObjectaware of safe navigation operator. (@koic) - #12446: Make
Style/HashExceptaware of safe navigation operator. (@koic) - #12447: Make
Style/MapCompactWithConditionalBlockaware of safe navigation operator. (@koic) - #12484: Make
Style/Nextaware of safe navigation operator. (@koic) - #12486: Make
Style/RedundantArgumentaware of safe navigation operator. (@koic) - #12454: Make
Style/RedundantFetchBlockaware of safe navigation operator. (@koic) - #12495: Make
Layout/RedundantLineBreakaware of safe navigation operator. (@koic) - #12455: Make
Style/RedundantSortByaware of safe navigation operator. (@koic) - #12456: Make
Style/RedundantSortByaware of safe navigation operator. (@koic) - #12480: Make
Style/ExactRegexpMatchaware of safe navigation operator. (@koic) - #12457: Make
Style/Sampleaware of safe navigation operator. (@koic) - #12458: Make
Style/SelectByRegexpcops aware of safe navigation operator. (@koic) - #12494: Make
Layout/SingleLineBlockChainaware of safe navigation operator. (@koic) - #12461: Make
Style/StringCharsaware of safe navigation operator. (@koic) - #12468: Make
Style/Stripaware of safe navigation operator. (@koic) - #12469: Make
Style/UnpackFirstaware of safe navigation operator. (@koic)
Changes
- #12522: Make
Style/MethodCallWithoutArgsParenthesesallow the parenthesizeditmethod in a block. (@koic) - #12523: Make
Style/RedundantSelfallow theself.itmethod in a block. (@koic)
- Ruby
Published by bbatsov about 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.58
New features
- #12420: Add new
Lint/LiteralAssignmentInConditioncop. (@koic) - #12353: Add new
Style/SuperWithArgsParenthesescop. (@koic) - #12406: Add new
Style/ArrayFirstLastcop. (@fatkodima)
Bug fixes
- #12372: Fix a false negative for
Lint/Debuggerwhen used within method arguments abegin...endblock. (@koic) - #12378: Fix a false negative for
Style/Semicolonwhen a semicolon at the beginning of a lambda block. (@koic) - #12146: Fix a false positive for
Lint/FloatComparisonwhen comparing against zero. (@earlopain) - #12404: Fix a false positive for
Layout/RescueEnsureAlignmentwhen alignedrescueindo-endnumbered block in a method. (@koic) - #12374: Fix a false positive for
Layout/SpaceBeforeSemicolonwhen a space between an opening lambda brace and a semicolon. (@koic) - #12326: Fix an error for
Style/RedundantDoubleSplatHashBraceswhen method call for parenthesized no hash double double splat. (@koic) - #12361: Fix an incorrect autocorrect for
Naming/BlockForwardingandStyle/ArgumentsForwardingwhen autocorrection conflicts for anonymous arguments. (@koic) - #12324: Fix an error for
Layout/RescueEnsureAlignmentwhen usingrescueindo...endblock assigned to object attribute. (@koic) - #12322: Fix an error for
Style/CombinableLoopswhen looping over the same data for the third consecutive time or more. (@koic) - #12366: Fix a false negative for
Layout/ExtraSpacingwhen a file has exactly two comments. (@eugeneius) - #12373: Fix a false negative for
Lint/SymbolConversionwhen using string interpolation. (@earlopain) - #12402: Fix false negatives for
Style/RedundantLineContinuationwhen redundant line continuations for a block are used, especially without parentheses around first argument. (@koic) - #12311: Fix false negatives for
Style/RedundantParentheseswhen parentheses around logical operator keywords in method definition. (@koic) - #12394: Fix false negatives for
Style/RedundantReturnwhenlambda(->) ending withreturn. (@koic) - #12377: Fix false positives for
Lint/Voidwhen a collection literal that includes non-literal elements in a method definition. (@koic) - #12407: Fix an incorrect autocorrect for
Style/MapToHashwithLayout/SingleLineBlockChain. (@koic) - #12409: Fix an incorrect autocorrect for
Lint/SafeNavigationChainwhen ordinary method chain exists after safe navigation leading dot method call. (@koic) - #12363: Fix incorrect rendering of HTML character entities in
HTMLFormatterformatter. (@koic) - #12424: Make
Style/HashEachMethodsaware of safe navigation operator. (@koic) - #12413: Make
Style/InverseMethodsaware of safe navigation operator. (@koic) - #12408: Make
Style/MapToHashaware of safe navigation operator. (@koic)
Changes
- #12328: Make
Style/AutoResourceCleanupaware ofTempfile.open. (@koic) - #12412: Enhance
Lint/RedundantSafeNavigationto handle conversion methods with defaults. (@fatkodima) - #12410: Enhance
Lint/SelfAssignmentto check attribute assignment and key assignment. (@fatkodima) - #12370: Make
Style/HashEachMethodsaware of unused block value. (@koic) - #12380: Make
Style/RedundantParenthesesaware of lambda or proc. (@koic) - #12421: Make
Style/SelfAssignmentaware of%,^,<<, and>>operators. (@koic) - #12305: Require
rubocop-astversion 1.30 or greater. (@sambostock) - #12337: Supports
EnforcedStyleForRationalLiteralsoption forLayout/SpaceAroundOperators. (@koic) - #12296: Support
RedundantRestArgumentNames,RedundantKeywordRestArgumentNames, andRedundantBlockArgumentNamesoptions forStyle/ArgumentsForwarding. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.57.2
Bug fixes
- #12274: Fix a false positive for
Lint/Voidwheneach's receiver is an object ofEnumeratorto whichfilterhas been applied. (@koic) - #12291: Fix a false positive for
Metrics/ClassLengthwhen a class with a singleton class definition. (@koic) - #12293: Fix a false positive for
Style/RedundantDoubleSplatHashBraceswhen using double splat hash braces withmergeand method chain. (@koic) - #12298: Fix a false positive for
Style/RedundantParentheseswhen using a parenthesized hash literal as the first argument in a method call without parentheses. (@koic) - #12283: Fix an error for
Style/SingleLineDoEndBlockwhen using single linedo...endwith no body. (@koic) - #12312: Fix an incorrect autocorrect for
Style/HashSyntaxwhen braced hash key and value are the same and it is used inif...else. (@koic) - #12307: Fix an infinite loop error for
Layout/EndAlignmentwhenEnforcedStyleAlignWith: variableand using a conditional statement in a method argument on the same line andendwith method call is not aligned. (@koic) - #11652: Make
--auto-gen-configgenerateinherit_fromcorrectly inside ERBif. (@jonas054) - #12310: Drop
base64gem from runtime dependency. (@koic) - #12300: Fix an error for
Style/IdenticalConditionalBrancheswhenif...elsewith identical leading lines and using index assign. (@koic) - #12286: Fix false positives for
Style/RedundantDoubleSplatHashBraceswhen using double splat with a hash literal enclosed in parenthesized ternary operator. (@koic) - #12279: Fix false positives for
Lint/EmptyConditionalBodywhen missing 2ndifbody with a comment. (@koic) - #12275: Fix a false positive for
Style/RedundantDoubleSplatHashBraceswhen using double splat within block argument containing a hash literal in an array literal. (@koic) - #12284: Fix false positives for
Style/SingleArgumentDigwhen using some anonymous argument syntax. (@koic) - #12301: Make
Style/RedundantFilterChainaware of safe navigation operator. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.57.1
Bug fixes
- #12271: Fix a false positive for
Lint/RedundantSafeNavigationwhen using snake case constant receiver. (@koic) - #12265: Fix an error for
Layout/MultilineMethodCallIndentationwhen usingarithmetic operation with block inside a grouped expression. (@koic) - #12177: Fix an incorrect autocorrect for
Style/RedundantException. (@ydah) - #12261: Fix an infinite loop for
Layout/MultilineMethodCallIndentationwhen multiline method chain with a block argument and method chain. (@ydah) - #12263: Fix false positives for
Style/RedundantDoubleSplatHashBraceswhen method call for no hash braced double splat receiver. (@koic) - #12262: Fix an incorrect autocorrect for
Style/RedundantDoubleSplatHashBraceswhen using double splat hash braces withmergemethod call twice. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.57
New features
- #12227: Add new
Style/SingleLineDoEndBlockcop. (@koic) - #12246: Make
Lint/RedundantSafeNavigationaware of constant receiver. (@koic) - #12257: Make
Style/RedundantDoubleSplatHashBracesaware ofmergemethods. (@koic)
Bug fixes
- #12244: Fix a false negative for
Lint/Debuggerwhen using debugger method inside block. (@koic) - #12231: Fix a false negative for
Metrics/ModuleLengthwhen defining a singleton class in a module. (@koic) - #12249: Fix a false positive
Style/IdenticalConditionalBrancheswhenif..elsewith identical leading lines and assign to condition value. (@koic) - #12253: Fix
Lint/LiteralInInterpolationto accept an empty string literal interpolated in words literal. (@knu) - #12198: Fix an error for flip-flop with beginless or endless ranges. (@koic)
- #12259: Fix an error for
Lint/MixedCaseRangewhen using nested character class in regexp. (@koic) - #12237: Fix an error for
Style/NestedTernaryOperatorwhen a ternary operator has a nested ternary operator within anif. (@koic) - #12228: Fix false negatives for
Style/MultilineBlockChainwhen using multiline block chain with safe navigation operator. (@koic) - #12247: Fix false negatives for
Style/RedundantParentheseswhen using logical or comparison expressions with redundant parentheses. (@koic) - #12226: Fix false positives for
Layout/MultilineMethodCallIndentationwhen aligning methods in multiline block chain. (@koic) - #12076: Fixed an issue where the top-level cache folder was named differently during two consecutive rubocop runs. (@K-S-A)
Changes
- #12235: Enable auto parallel inspection when config file is specified. (@aboutNisblee)
- #12234: Enhance
Style/FormatString's autocorrection when using known conversion methods whose return value is not an array. (@koic) - #12128: Make
Style/GuardClauseaware ofdefine_method. (@koic) - #12126: Make
Style/RedundantFilterChainaware ofselect.present?whenActiveSupportExtensionsEnabledconfig istrue. (@koic) - #12250: Mark
Lint/RedundantRequireStatementas unsafe autocorrect. (@koic) - #12097: Mark unsafe autocorrect for
Style/ClassEqualityComparison. (@koic) - #12210: Mark
Style/RedundantFilterChainas unsafe autocorrect. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.56.4
Bug fixes
- #12221: Fix a false positive for
Layout/EmptyLineAfterGuardClausewhen usingreturnbefore guard condition with heredoc. (@koic) - #12213: Fix a false positive for
Lint/OrderedMagicCommentswhen comment text# encoding: ISO-8859-1is embedded within example code as source code comment. (@koic) - #12205: Fix an error for
Style/OperatorMethodCallwhen usingfoo bar./ baz. (@koic) - #12208: Fix an incorrect autocorrect for the
--disable-uncorrectablecommand line option when registering an offense is outside a percent array. (@koic) - #12203: Fix an incorrect autocorrect for
Lint/SafeNavigationChainwhen using safe navigation with comparison operator as an expression of logical operator or comparison operator's operand. (@koic) - #12206: Fix an incorrect autocorrect for
Style/OperatorMethodCallwhen usingfoo./bar. (@koic) - #12202: Fix an incorrect autocorrect for
Style/RedundantConditionalwhen unless/else with boolean results. (@ydah) - #12199: Fix false negatives for
Layout/MultilineMethodCallIndentationwhen using safe navigation operator. (@koic)
Changes
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.56.2
Bug fixes
- #12138: Fix a false positive for
Layout/LineContinuationLeadingSpacewhen a backslash is part of a multiline string literal. (@ymap) - #12155: Fix false positive for
Layout/RedundantLineBreakwhen using a modified singleton method definition. (@koic) - #12143: Fix a false positive for
Lint/ToEnumArgumentswhen using anonymous keyword arguments forwarding. (@koic) - #12148: Fix an incorrect autocorrect for
Lint/NonAtomicFileOperationwhen usingFileUtils.remove_dir,FileUtils.remove_entry, orFileUtils.remove_entry_secure. (@koic) - #12141: Fix false positive for
Style/ArgumentsForwardingwhen method def includes additional kwargs. (@owst) - #12154: Fix incorrect
diagnosticProvidervalue of LSP. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.56.3
Bug fixes
- #12151: Make
Layout/EmptyLineAfterGuardClauseallow:nocov:directive after guard clause. (@koic) - #12195: Fix a false negative for
Layout/SpaceAfterNotwhen a newline is present after!. (@ymap) - #12192: Fix a false positive for
Layout/RedundantLineBreakwhen using quoted symbols with a single newline. (@ymap) - #12190: Fix a false positive for
Layout/SpaceAroundOperatorswhen aligning operators vertically. (@koic) - #12171: Fix a false positive for
Style/ArrayIntersectwhen using block argument forEnumerable#any?. (@koic) - #12172: Fix a false positive for
Style/EmptyCaseConditionwhen usingreturn,break,nextor method call before empty case condition. (@koic) - #12162: Fix an error for
Bundler/DuplicatedGroupwhen there's a duplicate set of groups and thegroupvalue contains a splat. (@koic) - #12182: Fix an error for
Lint/UselessAssignmentwhen variables are assigned using chained assignment and remain unreferenced. (@koic) - #12181: Fix an incorrect autocorrect for
Lint/UselessAssignmentwhen variables are assigned with sequential assignment using the comma operator and unreferenced. (@koic) - #12187: Fix an incorrect autocorrect for
Style/SoleNestedConditionalwhen comment is in an empty nestedifbody. (@ymap) - #12183: Fix an incorrect autocorrect for
Style/MultilineTernaryOperatorwhen returning a multiline ternary operator expression with safe navigation method call. (@koic) - #12168: Fix bug in
Style/ArgumentsForwardingwhen there are repeated send nodes. (@owst) - #12185: Set target version for
Layout/HeredocIndentation. (@tagliala)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.56.1
Bug fixes
- #12136: Fix a false negative for
Layout/LeadingCommentSpacewhen using#+or#-as they are not RDoc comments. (@koic) - #12113: Fix a false positive for
Bundler/DuplicatedGroupwhen groups are duplicated butsource,git,platforms, orpathvalues are different. (@koic) - #12134: Fix a false positive for
Style/MethodCallWithArgsParentheseswhen parentheses are used in one-lineinpattern matching. (@koic) - #12111: Fix an error for
Bundler/DuplicatedGroupgroup declaration has keyword option. (@koic) - #12109: Fix an error for
Style/ArgumentsForwardingcop when forwarding kwargs/block arg and an additional arg. (@ydah) - #12117: Fix a false positive for
Style/ArgumentsForwardingcop when not always forwarding block. (@owst) - #12115: Fix an error for
Style/Lambdawhen using numbered parameter with a multiline->call. (@koic) - #12124: Fix false positives for
Style/RedundantParentheseswhen parentheses insuperoryieldcall with multiline style argument. (@koic) - #12120: Fix false positives for
Style/SymbolArraywhen%iarray containing unescaped[,],(, or). (@koic) - #12133: Fix
Style/RedundantSelfAssignmentBranchto handle heredocs. (@r7kamura) - #12105: Fix target ruby
Gem::Requirementmatcher and version parsing to support multiple version constraints. (@ItsEcholot)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.56
New features
- #12074: Add new
Bundler/DuplicatedGroupcop. (@OwlKing) - #12078: Make LSP server support
rubocop.formatAutocorrectsAllexecute command. (@koic)
Bug fixes
- #12106: Fix a false negative for
Style/RedundantReturnwhen returning value with guard clause andreturnis used. (@koic) - #12095: Fix a false positive for
Style/AliaswhenEncforcedStyle: prefer_aliasand usingaliaswith interpolated symbol argument. (@koic) - #12098: Fix a false positive for
Style/ClassEqualityComparisonwhen comparing interpolated string class name for equality. (@koic) - #12102: Fix an error for
Style/LambdaCallwhen using nested lambda callx.().(). (@koic) - #12099: Fix an incorrect autocorrect for
Style/AliaswhenEncforcedStyle: prefer_alias_methodand usingaliaswith interpolated symbol argument. (@koic) - #12085: Fix an error for
Lint/SuppressedExceptionwhenAllowNil: trueis set and endless method definition is used. (@koic) - #12087: Fix false positives for
Style/ArgumentsForwardingwith additional args/kwargs in def/send nodes. (@owst) - #12071: Fix
Style/SymbolArrayfalse positives when using square brackets or interpolation in a symbol literal in a percent style array. (@jasondoc3) - #12061: Support regex in StringLiteralsInInterpolation. (@jonas054)
- #12091: With
--fail-level Aignore non-correctable offenses at :info severity. (@naveg)
Changes
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.55.1
Bug fixes
- #12068: Fix a false positive for
Style/ReturnNilInPredicateMethodDefinitionwhen the last method argument in method definition isnil. (@koic) - #12082: Fix an error for
Lint/UselessAssignmentwhen a variable is assigned and unreferenced inforwith multiple variables. (@koic) - #12079: Fix an error for
Style/MixinGroupingwhen mixin method has no arguments. (@koic) - #11637: Correct Rubocop for
private_class_methodmethod documentation. (@bigzed) - #12070: Fix false positive in
Style/ArgumentsForwardingwhen receiver forwards args/kwargs. (@owst)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.55
New features
- #11794: Add support to
Style/ArgumentsForwardingfor anonymous arg/kwarg forwarding in Ruby 3.2. (@owst) - #12044: Make LSP server support
layoutModeoption to run layout cops. (@koic) - #12056: Make LSP server support
lintModeoption to run lint cops. (@koic) - #12046: Make
ReturnNilInPredicateMethodDefinitionaware ofnilat the end of predicate method definition. (@koic)
Bug fixes
- #12055: Allow parentheses in single-line match patterns when using the
omit_parenthesesstyle ofStyle/MethodCallWithArgsParentheses. (@gsamokovarov) - #12050: Fix a false positive for
Layout/RedundantLineBreakwhen inspecting the%form string%\n\n. (@koic) - #12063: Fix
Style/CombinableLoopswhen one of the loops is empty. (@fatkodima) - #12059: Fix a false negative for
Style/StringLiteralsInInterpolationfor symbols with interpolation. (@fatkodima) - #11834: Fix false positive for when variable in inside conditional branch in nested node. (@alexeyschepin)
- #11802: Improve handling of
[]and()with percent symbol arrays. (@jasondoc3) - #12052: Fix "Subfolders can't include glob special characters". (@meric426, @loveo)
- #12062: Fix
LoadErrorwhen loading RuboCop from a symlinked location on Windows. (@p0deje)
Changes
- #12064: Make
Style/RedundantArgumentaware ofexitandexit!. (@koic) - #12015: Mark
Style/HashConversionas unsafe autocorrection. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.54.2
Bug fixes
- #12043: Fix a false negative for
Layout/ExtraSpacingwhen some characters are vertically aligned. (@koic) - #12040: Fix a false positive for
Layout/TrailingEmptyLinesto prevent the following incorrect autocorrection when inspecting the%form string%\n\n. (@koic) - #1867: Fix an error when
AllCops:Excludeis empty in .rubocop.yml. (@koic) - #12034: Fix invalid byte sequence in UTF-8 error when using an invalid encoding string. (@koic)
- #12038: Output the "server restarting" message to stderr. (@knu)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.54.1
Bug fixes
- #12024: Fix a false positive for
Lint/RedundantRegexpQuantifierswhen interpolation is used in a regexp literal. (@koic) - #12020: This PR fixes an infinite loop error for
Layout/SpaceAfterCommawithLayout/SpaceBeforeSemicolonwhen autocorrection conflicts. (@koic) - #12014: Fix an error for
Lint/UselessAssignmentwhen part of a multiple assignment is enclosed in parentheses. (@koic) - #12011: Fix an error for
Metrics/MethodLengthwhen using a heredoc in a block without block arguments. (@koic) - #12010: Fix false negatives for
Style/RedundantRegexpArgumentwhen using safe navigation operator. (@koic)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.54
New features
Bug fixes
- #12005: Fix a false negative for
Lint/Debuggerwhen using debugger method inside lambda. (@koic) - #11986: Fix a false positive for
Lint/MixedCaseRangewhen the number of characters at the start or end of range is other than 1. (@koic) - #11992: Fix an unexpected
NoMethodErrorfor built-in language server when an internal error occurs. (@koic) - #11994: Fix an error for
Layout/LineEndStringConcatenationIndentationwhen inspecting the%from string%\n\n. (@koic) - #12007: Fix an error for
Layout/SpaceAroundOperatorswhen using unary operator with double colon. (@koic) - #11996: Fix an error for
Style/IfWithSemicolonwhen without branch bodies. (@koic) - #12009: Fix an error for
Style/YodaConditionwhen equality check method is used without the first argument. (@koic) - #11998: Fix an error when inspecting blank heredoc delimiter. (@koic)
- #11989: Fix an incorrect autocorrect for
Style/RedundantRegexpArgumentwhen using unicode chars. (@koic) - #12001: Fix code length calculator for method calls with heredoc. (@fatkodima)
- #12002: Fix
Lint/Voidcop for__ENCODING__constant. (@fatkodima)
Changes
- #11983: Add Ridgepole files to default
Includelist. (@ydah) - #11738: Enhances empty_line_between_defs to treat configured macros like defs. (@catwomey)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.53.1
Bug fixes
- #11974: Fix an error for
Style/RedundantCurrentDirectoryInPathwhen using string interpolation inrequire_relative. (@koic) - #11981: Fix an incorrect autocorrect for
Style/RedundantRegexpArgumentwhen using double quote and single quote characters. (@koic) - #11836: Should not offense single-quoted symbol containing double quotes in
Lint/SymbolConversion. (@KessaPassa)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.53
New features
- #11561: Add new
Lint/MixedCaseRangecop. (@rwstauner) - #11565: Add new
Lint/RedundantRegexpQuantifierscop. (@jaynetics) - #11925: Add new
Style/RedundantCurrentDirectoryInPathcop. (@koic) - #11595: Add new
Style/RedundantRegexpArgumentcop. (@koic) - #11967: Add new
Style/ReturnNilInPredicateMethodDefinitioncop. (@koic) - #11745: Add new
Style/YAMLFileReadcop. (@koic) - #11926: Support built-in LSP server. (@koic)
Bug fixes
- #11953: Fix a false negative for
Lint/DuplicateHashKeywhen there is a duplicated constant key in the hash literal. (@koic) - #11945: Fix a false negative for
Style/RedundantSelfAssignmentBranchwhen using method chaining or arguments in ternary branch. (@koic) - #11949: Fix a false positive for
Layout/RedundantLineBreakwhen using a line broken string. (@koic) - #11931: Fix a false positive for
Lint/RedundantRequireStatementwhen usingPP.pp. (@koic) - #11946: Fix an error for
Lint/NumberConversionwhen using multiple number conversion methods. (@koic) - #11972: Fix an error for
Lint/VoidwhenCheckForMethodsWithNoSideEffects: trueand using a method definition. (@koic) - #11958: Fix error for
Style/IdenticalConditionalBrancheswhen using empty parentheses in theifbranch. (@koic) - #11962: Fix an error for
Style/RedundantStringEscapewhen an escaped double quote precedes interpolation in a symbol literal. (@koic) - #11947: Fix an error for
Style/ConditionalAssignmentwith an assignment that usesifbranch bodies, which include a block. (@koic) - #11959: Fix false negatives for
Layout/EmptyLinesAroundExceptionHandlingKeywordswhen using Ruby 2.5'srescueinside block and Ruby 2.7's numbered block. (@koic) - #10902: Fix an error for
Style/RedundantRegexpEscapestring with invalid byte sequence in UTF-8. (@ydah) - #11562: Fixed escaped octal handling and detection in
Lint/DuplicateRegexpCharacterClassElement. (@rwstauner)
Changes
- #11904: Mark
Layout/ClassStructureas unsafe to autocorrect. (@nevans) - #8506: Add
AllowedParentClassesconfig toLint/MissingSuper. (@iMacTia)
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.52.1
Bug fixes
- #11944: Fix an incorrect autocorrect for
Style/SoleNestedConditionalwithStyle/MethodCallWithArgsParentheses. (@koic) - #11930: Fix exception on
Lint/InheritExceptionwhen class definition has non-constant siblings. (@rafaelfranca) - #11919: Fix an error for
Lint/UselessAssignmentwhen a variable is assigned and unreferenced infor. (@koic) - #11928: Fix an incorrect autocorrect for
Lint/AmbiguousBlockAssociation. (@koic) - #11915: Fix a false positive for
Lint/RedundantSafeNavigationwhen&.is used forto_s,to_i,to_d, and other coercion methods. (@lucthev)
Changes
- Ruby
Published by bbatsov over 2 years ago
https://github.com/rubocop/rubocop - RuboCop 1.52
New features
- #11873: Add
ComparisonsThresholdconfig option toStyle/MultipleComparison. (@fatkodima) - #11886: Add new
Style/RedundantArrayConstructorcop. (@koic) - #11873: Add new
Style/RedundantRegexpConstructorcop. (@koic) - #11841: Add new
Style/RedundantFilterChaincop. (@fatkodima) - #11908: Support
AllowedReceiversforStyle/CollectionMethods. (@koic)
Bug fixes
- #11890: Fix a false negative for
Lint/RedundantSafeNavigationwhen&.is used forto_d. (@koic) - #11880: Fix a false positive for
Style/ExactRegexpMatchwhen using literal with quantifier in regexp. (@koic) - #11902: Fix a false positive for
Style/RequireOrderwhen single-quoted string and double-quoted string are mixed. (@koic) - #11879: Fix a false positive for
Style/SelectByRegexpwhen Ruby 2.2 or lower analysis. (@koic) - #11891: Fix
Style/AccessorGroupingto accept macros separated from accessors by space. (@fatkodima) - #11905: Fix an error for
Lint/UselessAssignmentwhen a variable is assigned with rest assignment and unreferenced. (@koic) - #11899: Fix an incorrect autocorrect for
Style/SingleLineMethodswhen using Ruby 3.0 andStyle/EndlessMethodis disabled. (@koic) - #11884: Make
rubocop -Vdisplay rubocop-factory_bot version when using it. (@koic) - #11893: Fix a false positive for
Lint/InheritExceptionwhen inheritingExceptionwith omitted namespace. (@koic) - #11898: Fix offences in calls inside blocks with braces for
Style/MethodCallWithArgsParentheseswithomit_parenthesesenforced style. (@gsamokovarov) - #11857: Server mode: only read $stdin when -s or --stdin argument provided. (@naveg)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.51 (The RubyKaigi 2023 Edition)
New features
- #11819: Add autocorrection for
Lint/AmbiguousBlockAssociation. (@r7kamura) - #11597: Add autocorrection for
Lint/UselessAssignment. (@r7kamura) - #11848: Add autocorrection for
Lint/Void. (@r7kamura) - #11851: Add autocorrection for
Naming/MemoizedInstanceVariableName. (@r7kamura) - #11856: Add autocorrection for
Style/CombinableLoops. (@r7kamura) - #11824: Add autocorrection for
Lint/TopLevelReturnWithArgument. (@r7kamura) - #11869: Add new
Style/ExactRegexpMatchcop. (@koic) - #11814: Make
Style/CollectionCompactaware ofdelete_if. (@koic) - #11866: Make
Style/Semicolonaware of redundant semicolons in string interpolation braces. (@koic)
Bug fixes
- #11812: Fix a false negative for
Style/Attrwhen usingattrand method definitions. (@koic) - #11861: Fix a false positive for
Layout/SpaceAfterSemicolonwhen no space between a semicolon and a closing brace of string interpolation. (@koic) - #11830: Fix a false positive for
Lint/IncompatibleIoSelectWithFiberScheduler. (@koic) - #11846: Fix a false positive for
Lint/RedundantStringCoercionwhen usingto_s(argument)inputsargument. (@koic) - #11865: Fix an error for
Naming/ConstantNamewhen assigning a constant from an empty branch ofelse. (@koic) - #11844: Fix a false positive for
Style/RedundantLineContinuationwhen using line concatenation for assigning a return value and without argument parentheses. (@koic) - #11808: Fix a false positive for
Style/RegexpLiteralwhen using a regexp starts with equal as a method argument. (@koic) - #11822: Fix an error for
Layout/SpaceInsideBlockBraceswhen a method call with a multiline block is used as an argument. (@koic) - #11849: Fix an error for
Style/ConditionalAssignmentwhenEnforcedStyle: assign_inside_conditionand using emptycasecondition. (@koic) - #11967: Fix error for
Style/IfInsideElsewhen a deep nested multilineif...then...elsif...else...end. (@koic) - #11842: Fix an error for
Style/IfUnlessModifierwhen using multipleifmodifier in the long one line. (@koic) - #11835: Fix an error for
Style/RequireOrderwhen multiplerequireare not sorted. (@koic) - #11809: Fix an incorrect autocorrect for
Naming/RescuedExceptionsVariableNamewhen exception variable is referenced afterrescuestatement. (@koic) - #11852: Fix an incorrect autocorrect for
Style/EvalWithLocationwhen usingevalwithout line number and with parenthesized method call. (@koic) - #11862: Fix an incorrect autocorrect for
Style/GuardClausewhen usingraiseinelsebranch in a one-liner withthen. (@koic) - #11868: Fix a false positive for
Style/HashExceptwhen method's receiver/argument is not the same as block key argument. (@fatkodima) - #11858: Fix false positives when using source comments in blocks. (@reitermarkus)
- #11510: Fix
Lint/UselessAssignmentfalse positive when using numbered block parameters. (@sambostock) - #11872: Fix
Gemspec/DevelopmentDependenciesnot trigger when add_development_dependency has more then one arguments. (@Bhacaz) - #11820: Fix
Lint/EmptyConditionalBodyfalse-positives for commented emptyelsifbody. (@r7kamura)
Changes
- #11859: Add rubocop-factory_bot to suggested extensions. (@ydah)
- #11791: (Breaking) Drop runtime support for Ruby 2.6 and JRuby 9.3 (CRuby 2.6 compatible). (@koic)
- #11826: Exclude
**/*.jbfromLint/TopLevelReturnWithArgument. (@r7kamura) - #11871: Mark
Style/DataInheritanceas unsafe autocorrect,Style/OpenStructUseas unsafe, andSecurity/CompoundHashas unsafe. (@koic)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.50.2
Bug fixes
- #11799: Fix a false positive for
Style/CollectionCompactwhen usingrejecton hash to reject nils in Ruby 2.3 analysis. (@koic) - #11792: Fix an error for
Lint/DuplicateMatchPatternwhen using hash pattern withifguard. (@koic) - #11800: Mark
Style/InvertibleUnlessConditionas unsafe. (@koic)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.50.1
Bug fixes
- #11787: Fix a false positive for
Lint/DuplicateMatchPatternwhen repeatedinpatterns but differentifguard is used. (@koic) - #11789: Fix false negatives for
Style/ParallelAssignmentwhen Ruby 2.7+. (@koic) - #11783: Fix a false positive for
Style/RedundantLineContinuationusing line concatenation for assigning a return value and without argument parentheses. (@koic)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.50
New features
- #11749: Add new
Lint/DuplicateMatchPatterncop. (@koic) - #11773: Make
Layout/ClassStructureaware of singleton class. (@koic) - #11779: Make
Lint/RedundantStringCoercionaware of print method arguments. (@koic) - #11776: Make
Metrics/ClassLengthaware of singleton class. (@koic) - #11775: Make
Style/TrailingBodyOnClassaware of singleton class. (@koic)
Bug fixes
- #11758: Fix a false positive for
Style/RedundantLineContinuationwhen line continuations for string. (@koic) - #11754: Fix a false positive for
Style/RedundantLineContinuationwhen using&&and||with a multiline condition. (@ydah) - #11765: Fix an error for
Style/MultilineMethodSignaturewhen line break afterdefkeyword. (@koic) - #11762: Fix an incorrect autocorrect for
Style/ClassEqualityComparisonwhen comparing a variable or return value for equality. (@koic) - #11752: Fix a false positive for
Style/RedundantLineContinuationwhen using line concatenation and calling a method without parentheses. (@koic)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.49
New features
- #11122: Add new
Style/RedundantLineContinuationcop. (@ydah) - #11696: Add new
Style/DataInheritancecop. (@ktopolski) - #11746: Make
Layout/EndAlignmentaware of pattern matching. (@koic) - #11750: Make
Metrics/BlockNestingaware of numbered parameter. (@koic) - #11699: Make
Style/ClassEqualityComparisonaware ofClass#to_sandClass#inspectfor class equality comparison. (@koic) - #11737: Make
Style/MapToHashandStyle/MapToSetaware of numbered parameters. (@koic) - #11732: Make
Style/MapToHashandStyle/MapToSetaware of symbol proc. (@koic) - #11703: Make
Naming/InclusiveLanguagesupport autocorrection when there is only one suggestion. (@koic)
Bug fixes
- #11730: Fix an error for
Layout/HashAlignmentwhen using anonymous keyword rest arguments. (@koic) - #11704: Fix a false positive for
Lint/UselessMethodDefinitionwhen method definition with non access modifier containing onlysupercall. (@koic) - #11723: Fix a false positive for
Style/IfUnlessModifierwhen using one-line pattern matching as aifcondition. (@koic) - #11725: Fix an error when insufficient permissions to server cache dir are granted. (@koic)
- #11715: Ensure default configuration loads. (@koic)
- #11742: Fix error handling in bundler standalone mode. (@composerinteralia)
- #11712: Fix a crash in
Lint/EmptyConditionalBody. (@gsamokovarov) - #11641: Fix a false negative for
Layout/ExtraSpacingwhen there are many comments with extra spaces. (@nobuyo) - #11740: Fix a false positive for
Lint/NestedMethodDefinitionwhen nested definition inside*_evaland*_execmethod call with a numblock. (@ydah) - #11685: Fix incorrect directive comment insertion when percent array violates
Layout/LineLengthcop. (@nobuyo) - #11706: Fix infinite loop when
--disable-uncorrectableoption and there is a multi-line percent array violatesLayout/LineLength. (@nobuyo) - #11697: Fix
Lint/Syntaxbehavior when--onlyis not given the cop name. (@koic) - #11709: Fix value omission false positive in
Style/MethodCallWithArgsParentheses. (@gsamokovarov)
Changes
- #11739: Make
Style/RedundantParenthesesaware of redundant method argument parentheses. (@koic) - #10766: Use the path given by
--cache-rootto be the parent forrubocop_cachedir like other ways to specify it. (@nobuyo)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.48.1
Bug fixes
- #11673: Fix incorrect
Style/HashSyntaxautocorrection for assignment methods. (@gsamokovarov) - #11682: Fix a false positive for
Lint/UselessRescuewhen usingThread#raiseinrescueclause. (@koic) - #11672: Fix an error for
Layout/BlockEndNewlinewhen multiline block}is not on its own line and it is used as multiple arguments. (@koic) - #11675:
Style/AccessorGrouping: Fix sibling detection for methods with type sigs. (@issyl0) - #11658: Fix
Lint/Debuggershould not allow pry. (@ThHareau) - #11689: Fix
Lint/Syntaxbehavior whenEnabled: falseofLintdepartment. (@koic) - #11677: Fix the severity for
Lint/Syntax. (@koic) - #11691: Fix an error for
Gemspec/DependencyVersionwhen method called on gem name argument foradd_dependency. (@koic)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.48
New features
Bug fixes
- #11654: Fix a false positive for
Lint/MissingSuperwhen nosupercall and when defining some method. (@koic) - #11661: Fix an error for
Style/Documentationwhen namespace is a variable. (@koic) - #11647: Fix an error for
Style/IfWithBooleanLiteralBrancheswhen using()as a condition. (@koic) - #11646: Fix an error for
Style/NegatedIfElseConditionwhen using()as a condition. (@koic) - #11659: Fix an incorrect autocorrect for
Lint/OrAssignmentToConstantwhen using or-assignment to a constant in method definition. (@koic) - #11663: Fix an incorrect autocorrect for
Style/BlockDelimiterswhen multi-line blocks to{and}with arithmetic operation method chain. (@koic) - #11638: Fix a false positive for
Lint/UselessAccessModifierwhen using same access modifier inside and outside theincludedblock. (@ydah) - #11164: Suppress server mode message with
-f json. (@jasondoc3) - #11643: Fix incorrect shorthand autocorrections in calls inside parentheses. (@gsamokovarov)
- #11650:
Style/AccessorGrouping: Fix detection of Sorbetsig {}blocks. (@issyl0) - #11657: Use cop name to check if cop inside registry is enabled. Previously, it was able to cause large memory usage during linting. (@fatkodima)
Changes
- #11482: Avoid comment deletion by
Style/IfUnlessModifierwhen the modifier form expression has long comment. (@nobuyo) - #11649: Support
MinBranchesCountconfig forStyle/CaseLikeIfcop. (@fatkodima)
- Ruby
Published by bbatsov almost 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.47
New features
- #11475: Add autocorrect for hash in
Lint/LiteralInInterpolation. (@KessaPassa) - #11584: Add
Metrics/CollectionLiteralLengthcop. (@sambostock)
Bug fixes
- #11615: Fix a false negative for
Lint/MissingSuperwhen nosupercall withClass.newblock. (@koic) - #11615: Fix a false negative for
Lint/MissingSuperwhen usingClass.newwithout parent class argument. (@koic) - #11040: Fix a false positive for
Style/IfUnlessModifierwhendefined?'s argument value is undefined. (@koic) - #11607: Fix a false positive for
Style/RedundantRegexpEscapewhen an escaped hyphen follows after an escaped opening square bracket within a character class. (@SparLaimor) - #11626: Fix a false positive for
Style/ZeroLengthPredicatewhen usingFile.new(path).size.zero?. (@koic) - #11620: Fix an error for
Lint/ConstantResolutionwhen using__ENCODING__. (@koic) - #11625: Fix an error for
Lint/EmptyConditionalBodywhen missingifbody and using method call for return value. (@koic) - #11631: Fix an incorrect autocorrect for
Style/ArgumentsForwardingwhen using arguments forwarding for.()call. (@koic) - #11621: Fix an incorrect autocorrect for
Layout/ClassStructureusing heredoc inside method. (@fatkodima) - #3591: Handle modifier
whileanduntilexpressions inLint/UselessAssignment. (@bfad) - #11202: Fixed usage of
--onlyflag with--auto-gen-config. (@istvanfazakas)
Changes
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.46
New features
Bug fixes
- #11574: Fix a broken shorthand syntax autocorrection. (@gsamokovarov)
- #11599: Fix a false positive for
Layout/LineContinuationSpacingwhen using percent literals. (@koic) - #11556: Fix a false positive for
Lint/Debuggerwhenpis an argument of method call. (@koic) - #11591: Fix a false positive for
Lint/ToEnumArgumentswhen enumerator is not created for__callee__and__callee__methods. (@koic) - #11603: Actually run temporarily enabled cops. (@tdeo)
- #11579: Fix an error for
Layout/HeredocArgumentClosingParenthesiswhen heredoc is a method argument in a parenthesized block argument. (@koic) - #11576: Fix an error for
Lint/UselessRescuewhenrescuedoes not exception variable andensurehas empty body. (@koic) - #11608: Fix an error for
Lint/RefinementImportMethodswhen usingincludeon the top level. (@koic) - #11589: Fix an error for
Layout/HeredocArgumentClosingParenthesiswhen heredoc is a branch body in a method argument of a parenthesized argument. (@koic) - #11567: Fix
Layout/EndAlignmentfalse negative. (@j-miyake) - #11582: Fix checking if token with large offset begins its line. (@fatkodima)
- #11412: Mark
Style/ArrayIntersectas unsafe. (@koic) - #11559: Fixed false positives and negatives in
Style/RedundantRegexpCharacterClasswhen using octal escapes (e.g. "\0"). (@jaynetics) - #11575: Fix parentheses in value omissions for multiple assignments. (@gsamokovarov)
Changes
- #11586: Handle
ruby2_keywordsinStyle/DocumentationMethodcop. (@fatkodima) - #11604: Make
Naming/VariableNumberto allowx86_64CPU architecture name by default. (@koic) - #11596: Make
Style/AccessorGroupingaware of method call before accessor. (@koic) - #11588: Optimize
Style/WordArraycomplex matrix check. (@sambostock) - #11573: Handle hash patterns and pins in
Lint/OutOfRangeRegexpRefcop. (@fatkodima) - #11564: Remove print debug methods from default for
Lint/Debugger. (@koic)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.45.1
Bug fixes
- #11552: Fix a false positive for
Lint/Debuggerwhen methods containing different method chains. (@ydah) - #11548: Fix an error for
Style/AccessModifierDeclarationswhen if a non method definition was included. (@ydah) - #11554: Fix an error for
Style/RedundantConditionwhen the branches contains empty hash literal argument. (@koic) - #11549: Fix an error for third party cops when inheriting
RuboCop::Cop::Cop. (@koic)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.45
New features
- #10839: Add API for 3rd party template support. (@r7kamura)
- #11528: Add new
Style/RedundantHeredocDelimiterQuotescop. (@koic) - #11188: Add a
--no-detachoption for--start-server. This will start the server process in the foreground, which can be helpful when running within Docker where detaching the process terminates the container. (@f1sherman) - #11546: Make
Lint/UselessAccessModifieraware of Ruby 3.2'sData.define. (@koic) - #11396: Add ability to profile rubocop execution via
--profileand--memoryoptions. (@fatkodima)
Bug fixes
- #11491: Fix a crash on
Lint/UselessAssignment. (@gsamokovarov) - #11515: Fix a false negative for
Naming/HeredocDelimiterNamingwhen using lowercase. (@koic) - #11511: Fix a false negative for
Style/YodaConditionwhen using constant. (@koic) - #11520: Fix a false negative for
Style/YodaExpressionwhen using constant. (@koic) - #11521: Fix a false positive for
Lint/FormatParameterMismatchwhen usingKernel.formatwith the interpolated number of decimal places fields match. (@koic) - #11545: Fix the following false positive for
Lint/NestedMethodDefinitionwhen using numbered parameter. (@koic) - #11535: Fix a false positive for
Style/NumberedParametersLimitwhen only_2or higher numbered parameter is used. (@koic) - #11508: Fix a false positive for
Style/OperatorMethodCallwhen using multiple arguments for operator method. (@koic) - #11503: Fix a false positive for
Style/RedundantConditionwhen using method argument with operator. (@koic) - #11529: Fix an incorrect autocorrect for
Layout/ClassStructurewhen definitions that need to be sorted are defined alternately. (@ydah) - #11530: Fix an incorrect autocorrect for
Style/AccessModifierDeclarationswhen multiple groupable access modifiers are defined. (@ydah) - #10910: Fix an incorrect autocorrect for
Style/MultilineTernaryOperatorwhen contains a comment. (@ydah) - #11522: Don't flag default keyword arguments in
Style/ArgumentsForwarding. (@splattael) - #11547: Fix a false positive for
Lint/NestedMethodDefinitionwhen using Ruby 3.2'sData.define. (@koic) - #11537: Fix an infinite loop error for
Layout/ArrayAlignmentwhen using assigning unbracketed array elements. (@koic) - #11516: Fix missing parentheses in shorthand hash syntax as argument calls. (@gsamokovarov)
Changes
- #11504: Allow
initializemethod inStyle/DocumentationMethod. (@koic) - #11541: Enable autocorrection for
Layout/LineContinuationLeadingSpace. (@eugeneius) - #11542: Mark
Layout/AssignmentIndentationas safe andLint/AssignmentInConditionas unsafe for autocorrection. (@eugeneius) - #11517: Make
Lint/Debuggeraware ofp,PP.pp, andppmethods. (@koic) - #11539: Remove
bundlerfrom defaultAllowedGemsofGemspec/DevelopmentDependencies. (@koic)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.44.1
Bug fixes
- #11492: Fix an error for
Lint/Voidwhen configuringCheckForMethodsWithNoSideEffects: true. (@koic) - #11400: Fix an incorrect autocorrect for
Naming/BlockForwardingandLint/AmbiguousOperatorwhen autocorrection conflicts for ambiguous splat argument. (@fatkodima) - #11483: Fix
Layout/ClosingParenthesisIndentationfor keyword splat arguments. (@fatkodima) - #11487: Fix a false positive for
Lint/FormatParameterMismatchwhen format string is only interpolated string. (@ydah) - #11485: Fix a false positive for
Lint/UselessAssignmentwhen using numbered block parameter. (@koic)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.44
New features
- #11410: Add new
Style/InvertibleUnlessConditioncop. (@fatkodima) - #11338: Add new
Style/ComparableClampcop. (@koic) - #11350: Make
Lint/DeprecatedClassMethodsaware of deprecatedattrwith boolean 2nd argument. (@koic) - #11457: Make
Metrics/BlockNestingaware of pattern matching. (@koic) - #11458: Make
Metrics/CyclomaticComplexityaware of pattern matching. (@koic) - #11469: Add
Gemspec/DevelopmentDependenciescop. (@sambostock)
Bug fixes
- #11445: Fix an incorrect autocorrect for
Style/BlockDelimiterswhen there is a comment after the closing brace and bracket. (@koic) - #11428: Apply value omission exceptions in super invocations. (@gsamokovarov)
- #11420: Fix a false positive for
Lint/UselessRescuewhen using exception variable inensureclause. (@koic) - #11460: Fix an error for
Style/OperatorMethodCallwhen usingfoo.> 42. (@koic) - #11456: Fix value omissions in
yieldinvocations. (@gsamokovarov) - #11467: Fix a false negative for
Style/MethodCallWithoutArgsParentheseswhen calling method on a receiver and assigning to a variable with the same name. (@koic) - #11430: Fix an infinite loop error for
Layout/BlockEndNewlinewhen multiline blocks with newlines before the; end. (@koic) - #11442: Fix a crash during anonymous rest argument forwarding. (@gsamokovarov)
- #11447: Fix an incorrect autocorrect for
Style/RedundantDoubleSplatHashBraceswhen using nested double splat hash braces. (@koic) - #11459: Make
Lint/UselessRuby2Keywordsaware of conditions. (@splattael) - #11415: Fix a false positive for
Lint/UselessMethodDefinitionwhen method definition contains rest arguments. (@koic) - #11418: Fix a false positive for
Style/MethodCallWithArgsParentheseswhen using anonymous rest arguments or anonymous keyword rest arguments. (@koic) - #11431: Fix a crash in Style/HashSyntax. (@gsamokovarov)
- #11444: Fix a false positive for
Lint/ShadowingOuterLocalVariablewhen using numbered block parameter. (@koic) - #11477: Fix an error when using YAML alias with server mode. (@koic)
- #11419: Fix a false positive for
Style/RedundantRequireStatementwhen usingpretty_inspect. (@koic) - #11439: Fix an incorrect autocorrect for
Style/MinMaxComparisonwhen usinga < b a : bwithelsif/else. (@ydah) - #11464: Fix a false negative for
Lint/FormatParameterMismatchwhen include interpolated string. (@ydah) - #11425: Fix a false negative for
Lint/Voidwhen using methods that takes blocks. (@krishanbhasin-shopify) - #11437: Fix an error for
Style/AccessModifierDeclarationswhen access modifier is inlined with a method on the top level. (@koic) - #11455: Fix crash with
super value_omission:followed by a method call. (@gsamokovarov)
Changes
- #11465: Make
Style/Semicolonaware of redundant semicolon in block. (@koic) - #11471: Change to not output not configured warning when renamed and pending cop. (@ydah)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.43
New features
- #11359: Add new
Lint/UselessRescuecop. (@fatkodima) - #11389: Add autocorrect for
Style/MissingElse. (@FnControlOption)
Bug fixes
- #11386: Fix a false positive for
Style/OperatorMethodCallwhen using anonymous forwarding. (@koic) - #11409: Fix an incorrect autocorrect for
Style/HashSyntaxwhen using hash value omission andEnforcedStyle: no_mixed_keys. (@koic) - #11405: Fix undefined method `range_between' for Style/WhileUntilModifier. (@such)
- #11374: Fix an error for
Style/StringHashKeyswhen using invalid symbol in encoding UTF-8 as keys. (@koic) - #11392: Fix an incorrect autocorrect for
Style/RedundantDoubleSplatHashBracesusing double splat in double splat hash braces. (@koic) - #8990: Make
Style/HashEachMethodsaware of built-inThread.current. (@koic) - #11390: Fix an incorrect autocorrect for
Style/HashSyntaxwhen hash first argument key and hash value only are the same which has a method call on the next line. (@koic) - #11379: Fix a false negative for
Style/OperatorMethodCallwhen usinga.+ b.something. (@koic) - #11180: Fix an error for
Style/RedundantRegexpEscapewhen using%rto provide regexp expressions. (@si-lens) - #11403: Fix bad offense for parenthesised calls in literals for
omit_parenthesesstyle inStyle/MethodCallWithArgsParentheses. (@gsamokovarov) - #11407: Fix an error for
Style/HashSyntaxwhen expression follows hash key assignment. (@fatkodima) - #11377: Fix
Style/OperatorMethodCallwhen forwarding arguments. (@sambostock)
Changes
- #11382: Require
unicode-display_width2.4.0 or higher. (@fatkodima) - #11381: Require Parser 3.2.0.0 or higher. (@koic)
- #11380: Disable
Style/YodaExpressionby default. (@koic) - #11303: Make
Metrics/ParameterListsaware ofStruct.newandData.defineblocks. (@koic)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.42
New features
- #11339: Add new
Style/MapToSetcop. (@koic) - #11341: Add new
Style/MinMaxComparisoncop. (@koic) - #9222: Add new
Style/YodaExpressioncop. (@fatkodima) - #11261: Allow inherit_from to accept a glob. (@alexevanczuk)
Bug fixes
- #11204: Fix a false negative for
Lint/RedundantCopDisableDirectivewhen using--exceptcommand line option. (@koic) - #11369: Fix an error for
Lint/UselessRuby2Keywordswhen usingProc#ruby2_keywords. (@koic) - #11351: Fix an incorrect autocorrect for
Lint/RegexpAsConditionwhen using regexp literal with bang. (@koic) - #11329: Accept simple freezed constants in
Layout/ClassStructureand correctly handle class methods. (@fatkodima) - #11344: Fix an error for
Style/GuardClausewhen using heredoc as an argument of raise inthenbranch and it does not haveelsebranch. (@koic) - #11335: Fix an error for
Style/RequireOrderwhen only onereuqire. (@koic) - #11348: Fix an error for
Style/SelectByRegexpwhen block body is empty. (@koic) - #11320: Fix a false positive for
Lint/RequireParentheseswhen assigning ternary operator. (@koic) - #11361: Make
Style/MethodDefParenthesesaware of Ruby 3.2's anonymous rest and keyword rest arguments. (@koic) - #11346: Fix a false positive for
Style/RedundantStringEscapewhen using escaped space in heredoc. (@koic) - #10858: Fix
Style/IdenticalConditionalBranchesto ignore identical leading lines when branch has single child and is used in return context. (@fatkodima) - #11237: Fix
Layout/CommentIndentationcomment aligned with access modifier indentation when EnforcedStyle is outdent. (@soroktree) - #11330: Fix an error for
Style/RequireOrderwhen usingrequireinsiderescuebody. (@fatkodima) - #8751: Accept
superwithin ranges forLayout/SpaceAroundKeywordcop. (@fatkodima) - #10194: Accept bracketed arrays within 2d arrays containing subarrays with complex content for
Style/WordArraycop. (@fatkodima)
Changes
- #8366: Ignore private constants in
Layout/ClassStructurecop. (@fatkodima) - #11325: Support autocorrection for percent literals in
Style/ConcatArrayLiterals. (@fatkodima) - #11327: Make
Style/ZeroLengthPredicateaware ofarray.length.zero?. (@koic) - #10976: Support pattern matching for
Lint/OutOfRangeRegexpRefcop. (@fatkodima)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.41.1
Bug fixes
- #11293: Fix a false negative for
Style/Documentationwhen using macro. (@koic) - #11313: Fix a false positive for
Naming/BlockForwardingwhen the block argument is reassigned. (@fatkodima) - #11014: Fix a false positive for
Style/Aliascop when alias in a method def. (@ydah) - #11309: Fix a false positive for
Style/RedundantStringEscapewhen using a redundant escaped string interpolation\#\{foo}. (@koic) - #11307: Fix an error for
Style/GuardClausewhen using lvar as an argument of raise inelsebranch. (@ydah) - #11308: Fix disabling departments via comment. (@fatkodima)
Changes
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.41
New features
- #11305: Add new
Style/RedundantDoubleSplatHashBracescop. (@koic) - #10812: New AllowMultilineFinalElement option for all LineBreaks cops. (@Korri)
- #11277: Add new
Style/ConcatArrayLiteralscop. (@koic)
Bug fixes
- #11255: Fix an error for
Style/RequireOrderwhenrequirewith no arguments is put betweenrequire. (@ydah) - #11273: Fix a false positive for
Lint/DuplicateMethodswhen there are samealias_methodname outsiderescueorensurescopes. (@koic) - #11267: Fix an error for Style/RequireOrder when modifier conditional is used between
require. (@ydah) - #11254: Fix an error for
Style/RequireOrderwhenrequireis a method argument. (@koic) - #11266: Fix a false positive for
Style/RedundantConstantBasewhen enablingLint/ConstantResolution. (@koic) - #11296: Fix an error for
Lint/NonAtomicFileOperationwhen use file existence checks line breakunlessby postfix before creating file. (@koic) - #11284: Fix an incorrect autocorrect for
Style/WordArraywhen assigning%w()array. (@koic) - #11299: Fix
base_dirinTargetFinder#find_files(). (@dukaev) - #11250: Fix an error for
Style/GuardClausewhen a method call whose last argument is not a string is in the condition body. (@ydah) - #11298: Fix
Lint/SafeNavigationChainto correctly handle[]operator followed by save navigation and method chain. (@fatkodima) - #11256: Fix an incorrect autocorrect for
Style/HashSyntaxwhen without parentheses call expr follows after multiple keyword arguments method call. (@koic) - #11289: Correctly detect Rails version when using only parts of the framework, instead of the "rails" gem. (@bdewater)
- #11262: Fix an error for
Style/IfUnlessModifierwhen the body is a method call with hash splat. (@fatkodima) - #11281: Fix
NoMethodErrorforStyle/Documentationwhen a class nested under non-constant values. (@arika)
Changes
- Ruby
Published by bbatsov about 3 years ago