You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#11051: Fix Style/AccessModifierDeclarations inline autocorrect dropping comments between the access modifier and the following method definition. ([@dduugg][])
#14665: Cache plugin integration in CopHelper to avoid repeated loading. ([@55728][])
#15091: Fix Lint/DuplicateMethods false positives for anonymous classes in constant assignments and method return values. ([@eugeneius][])
#15055: Fix Lint/DuplicateMethods false positives with anonymous classes inside blocks (e.g. RSpec let, describe). ([@ShkumbinDelija][])
#15035: Exclude included_modules from Style/ModuleMemberExistenceCheck. ([@koic][])
#15087: Fix false positive for Style/RedundantLineContinuation when using interpolated string literals. ([@koic][])
#14361: Fix false positive in file_to_include? when a relative Include pattern matches a parent directory name in the absolute file path. ([@jonas054][])
#15090: Fix false positives for Layout/EmptyLineAfterGuardClause when consecutive guard clauses use and return. ([@eugeneius][])
#15070: Fix false positive for Lint/RedundantSafeNavigation when chained safe navigation is used in a conditional expression with InferNonNilReceiver enabled. ([@koic][])
#15074: Fix false positives in Style/RedundantParentheses when using parentheses around an endless range in assignment. ([@koic][])
#15048: Fix issue where the url_for is missing for Cops without instance methods. ([@Fryguy][])
#15051: Fix Style/RedundantParentheses handling of beginless ranges. ([@oggy][])
#14980: Fix Lint/Syntax zero-length diagnostic range for syntax errors at EOF. ([@55728][])
#15084: Handle heredocs with methods calls correctly when fixing guard clauses. ([@G-Rath][])
#11398: Fix incorrect Include path adjustment when local config overrides an inherited Include. ([@jonas054][])
#15092: Fix Layout/EndAlignment cop error on an empty begin. ([@viralpraxis][])
#15059: Fix an error in Layout/LineLength when SplitStrings option is enabled and __FILE__ is used. ([@jeromedalbert][])
#5876: Fix Lint/UnusedMethodArgument false positive when block argument is used via yield. ([@dduugg][])
#15093: Return tool execution errors instead of protocol errors in MCP server. ([@koic][])
Changes
#15005: Make Style/OneClassPerFile exclude spec/**/* and test/**/* by default. ([@koic][])
#15081: Relax parallel dependency to >= 1.10. ([@koic][])
#15063: Disable Style/RedundantStructKeywordInit cop by default. ([@koic][])
#15000: Display ZJIT usage when running under LSP. ([@koic][])
#14961: Add AllowedParentClasses option to Style/EmptyClassDefinition. ([@hammadkhan][])
#14977: Support AllowedReceivers for Style/HashLookupMethod. ([@koic][])
Bug fixes
#15015: Fix Style/ConcatArrayLiterals autocorrect deleting code for percent literals with interpolation. ([@bbatsov][])
#14897: Detect constant reassignment after class/module definition in Lint/ConstantReassignment. ([@ydakuka][])
#11829: Fix false negatives for Lint/DuplicateMethods when duplicate methods are defined in anonymous classes and modules not assigned to a constant. ([@Darhazer][])
#14988: Fix false negative in Style/RedundantParentheses when redundant parentheses around range literals in block body. ([@koic][])
#14916: Fix false positive for Layout/MultilineMethodCallIndentation when method chain is inside a hash pair value passed to a multiline chained method call. ([@ydakuka][])
#15010: Fix a false positive for Lint/DuplicateMethods when modules blocks are passed as method arguments. ([@5hun-s][])
#15028: Fix a false positive for Lint/DuplicateMethods when the same method is defined in different anonymous module blocks passed to a no-receiver call (e.g. stub_const). ([@Darhazer][])
#15021: Fix false positives in Layout/EmptyLineAfterGuardClause when using a guard clause followed by a multi-line guard clause with raise, fail, return, break, or next. ([@koic][])
#15001: Fix false positives in Layout/RedundantLineBreak when setting InspectBlocks: true and using rescue or ensure in the block. ([@koic][])
#14997: Fix false positives in Style/FileOpen when assigning File.open to an instance variable, class variable, global variable, or constant. ([@koic][])
#15019: Fix false positives in Lint/DuplicateMethods when the same method is defined in anonymous module blocks passed to different receivers. ([@koic][])
#14987: Complete ERB and Haml autocorrection in a single run. ([@alpaca-tc][])
#15039: Fix incorrect autocorrect in Style/IfWithSemicolon when return with value is in the else branch. ([@koic][])
#14930: Fix incorrect autocorrection for Style/IfUnlessModifier when multiple if/unless modifier forms are on the same line inside a collection. ([@ydakuka][])
#14985: Fix incorrect autocorrection in Lint/SafeNavigationChain when chaining a method call after safe navigation in the if branch of a ternary. ([@koic][])
#15009: Fix infinite loop in Layout/EndAlignment when end is followed by || or &&. ([@koic][])
#14981: Fix spurious warning "does not support Safe/SafeAutoCorrect parameter" when those parameters are set for cops that don't have them in their default configuration. ([@dduugg][])
#15043: Fix an error for Lint/UselessDefaultValueArgument when fetch without a receiver is inside a fetch block. ([@koic][])
#15034: Fix incorrect autocorrection in Style/IfWithSemicolon when using single-line unless / ; / end. ([@koic][])
#15015: Fix Style/NonNilCheck autocorrect for receivers containing spaces. ([@bbatsov][])
#14890: Fix a false positive for Lint/RedundantCopDisableDirective when a rubocop:disable comment is used to suppress Lint/EmptyWhen, Lint/EmptyConditionalBody, Lint/EmptyInPattern, or Style/SymbolProc. ([@eugeneius][])
#15015: Fix false negative in Style/RedundantPercentQ for %q strings with interpolation-like syntax. ([@bbatsov][])
#14984: Fix Style/AndOr adding unnecessary parentheses around return without arguments. ([@eugeneius][])
#14945: Support files with multiple modifiers in Lint/UselessConstantScoping. ([@h-lame][])
#15015: Fix Style/TrailingMethodEndStatement to detect singleton methods (def self.foo). ([@bbatsov][])
#10822: Don't store results in cache if there are warnings. ([@jonas054][])
Changes
#14718: Allow setting MaxFilesInCache to false to entirely disable cache pruning. ([@byroot][])
#14989: Make Lint/RedundantSafeNavigation aware of safe navigation in conditional true branch. ([@koic][])
#15041: Remove mcp gem from runtime dependencies. ([@koic][])
#14834: Fix Layout/IndentationWidth false positive for chained method blocks when EnforcedStyleAlignWith is start_of_line. ([@krororo][])
#14756: Fix Lint/Void to detect void expressions in case/when branches. ([@bbatsov][])
#14874: Fix a Parser::ClobberingError in Lint/UselessAssignment when autocorrecting a useless assignment that wraps a block containing another useless assignment. ([@koic][])
#14880: Fix a false negative in Layout/MultilineAssignmentLayout when using numblock or itblock with SupportedTypes: ['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/RedundantSafeNavigation when using &.respond_to? with methods defined on Object (e.g., :class). ([@bbatsov][])
#14098: Mark Lint/SafeNavigationConsistency autocorrect as unsafe. ([@bbatsov][])
#14791: Fix autocorrect producing SyntaxError in Lint/InterpolationCheck when single quoted string contains double quotes with invalid interpolation. ([@ydakuka][])
Changes
#14872: Tweak autocorrection in Style/HashAsLastArrayItem when multiline hash elements. ([@koic][])
#14917: Change Style/EndlessMethod cop to consider receivers. ([@fatkodima][])
#14851: Reduce precision in 'Finished in X.X seconds' message to 5 decimal places. ([@ZimbiX][])
#14895: Rename class_definition to class_keyword in EnforcedStyle of Style/EmptyClassDefinition. ([@koic][])
#14956: Add support for String.new with interpolated strings to Style/RedundantInterpolationUnfreeze. ([@lovro-bikic][])
#14955: Register redundant parentheses around block body in Style/RedundantParentheses. ([@lovro-bikic][])
#14854: Fix a clobbering error in Style/BlockDelimiters when autocorrecting nested multi-line blocks with adjacent curly braces. ([@koic][])
#14837: Fix an error for Style/IfUnlessModifier when the first value uses a normal if and the others use modifier if. ([@koic][])
#14858: Fix an infinite loop error in Layout/FirstArgumentIndentation when first arguments are over-indented in nested method calls. ([@koic][])
#14843: Fix an error in Layout/MultilineMethodCallIndentation when a multiline method call follows a hash access. ([@koic][])
#14859: Fix an error in Layout/MultilineMethodCallIndentation when 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/EmptyLinesAfterModuleInclusion when include is nested inside an array. ([@eugeneius][])
#7436: Fix Style/FormatStringToken to not autocorrect strings outside of format method context in aggressive mode. ([@ydakuka][])
#14841: Fix false negatives in Style/HashAsLastArrayItem when an array contains only a single hash element. ([@koic][])
#14865: Fix false negatives in Style/MethodDefParentheses when using splat or forwarding arguments without parentheses. ([@koic][])
#14833: Fix false positive for Layout/MultilineMethodCallIndentation when a multi-dot method chain is inside a hash pair value. ([@ydakuka][])
#14847: Fix false positive for Layout/MultilineMethodCallIndentation when a method is chained after a single-line block. ([@ydakuka][])
#14867: Fix Offense#highlighted_area for PseudoSourceRange locations. ([@rafaelfranca][])
#14861: Fix an error in Style/IfUnlessModifier when the first value uses a normal if and the others use ternary operator. ([@koic][])
#14816: Use toplevel cache configs for remote configuration files. ([@nekketsuuu][])
#14819: Fix incorrect autocorrect for Style/GuardClause when using heredoc as an argument of method call in raise in else branch. ([@koic][])
#14805: Bring back the original indentation from before version 1.84.0. ([@Magikdidi24][])
#12754: Fix an infinite loop for Style/IfUnlessModifier when multiple if/unless statements share the same line in arrays, method arguments, or hash values. ([@ydakuka][])
#14817: Fix an infinite loop between Layout/FirstArgumentIndentation and Layout/LineLength when correcting method chains. ([@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 for Naming/PredicateMethod, Style/IfWithBooleanLiteralBranches, and Style/RedundantCondition, in addition to the existing nonzero?. ([@koic][])
#14735: Remove deprecated InjectDefaults handling. ([@afurm][])
#14516: Add AllowImplicitArrayLiterals to Layout/FirstArrayElementLineBreak. ([@koic][])
#14750: Add new Style/ReverseFind cop. ([@koic][])
#12343: Add new Style/EmptyClassDefinition cop to enforce consistent style for empty class definitions. The cop can enforce either a two-line class definition or Class.new for classes with no body. ([@ydakuka][])
#14769: Add new Style/HashLookupMethod cop to enforce Hash#[] vs Hash#fetch preference. ([@sferik][])
#12051: Add new Style/NegativeArrayIndex cop 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][])
#14722: Support TargetRubyVersion 4.1 (experimental). ([@koic][])
Bug fixes
#14697: Allow non-method calls in Categories for Layout/ClassStructure. ([@fatkodima][])
#14784: Fix an error for Style/GuardClause when using heredoc as an argument of raise in else branch and if branch is empty. ([@koic][])
#14790: Fix an error for Style/HashLookupMethod cop when there's no receiver. ([@viralpraxis][])
#14779: Fix autocorrect crash with ruby_extractor when using offset: 0 and different source buffers. ([@ydakuka][])
#14762: Fix false negatives for Style/RedundantCondition when the branches contains constant assignment. ([@koic][])
#14751: Fix --force-default-config not preventing project config loading when used with options that access configuration. ([@sakuro][])
#14783: Fix incorrect autocorrect for Style/HashSyntax when shorthand syntax is used in condition of if/unless/while/until. ([@ydakuka][])
#14747: Fix a regression inLayout/IndentationWidth by adding a new EnforcedStyleAlignWith style parameter. ([@MikeMcQuaid][])
#14716: Fix an infinite loop error for Layout/LineLength when SplitStrings option is enabled and strings span multiple lines. ([@HariprasanthMSH][])
#14763: Fix an infinite loop error for Layout/IndentationWidth and Layout/IndentationConsistency when using EnforcedStyle: indented_internal_methods with method chain blocks. ([@ydakuka][])
#9373: Fix an infinite loop error for Layout/IndentationWidth when autocorrecting mixed tabs and spaces in blocks. Fix an infinite loop error for Layout/DefEndAlignment and Layout/IndentationStyle when autocorrecting mixed tabs and spaces. Autocorrection for tabs is disabled in AlignmentCorrector for indentation offenses, but enabled for align_end. ([@ydakuka][])
#12295: Fix Layout/FirstArgumentIndentation to correct entire method calls and chains for nested calls. ([@ydakuka][])
#12527: Fix Offense#highlighted_area to return a valid Parser::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/JSONLoad when create_additions option 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 squish and squish! applied to heredoc to Layout/HeredocIndentation. ([@lovro-bikic][])
#14798: Recognize Forwardable methods in Lint/DuplicateMethods. ([@lovro-bikic][])
#14793: Make Lint/RedundantSplatExpansion aware of constant assignment. ([@koic][])
#14770: Make Style/AccessModifierDeclarations aware of self class. ([@koic][])
#14748: Add support for other Module member existence methods to Style/ModuleMemberExistenceCheck. ([@lovro-bikic][])
#14795: Add AllowedMethods configuration to Style/ModuleMemberExistenceCheck. ([@lovro-bikic][])
#14736: Fix an error for Style/TrailingCommaInArguments when EnforcedStyleForMultiline is consistent_comma and keyword arguments use a trailing comma. ([@koic][])
#14737: Fix crash in Layout/RedundantLineBreak when Layout/LineLength is disabled. ([@ydakuka][])
#14743: Fix false positives for Layout/MultilineMethodCallIndentation when 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/IndentationWidth for multiline method chain blocks. ([@rscq][])
#14730: Fix the cache implementation to use consistent cache keys across workers. ([@byroot][])
#14559: Fix false positives for Lint/UselessAssignment when a variable is assigned in loop body and used in loop condition. ([@ydakuka][])
#14644: Support TargetRubyVersion 4.0 (experimental). ([@koic][])
Bug fixes
#14649: Fix an error for Lint/LiteralAsCondition when there are literals in multiple branches. ([@viralpraxis][])
#14678: Fix an error when running deprecated rake rubocop:auto_correct task. ([@koic][])
#14650: Fix wrong autocorrect for Lint/RedundantSplatExpansion when splatting a single literal. ([@earlopain][])
#14703: Fix false negatives for Layout/RescueEnsureAlignment when using self class definition. ([@koic][])
#14706: Fix false negatives for Lint/NoReturnInBeginEndBlocks when assigning instance variable, class variable, global variable, or constant. ([@koic][])
#14715: Fix false positives for Layout/EmptyLineAfterGuardClause when a guard clause follows a multiline heredoc in a parenthesized method call. ([@koic][])
#14667: Fix false positives for Layout/EndAlignment when a conditional assignment is used on the same line and the end with a safe navigation method call is aligned. ([@koic][])
#14688: Fix false positives for Layout/EndAlignment when a conditional assignment is used on the same line and the end with a numbered block or it block method call is aligned. ([@koic][])
#14699: Fix false positives for Lint/RedundantSafeNavigation when the receiver is used outside the singleton method definition scope. ([@koic][])
#14663: Fix false positives for Style/EndlessMethod when multiline or xstring heredoc is used in method body. ([@koic][])
#10173: Fix false positives for Style/TrailingCommaInArguments when EnforcedStyleForMultiline is set to consistent_comma and a multiline braced hash argument appears after another argument. ([@koic][])
#14680: Handle all OptionParser errors when running rubocop with input that causes an error. ([@dvandersluis][])
#14658: Fix incorrect behavior when Layout/LineLength is disabled. ([@koic][])
#14704: Fix incorrect Position character value in LSP. ([@tmtm][])
#14619: Store remote configuration caches in cache root. ([@Jack12816][])
#14476: Fix Style/ClassAndModuleChildren to skip compact style definitions inside another class or module when EnforcedStyle: nested. ([@rscq][])
#14281: Update Layout/EndAlignment with EnforcedStyleAlignWith: variable to handle conditionals inside begin nodes properly. ([@dvandersluis][])
#14668: Exclude Severity from configuration parameters. ([@r7kamura][])
#14684: Make Style/CaseEquality allow regexp case equality where the receiver is a regexp literal. ([@koic][])
#14645: Change Lint/CircularArgumentReference to detect offenses within long assignment chains. ([@viralpraxis][])
#14642: Make Gemspec/RubyVersionGlobalsUsage aware of Ruby::VERSION. ([@koic][])
#14695: Make Layout/EmptyLineAfterMagicComment aware of # rbs_inline magic comment. ([@koic][])
#10147: Make Lint/ElseLayout allow a single-line else body in then single-line conditional. ([@koic][])
#14661: Make Lint/RedundantRequireStatement aware of pathname when analyzing Ruby 4.0. ([@koic][])
#14698: Make Lint/UnreachableCode aware of singleton method redefinition. ([@koic][])
#14677: Make Style/RedundantArgument aware of to_i. ([@koic][])
#14660: Rename IgnoreCopDirectives to AllowCopDirectives in Layout/LineLength. ([@koic][])
#14492: Revert #14492, which added support for LSP positionEncoding 'utf-8' and 'utf-32' due to critical performance regression reports. ([@koic][])
#14597: Fix an infinite loop error for Layout/HashAlignment when EnforcedStyle: with_fixed_indentation is specified for Layout/ArgumentAlignment. ([@koic][])
#14621: Fix an error for Naming/PredicateMethod when using an in pattern with empty parentheses body. ([@koic][])
#14631: Fix an error for Style/SoleNestedConditional when using nested single line if. ([@koic][])
#14626: Fix false positives in Style/ConstantVisibility when visibility is declared with multiple constants. ([@koic][])
#14628: Fix false positives for Style/FloatDivision when using Regexp.last_match or nth reference (e.g., $1). ([@koic][])
#14617: Handle non-specific issues with the Gemfile to allow fallback. ([@Fryguy][])
#14622: Fix an error for Naming/MethodName when the first argument to alias contains interpolation. ([@earlopain][])
#14587: Fix an error for Lint/SelfAssignment when using []= assignment with no arguments. ([@koic][])
#14572: Fix an error for Style/ArrayIntersect when intersection(other).any? is called without a receiver. ([@koic][])
#14599: Fix a crash when Style/ConditionalAssignment is configured with assign_inside_conditional and the conditional contains a multi-line regex. ([@martinemde][])
#14574: Fix false positives for Style/RedundantInterpolation when using a one-line => pattern matching. ([@koic][])
#14602: Fix false positives for Style/EndlessMethod when heredoc is used in method body. ([@koic][])
#14594: Fix false positives for Style/EndlessMethod when the endless method would exceed the maximum line length. ([@koic][])
#14605: Fix false positive for Lint/EmptyInterpolation when interpolation is inside a %W literal. ([@dvandersluis][])
#14604: Fix Style/RedundantFormat false positive when a interpolated value is given to a specifier with a width or precision. ([@dvandersluis][])
#14607: Fix Style/RedundantFormat handling control characters like \n. ([@dvandersluis][])
#14577: Fix an incorrect autocorrect for Style/Semicolon when a method call using hash value omission without parentheses is terminated with a semicolon. ([@koic][])
#14552: Fix a false positive for Security/JSONLoad when create_additions is explicitly specified. ([@earlopain][])
Changes
#14566: Enhance Lint::ConstantOverwrittenInRescue cop to detect offenses within fully qualified constants. ([@viralpraxis][])
#14575: Enhance Lint/ConstantOverwrittenInRescue cop to detect offenses within nested constants. ([@viralpraxis][])
#14596: Change Lint/ConstantOverwrittenInRescue to detect any constant assignment. ([@viralpraxis][])
#14568: Make Style/LambdaCall autocorrection contextual. ([@koic][])
#14563: Fix incorrect autocorrection for Lint/DeprecatedOpenSSLConstant when Cipher appears twice. ([@koic][])
Changes
#14565: Allow multiline method chain for Style/NumberedParameters and Style/ItBlockParameter with EnforcedStyle: allow_single_line when the block itself is on a single line. ([@earlopain][])
#10971: Support EnforcedStyleForMultiline: diff_comma in Style/TrailingCommaInArguments. ([@akouryy][])
Bug fixes
#14560: Fix an error for Style/NilComparison cop when using the var.==(nil) and var.===(nil) syntax. ([@viralpraxis][])
#14535: Fix autocorrect for Style/ExplicitBlockArgument when there are two methods that share the same implementation. ([@earlopain][])
#14527: Fix false negatives for Style/NumberedParameters and Style/ItBlockParameter when using multiline method chain with EnforcedStyle: allow_single_line. ([@koic][])
#14522: Fix false negatives for Layout/MultilineOperationIndentation when using indented code on LHS of equality operator in modifier method definition. ([@koic][])
#14496: Fix false negatives for Layout/EmptyLineBetweenDefs for AllowAdjacentOneLineDefs: false and DefLikeMacros that take no block. ([@earlopain][])
#14553: Fix false positives when EnforcedStyle: allowed_in_returns and !! appears across multiple lines in return position. ([@koic][])
#14557: Fix false positives for Style/RedundantParentheses when parentheses are used around a one-line rescue expression as a condition. ([@koic][])
#14525: Fix false positives for Style/RedundantRegexpEscape when an escaped variable sigil follows # (e.g., /#\@​foo/, /#\@​@​bar/, /#\$baz/). ([@koic][])
[#14
Configuration
📅 Schedule: (UTC)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.36.0→1.86.1Release Notes
rubocop/rubocop (rubocop)
v1.86.1Compare Source
Bug fixes
Style/AccessModifierDeclarationsinline autocorrect dropping comments between the access modifier and the following method definition. ([@dduugg][])Lint/DuplicateMethodsfalse positives for anonymous classes in constant assignments and method return values. ([@eugeneius][])Lint/DuplicateMethodsfalse positives with anonymous classes inside blocks (e.g. RSpeclet,describe). ([@ShkumbinDelija][])included_modulesfromStyle/ModuleMemberExistenceCheck. ([@koic][])Style/RedundantLineContinuationwhen using interpolated string literals. ([@koic][])file_to_include?when a relativeIncludepattern matches a parent directory name in the absolute file path. ([@jonas054][])Layout/EmptyLineAfterGuardClausewhen consecutive guard clauses useand return. ([@eugeneius][])Lint/RedundantSafeNavigationwhen chained safe navigation is used in a conditional expression withInferNonNilReceiverenabled. ([@koic][])Style/RedundantParentheseswhen using parentheses around an endless range in assignment. ([@koic][])Style/RedundantParentheseshandling of beginless ranges. ([@oggy][])Lint/Syntaxzero-length diagnostic range for syntax errors at EOF. ([@55728][])Includepath adjustment when local config overrides an inheritedInclude. ([@jonas054][])Layout/EndAlignmentcop error on an emptybegin. ([@viralpraxis][])Layout/LineLengthwhenSplitStringsoption is enabled and__FILE__is used. ([@jeromedalbert][])Lint/UnusedMethodArgumentfalse positive when block argument is used viayield. ([@dduugg][])Changes
Style/OneClassPerFileexcludespec/**/*andtest/**/*by default. ([@koic][])paralleldependency to>= 1.10. ([@koic][])Style/RedundantStructKeywordInitcop by default. ([@koic][])v1.86.0Compare Source
New features
AllowedParentClassesoption toStyle/EmptyClassDefinition. ([@hammadkhan][])AllowedReceiversforStyle/HashLookupMethod. ([@koic][])Bug fixes
Style/ConcatArrayLiteralsautocorrect deleting code for percent literals with interpolation. ([@bbatsov][])Lint/ConstantReassignment. ([@ydakuka][])Lint/DuplicateMethodswhen duplicate methods are defined in anonymous classes and modules not assigned to a constant. ([@Darhazer][])Style/RedundantParentheseswhen redundant parentheses around range literals in block body. ([@koic][])Layout/MultilineMethodCallIndentationwhen method chain is inside a hash pair value passed to a multiline chained method call. ([@ydakuka][])Lint/DuplicateMethodswhen modules blocks are passed as method arguments. ([@5hun-s][])Lint/DuplicateMethodswhen the same method is defined in different anonymous module blocks passed to a no-receiver call (e.g.stub_const). ([@Darhazer][])Layout/EmptyLineAfterGuardClausewhen using a guard clause followed by a multi-line guard clause withraise,fail,return,break, ornext. ([@koic][])Layout/RedundantLineBreakwhen settingInspectBlocks: trueand usingrescueorensurein the block. ([@koic][])Style/FileOpenwhen assigningFile.opento an instance variable, class variable, global variable, or constant. ([@koic][])Lint/DuplicateMethodswhen the same method is defined in anonymous module blocks passed to different receivers. ([@koic][])Style/IfWithSemicolonwhenreturnwith value is in theelsebranch. ([@koic][])Style/IfUnlessModifierwhen multipleif/unlessmodifier forms are on the same line inside a collection. ([@ydakuka][])Lint/SafeNavigationChainwhen chaining a method call after safe navigation in the if branch of a ternary. ([@koic][])Layout/EndAlignmentwhenendis followed by||or&&. ([@koic][])Safe/SafeAutoCorrectparameter" when those parameters are set for cops that don't have them in their default configuration. ([@dduugg][])Lint/UselessDefaultValueArgumentwhenfetchwithout a receiver is inside afetchblock. ([@koic][])Style/IfWithSemicolonwhen using single-lineunless/;/end. ([@koic][])Style/NonNilCheckautocorrect for receivers containing spaces. ([@bbatsov][])Style/RaiseArgsto allow anonymous keyword forwarding (raise Ex.new(**)). ([@bbatsov][])Lint/RedundantCopDisableDirectivewhen arubocop:disablecomment is used to suppressLint/EmptyWhen,Lint/EmptyConditionalBody,Lint/EmptyInPattern, orStyle/SymbolProc. ([@eugeneius][])Style/RedundantPercentQfor%qstrings with interpolation-like syntax. ([@bbatsov][])Style/AndOradding unnecessary parentheses aroundreturnwithout arguments. ([@eugeneius][])Lint/UselessConstantScoping. ([@h-lame][])Style/TrailingMethodEndStatementto detect singleton methods (def self.foo). ([@bbatsov][])Changes
MaxFilesInCachetofalseto entirely disable cache pruning. ([@byroot][])Lint/RedundantSafeNavigationaware of safe navigation in conditional true branch. ([@koic][])mcpgem from runtime dependencies. ([@koic][])v1.85.1Compare Source
Bug fixes
Style/FileOpenwhenFile.openis passed as an argument or returned from a method. ([@sferik][])Style/ReduceToHashfalse positive when accumulator is read in key/value. ([@sferik][])Style/RedundantParentheseswhen parenthesizing a range in a block body. ([@koic][])Changes
v1.85.0Compare Source
New features
mise.tomlas source for TargetRubyVersion. ([@kitsane][])Lint/UnreachablePatternBranchcop. ([@sferik][])Style/FileOpencop. ([@sferik][])Style/MapJoincop. ([@sferik][])Style/OneClassPerFilecop. ([@sferik][])Style/PartitionInsteadOfDoubleSelectcop. ([@sferik][])Style/PredicateWithKindcop. ([@sferik][])Style/ReduceToHashcop. ([@sferik][])Style/RedundantMinMaxBycop. ([@sferik][])Style/RedundantStructKeywordInitcop. ([@koic][])Style/SelectByKindcop. ([@sferik][])Style/SelectByRangecop. ([@sferik][])Style/TallyMethodcop. ([@sferik][])Lint/DataDefineOverridecop. ([@bbatsov][])InternalAffairs/ItblockHandlercop. ([@bbatsov][])Bug fixes
Style/EmptyClassDefinition. ([@koic][])Style/NegatedWhilewhen the last expression of anuntilcondition is negated. ([@koic][])Style/EmptyClassDefinitionmessage wording. ([@bbatsov][])Lint/Voidwhennilis used incasebranch. ([@5hun-s][])Style/IfUnlessModifierwhen modifier forms are used inside string interpolations. ([@koic][])Style/HashTransformKeysandStyle/HashTransformValues. ([@sferik][])Lint/Voidforeachblocks where the return value may be meaningful (e.g.,Enumerator#each). ([@sferik][])Layout/IndentationWidthfalse positive for chained method blocks whenEnforcedStyleAlignWithisstart_of_line. ([@krororo][])Lint/Voidto detect void expressions incase/whenbranches. ([@bbatsov][])Parser::ClobberingErrorinLint/UselessAssignmentwhen autocorrecting a useless assignment that wraps a block containing another useless assignment. ([@koic][])Layout/MultilineAssignmentLayoutwhen usingnumblockoritblockwithSupportedTypes: ['block']. ([@bbatsov][])Layout/FirstHashElementIndentation. ([@ydakuka][])Layout/MultilineAssignmentLayout. ([@sanfrecce-osaka][])Lint/RedundantSafeNavigationwhen using&.respond_to?with methods defined onObject(e.g.,:class). ([@bbatsov][])Lint/SafeNavigationConsistencyautocorrect as unsafe. ([@bbatsov][])SyntaxErrorinLint/InterpolationCheckwhen single quoted string contains double quotes with invalid interpolation. ([@ydakuka][])Changes
Style/HashAsLastArrayItemwhen multiline hash elements. ([@koic][])Style/EndlessMethodcop to consider receivers. ([@fatkodima][])class_definitiontoclass_keywordinEnforcedStyleofStyle/EmptyClassDefinition. ([@koic][])String.newwith interpolated strings toStyle/RedundantInterpolationUnfreeze. ([@lovro-bikic][])Style/RedundantParentheses. ([@lovro-bikic][])v1.84.2Compare Source
Bug fixes
Style/BlockDelimiterswhen autocorrecting nested multi-line blocks with adjacent curly braces. ([@koic][])Style/IfUnlessModifierwhen the first value uses a normalifand the others use modifierif. ([@koic][])Layout/FirstArgumentIndentationwhen first arguments are over-indented in nested method calls. ([@koic][])Layout/MultilineMethodCallIndentationwhen a multiline method call follows a hash access. ([@koic][])Layout/MultilineMethodCallIndentationwhen a multiline method call includes a keyword argument whose value is a method call with a block. ([@koic][])Layout/EmptyLinesAfterModuleInclusionwhenincludeis nested inside an array. ([@eugeneius][])Style/FormatStringTokento not autocorrect strings outside of format method context in aggressive mode. ([@ydakuka][])Style/HashAsLastArrayItemwhen an array contains only a single hash element. ([@koic][])Style/MethodDefParentheseswhen using splat or forwarding arguments without parentheses. ([@koic][])Layout/MultilineMethodCallIndentationwhen a multi-dot method chain is inside a hash pair value. ([@ydakuka][])Layout/MultilineMethodCallIndentationwhen a method is chained after a single-line block. ([@ydakuka][])Offense#highlighted_areaforPseudoSourceRangelocations. ([@rafaelfranca][])Style/IfUnlessModifierwhen the first value uses a normalifand the others use ternary operator. ([@koic][])v1.84.1Compare Source
Bug fixes
Layout/IndentationWidthcop. ([@viralpraxis][])Style/NegativeArrayIndexwhen usingselfas array with implicitselfreceiver. ([@koic][])Style/GuardClausewhen using heredoc as an argument of method call in raise inelsebranch. ([@koic][])Style/IfUnlessModifierwhen multipleif/unlessstatements share the same line in arrays, method arguments, or hash values. ([@ydakuka][])Layout/FirstArgumentIndentationandLayout/LineLengthwhen correcting method chains. ([@ydakuka][])Layout/MultilineMethodCallIndentationto properly handle method chains inside hash pair values. ([@ydakuka][])Changes
infinite?method to the allowlists forNaming/PredicateMethod,Style/IfWithBooleanLiteralBranches, andStyle/RedundantCondition, in addition to the existingnonzero?. ([@koic][])v1.84.0Compare Source
New features
AllowImplicitArrayLiteralstoLayout/FirstArrayElementLineBreak. ([@koic][])Style/ReverseFindcop. ([@koic][])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][])Style/HashLookupMethodcop to enforceHash#[]vsHash#fetchpreference. ([@sferik][])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][])TargetRubyVersion 4.1(experimental). ([@koic][])Bug fixes
CategoriesforLayout/ClassStructure. ([@fatkodima][])Style/GuardClausewhen using heredoc as an argument of raise inelsebranch andifbranch is empty. ([@koic][])Style/HashLookupMethodcop when there's no receiver. ([@viralpraxis][])ruby_extractorwhen usingoffset: 0and different source buffers. ([@ydakuka][])Style/RedundantConditionwhen the branches contains constant assignment. ([@koic][])--force-default-confignot preventing project config loading when used with options that access configuration. ([@sakuro][])Style/HashSyntaxwhen shorthand syntax is used in condition ofif/unless/while/until. ([@ydakuka][])Layout/IndentationWidthby adding a newEnforcedStyleAlignWithstyle parameter. ([@MikeMcQuaid][])Layout/LineLengthwhenSplitStringsoption is enabled and strings span multiple lines. ([@HariprasanthMSH][])Layout/IndentationWidthandLayout/IndentationConsistencywhen usingEnforcedStyle: indented_internal_methodswith method chain blocks. ([@ydakuka][])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][])Layout/FirstArgumentIndentationto correct entire method calls and chains for nested calls. ([@ydakuka][])Offense#highlighted_areato return a validParser::Source::Range. ([@ydakuka][])Security/JSONLoadwhencreate_additionsoption is passed with other options in a hash. ([@wktk][])Changes
squishandsquish!applied to heredoc toLayout/HeredocIndentation. ([@lovro-bikic][])Forwardablemethods inLint/DuplicateMethods. ([@lovro-bikic][])Lint/RedundantSplatExpansionaware of constant assignment. ([@koic][])Style/AccessModifierDeclarationsaware of self class. ([@koic][])Modulemember existence methods toStyle/ModuleMemberExistenceCheck. ([@lovro-bikic][])AllowedMethodsconfiguration toStyle/ModuleMemberExistenceCheck. ([@lovro-bikic][])v1.82.1Compare Source
Bug fixes
Style/TrailingCommaInArgumentswhenEnforcedStyleForMultilineisconsistent_commaand keyword arguments use a trailing comma. ([@koic][])Layout/RedundantLineBreakwhenLayout/LineLengthis disabled. ([@ydakuka][])Layout/LineLengthis disabled. ([@floriandejonckheere][])Layout/MultilineMethodCallIndentationwhen multiline method chain with block has expected indent width and the method is preceded by splat or double splat. ([@koic][])Layout/IndentationWidthfor multiline method chain blocks. ([@rscq][])Lint/UselessAssignmentwhen a variable is assigned in loop body and used in loop condition. ([@ydakuka][])v1.82.0Compare Source
New features
AllowRBSInlineAnnotationoption toLayout/LineLength. ([@koic][])IncludedMacroPatternsconfiguration option toStyle/MethodCallWithArgsParenthesesfor pattern-based macro method enforcement. ([@mmenanno][])Style/ModuleMemberExistenceCheck. ([@lovro-bikic][])TargetRubyVersion 4.0(experimental). ([@koic][])Bug fixes
Lint/LiteralAsConditionwhen there are literals in multiple branches. ([@viralpraxis][])rake rubocop:auto_correcttask. ([@koic][])Lint/RedundantSplatExpansionwhen splatting a single literal. ([@earlopain][])Layout/RescueEnsureAlignmentwhen using self class definition. ([@koic][])Lint/NoReturnInBeginEndBlockswhen assigning instance variable, class variable, global variable, or constant. ([@koic][])Layout/EmptyLineAfterGuardClausewhen a guard clause follows a multiline heredoc in a parenthesized method call. ([@koic][])Layout/EndAlignmentwhen a conditional assignment is used on the same line and theendwith a safe navigation method call is aligned. ([@koic][])Layout/EndAlignmentwhen a conditional assignment is used on the same line and theendwith a numbered block oritblock method call is aligned. ([@koic][])Lint/RedundantSafeNavigationwhen the receiver is used outside the singleton method definition scope. ([@koic][])Style/EndlessMethodwhen multiline or xstring heredoc is used in method body. ([@koic][])Style/TrailingCommaInArgumentswhenEnforcedStyleForMultilineis set toconsistent_commaand a multiline braced hash argument appears after another argument. ([@koic][])OptionParsererrors when runningrubocopwith input that causes an error. ([@dvandersluis][])Layout/LineLengthis disabled. ([@koic][])Style/ClassAndModuleChildrento skip compact style definitions inside another class or module whenEnforcedStyle: nested. ([@rscq][])Layout/EndAlignmentwithEnforcedStyleAlignWith: variableto handle conditionals insidebeginnodes properly. ([@dvandersluis][])Changes
Lint/UselessOr. ([@r7kamura][])Severityfrom configuration parameters. ([@r7kamura][])Style/CaseEqualityallow regexp case equality where the receiver is a regexp literal. ([@koic][])Lint/CircularArgumentReferenceto detect offenses within long assignment chains. ([@viralpraxis][])Gemspec/RubyVersionGlobalsUsageaware ofRuby::VERSION. ([@koic][])Layout/EmptyLineAfterMagicCommentaware of# rbs_inlinemagic comment. ([@koic][])Lint/ElseLayoutallow a single-lineelsebody inthensingle-line conditional. ([@koic][])Lint/RedundantRequireStatementaware ofpathnamewhen analyzing Ruby 4.0. ([@koic][])Lint/UnreachableCodeaware of singleton method redefinition. ([@koic][])Style/RedundantArgumentaware ofto_i. ([@koic][])IgnoreCopDirectivestoAllowCopDirectivesinLayout/LineLength. ([@koic][])v1.81.7Compare Source
Bug fixes
Layout/HashAlignmentwhenEnforcedStyle: with_fixed_indentationis specified forLayout/ArgumentAlignment. ([@koic][])Naming/PredicateMethodwhen using aninpattern with empty parentheses body. ([@koic][])Style/SoleNestedConditionalwhen using nested single lineif. ([@koic][])Style/ConstantVisibilitywhen visibility is declared with multiple constants. ([@koic][])Style/FloatDivisionwhen usingRegexp.last_matchor nth reference (e.g.,$1). ([@koic][])Naming/MethodNamewhen the first argument toaliascontains interpolation. ([@earlopain][])v1.81.6Compare Source
Bug fixes
Lint/SelfAssignmentwhen using[]=assignment with no arguments. ([@koic][])Style/ArrayIntersectwhenintersection(other).any?is called without a receiver. ([@koic][])Style/ConditionalAssignmentis configured withassign_inside_conditionaland the conditional contains a multi-line regex. ([@martinemde][])Style/RedundantInterpolationwhen using a one-line=>pattern matching. ([@koic][])Style/EndlessMethodwhen heredoc is used in method body. ([@koic][])Style/EndlessMethodwhen the endless method would exceed the maximum line length. ([@koic][])Lint/EmptyInterpolationwhen interpolation is inside a%Wliteral. ([@dvandersluis][])Style/RedundantFormatfalse positive when a interpolated value is given to a specifier with a width or precision. ([@dvandersluis][])Style/RedundantFormathandling control characters like\n. ([@dvandersluis][])Style/Semicolonwhen a method call using hash value omission without parentheses is terminated with a semicolon. ([@koic][])Security/JSONLoadwhencreate_additionsis explicitly specified. ([@earlopain][])Changes
Lint::ConstantOverwrittenInRescuecop to detect offenses within fully qualified constants. ([@viralpraxis][])Lint/ConstantOverwrittenInRescuecop to detect offenses within nested constants. ([@viralpraxis][])Lint/ConstantOverwrittenInRescueto detect any constant assignment. ([@viralpraxis][])Style/LambdaCallautocorrection contextual. ([@koic][])v1.81.1Compare Source
Bug fixes
Lint/DeprecatedOpenSSLConstantwhenCipherappears twice. ([@koic][])Changes
Style/NumberedParametersandStyle/ItBlockParameterwithEnforcedStyle: allow_single_linewhen the block itself is on a single line. ([@earlopain][])v1.81.0Compare Source
New features
Style/ArrayIntersectWithSingleElementcop. ([@r7kamura][])EnforcedStyleForMultiline: diff_commainStyle/TrailingCommaInArguments. ([@akouryy][])Bug fixes
Style/NilComparisoncop when using thevar.==(nil)andvar.===(nil)syntax. ([@viralpraxis][])Style/ExplicitBlockArgumentwhen there are two methods that share the same implementation. ([@earlopain][])Style/NumberedParametersandStyle/ItBlockParameterwhen using multiline method chain withEnforcedStyle: allow_single_line. ([@koic][])Layout/MultilineOperationIndentationwhen using indented code on LHS of equality operator in modifier method definition. ([@koic][])Layout/EmptyLineBetweenDefsforAllowAdjacentOneLineDefs: falseandDefLikeMacrosthat take no block. ([@earlopain][])EnforcedStyle: allowed_in_returnsand!!appears across multiple lines in return position. ([@koic][])Style/RedundantParentheseswhen parentheses are used around a one-linerescueexpression as a condition. ([@koic][])Style/RedundantRegexpEscapewhen an escaped variable sigil follows#(e.g.,/#\@​foo/,/#\@​@​bar/,/#\$baz/). ([@koic][])Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.