relnotes/v1.89.0.md
DelegatingMethods option to Lint/DuplicateMethods to register custom delegate-shaped methods. (@bbatsov)DisallowedCops configuration option to Style/DisableCopsWithinSourceCodeDirective. (@hammadxcm)AllowYARDCommentBlockSeparator option to Layout/LeadingCommentSpace. (@koic)Lint/DeprecatedReference cop to detect references to methods and constants documented as @deprecated, powered by the project index. (@bbatsov)Lint/NameTypo cop. (@bbatsov)Lint/UnusedPrivateMethod cop for project-wide dead-code detection via the project index (disabled by default). (@bbatsov)Style/DisableCopsWithinSourceCodeDirective impossible to disable via directive comments when explicitly enabled with Enabled: true. (@rafaelfranca)textDocument/codeAction requests in the built-in language server, so LSP clients that request code actions (Eglot, Helix, Flycheck, ...) can apply RuboCop's autocorrects, not only clients that read them off the published diagnostic. (@bbatsov)NewCops in department configuration to enable pending cops per department, including cops added up to a specific version (e.g. Style: NewCops: '1.19'). (@koic)Layout/IndentationWidth and Style/ClassAndModuleChildren. (@ioquatix, @koic)Lint/ToEnumArguments when explicit extra keyword arguments are passed (e.g. def m(x:); to_enum(:m, x: x, y: 1); end), which raises ArgumentError when the enumerator is used. (@RedZapdos123)Layout/HashAlignment when using EnforcedHashRocketStyle: table and a hash key spans multiple lines. (@dduugg)Lint/UselessAssignment with modifier conditions. (@bbatsov)Lint/Void with setter methods. (@bbatsov)Naming/VariableNumber when using an empty symbol hash key. (@koic)Style/MutableConstant with Data.define. (@bbatsov)Style/MissingRespondToMissing when respond_to_missing? is defined in a reopening of the class and UseProjectIndex is enabled. (@bbatsov)Lint/LiteralAsCondition when a literal condition has an empty branch. (@koic)Lint/UselessRuby2Keywords when ruby2_keywords is used with a symbol but no method definition is found. (@koic)Metrics/MethodLength when a method contains a heredoc and __ENCODING__. (@koic)Style/ArrayIntersect cop when the block-based check calls member?/include? without an explicit receiver. (@dduugg)Style/NegativeArrayIndex cop. (@viralpraxis)Style/RedundantFormat when a format string uses a positional argument number beyond the 64-bit range. (@koic)Style/RedundantFormat when the argument for a positional variable width is missing. (@koic)Lint/LiteralInInterpolation. (@bbatsov)Style/ArrayIntersect when using safe navigation none? with a block. (@koic)Style/MultipleComparison that dropped an allowed method comparison appearing between the compared values. (@bbatsov)Style/RedundantFileExtensionInRequire that produced invalid Ruby when a backslash preceded the .rb extension. (@bbatsov)Lint/Void to no longer autocorrect a constant used in a void context, since removing it can change behavior through constant autoloading side effects. (@bbatsov)Lint/InheritException when Exception is inherited indirectly through a project class (UseProjectIndex). (@bbatsov)Lint/AmbiguousAssignment when using attribute or index assignment. (@sngsmz)Layout/ClassStructure when class body elements are wrapped in begin blocks. (@koic)Layout/ClassStructure when using private_class_method or public_class_method def modifiers. (@koic)Style/ArrayIntersect when the receiver of include? in a block is not an array literal. (@koic)Style/MultilineIfThen when using the Prism parser engine and an elsif without then follows a branch using then with a body on the same line. (@koic)Lint/DuplicateMethods for anonymous classes (Class.new) passed as arguments to the same named-receiver method call (e.g. T.cast). Each Class.new block is an independent class, so methods defined in different blocks should not be treated as duplicates. (@rafaelfranca)Style/RedundantConstantBase inside namespaces when the constant provably resolves identically without :: (UseProjectIndex). (@bbatsov)Style/Lambda and Style/SymbolProc producing a syntax error like ->(x)(&:method) when both cops run on lambda { |x| x.method }. (@koic)UseProjectIndex). (@bbatsov)Layout/LineLength autocorrection for endless methods with block bodies. (@hervetatche)Lint/ConstantReassignment when a built-in constant name is assigned and UseProjectIndex is enabled. (@bbatsov)Style/ClassAndModuleChildren ignoring EnforcedStyleForClasses and EnforcedStyleForModules, and skip autocorrection when mixed per-type styles make the result ambiguous. (@bbatsov)Layout/MultilineMethodCallIndentation when a line has multiple chained calls before a single-line block. (@hammadxcm)Style/RedundantLineContinuation by verifying backslash removal against a reparse of the source instead of hand-written grammar rules. (@bbatsov)Naming/PredicatePrefix and Naming/AccessorMethodName when the method overrides an ancestor method defined in the project (UseProjectIndex). (@bbatsov)Style/StaticClass when the class is subclassed elsewhere in the project (UseProjectIndex). (@bbatsov)Style/MethodCallWithArgsParentheses omit_parentheses style by verifying each omission by reparsing before registering an offense. (@bbatsov)Style/Documentation to accept a reopened class or module documented at another definition site when UseProjectIndex is enabled. (@bbatsov)rubocop-i18n to suggested extensions. (@tejasbubane)executeCommandProvider and the supported code action kinds in the language server's capabilities, so clients can discover the rubocop.formatAutocorrects and rubocop.formatAutocorrectsAll commands. (@bbatsov)AllCops/UseProjectIndex is enabled. (@bbatsov)Lint/AmbiguousBlockAssociation to detect do...end blocks likely intended for enumerable methods in arguments. (@hammadxcm)Layout/LineLength performance on files with large collection literals. (@koic)Style/ConditionalAssignment skip cases it cannot safely rewrite instead of emitting invalid code or erroring on unusual branch shapes. (@bbatsov)Style/IfUnlessModifier offense message when the condition is part of a larger expression. (@rafa-el-souza)Style/DisableCopsWithinSourceCodeDirective performance on large AllowedCops and DisallowedCops lists by matching directives against memoized sets instead of rebuilding an array lookup per comment. (@corsonknowles)Style/RedundantLineContinuation performance on files with many adjacent string literals joined by line continuations. (@koic)Lint/DuplicateMethods to detect duplicates across files when UseProjectIndex is enabled. (@bbatsov)Style/IfUnlessModifier, Style/WhileUntilModifier, Style/GuardClause, and other modifier cops respect Layout/LineLength exemptions (allowed patterns, cop directives, allowed URIs) when checking whether the modifier form fits on one line. (@bbatsov)Lint/SafeNavigationChain autocorrection as unsafe. (@koic)Lint/ConstantResolution to report only genuinely ambiguous constants when UseProjectIndex is enabled. (@bbatsov)Style/RedundantAssignment offenses when there are comments between assignment and reference. (@lovro-bikic)Style/ClassAndModuleChildren autocorrection to consult the project index for the namespace kind and definition sites when UseProjectIndex is enabled. (@bbatsov)Lint/MissingSuper to skip the constructor offense when the project index shows no ancestor defines initialize (UseProjectIndex). (@bbatsov)Style/Copyright to validate AutocorrectNotice only when autocorrection is requested (-a/-A), so plain inspection no longer raises a warning. (@koic)Layout/RedundantLineBreak to verify each correction by reparsing before registering an offense. (@bbatsov)Style/RedundantParentheses to verify each correction by reparsing before registering an offense. (@bbatsov)Style/SoleNestedConditional to only register an offense when its correction is verified to parse. (@bbatsov)