relnotes/v1.90.0.md
AllowTrailingComment option to Style/DisableCopsWithinSourceCodeDirective. (@bbatsov)disable-next directives scoped to the following statement. (@bbatsov)--display-suppressed option to also report offenses suppressed by directive comments, including their -- justification in the JSON formatter. (@bbatsov)Lint/ArgumentMismatch cop. (@bbatsov)Lint/SuperArgumentMismatch cop. (@bbatsov)Style/TimeNow cop. (@Starlexxx)NumberOfEmptyLines option to Layout/EmptyLineAfterMagicComment to configure the minimum number of empty lines required after magic comments. (@alejofraga)--report-unused-todo-entries to catch rotting todo files. (@bbatsov)Style/DirectiveScope cop to flag disable/enable pairs and disable-only push/pop scopes that wrap a single statement and can use disable-next instead. (@bbatsov)Lint/RedundantCopEnableDirective flag # rubocop:pop directives without a matching # rubocop:push. (@bbatsov)Lint/NameTypo and Lint/UnusedPrivateMethod on string literals with invalid encoding. (@bbatsov)Lint/OutOfRangeRegexpRef when a preceding element access with a non-string literal argument (e.g. hash[:key]) discarded the tracked capture count. (@koic)--disable-uncorrectable. (@bbatsov)workspace/executeCommand request has no document URI in its arguments. (@koic)Naming/BinaryOperatorParameterName. (@bbatsov)Style/Sample when shuffle is given a random: argument; the offense is still reported but no longer autocorrected, since shuffle and sample consume a seeded generator differently and would select different elements. (@koic)Layout/FirstArgumentIndentation when EnforcedStyle: with_fixed_indentation is specified for Layout/ArgumentAlignment and Layout/FirstMethodArgumentLineBreak is enabled with AllowMultilineFinalElement: true. (@Starlexxx)RuboCop::Cop::IgnoredMethods and RuboCop::Cop::IgnoredPattern being unreachable after require 'rubocop'. (@SeanLF)Layout/ExtraSpacing. (@Starlexxx)Layout/LineLength when a constant path like Http::UploadedFile matches URISchemes case-insensitively. (@koic)Lint/UselessConstantScoping when assigning with Class.new, Module.new, Struct.new, or Data.define after private. (@pdobb)Layout/MultilineMethodCallIndentation when a line has multiple single-line blocks before a multiline block. (@koic)Lint/ConstantReassignment when a constant is assigned in compact-style namespaces (e.g. module A::B). (@alex-tan)Lint/RedundantSafeNavigation when InferNonNilReceiver is enabled and the receiver name is rebound by a nested block (it or a shadowed block parameter). (@koic)RuboCop::Cop::Registry#freeze to freeze its internal collections, so that registering a lazily loaded cop after the freeze fails fast at the registration site instead of corrupting the registry. (@koic)Lint/DuplicateMethods honor silence_redefinition_of_method and redefine_method as intentional redefinitions. (@bbatsov)--display-suppressed reporting a nil justification when the offense is loaded from the result cache. (@corsonknowles)Layout/ClassStructure autocorrection producing a wrong order when an element cannot be moved, and make offenses report the category that actually blocks the expected order. (@koic)Lint/NameTypo registering false positives for names provided by a gem whose namespace the project reopens, and for constants read from a namespace with an unresolved ancestor. (@HoneyryderChuck)Lint/UnusedPrivateMethod retaining every past project_index object it has seen (and the index graph reachable from each), rather than only the most recent one. This caused unbounded memory growth in long-lived processes such as rubocop --server. (@bquorning)Lint/UselessMethodDefinition false positive for methods with **kwargs. (@bbatsov)--lsp and --mcp being silently ignored when the RuboCop server is running: they now start the protocol server in the current process instead of being forwarded to the server as a lint request. (@koic)Exclude settings. (@bbatsov)Layout/LineLength Max when exemptions like AllowedPatterns matched the result. (@bbatsov)AllCops does not support TargetRailsVersion parameter when a plugin declares a custom AllCops key with a nil value and another plugin is loaded after it. (@koic)Style/StringConcatenation autocorrect. (@bbatsov)rubocop . (and other relative directory arguments) needlessly traversing directories excluded by the configuration, which made it much slower than rubocop in projects with large ignored trees. (@bbatsov)Lint/RedundantCopDisableDirective and Lint/RedundantCopEnableDirective leaving a directive's -- reason behind when removing the directive. (@corsonknowles)Lint/UnusedPrivateMethod for private definitions of Ruby runtime hooks like inherited and const_missing. (@bbatsov)Lint/MissingCopEnableDirective suggest # rubocop:pop instead of # rubocop:enable for an unclosed # rubocop:push. (@bbatsov)Lint/UnusedPrivateMethod when a method name is composed with an interpolated symbol or string prefix. (@bbatsov)AllowedCrossFilePaths option to Lint/DuplicateMethods to skip cross-file duplicates in configured paths. (@bbatsov)AllowedNames and AllowedPatterns options to Lint/UnusedPrivateMethod. (@bbatsov)StyleGuide metadata for 21 cops and fix four broken style guide links. (@bbatsov)Lint/DeprecatedReference performance by short-circuiting deprecated?. (@connorshea)Lint/NameTypo performance by deferring the literal-name scan. (@connorshea)AllowForAlignment to no longer treat a same-indentation line beyond the enclosing block as an alignment anchor for Layout/ExtraSpacing, Layout/SpaceAroundOperators, and Layout/SpaceBeforeFirstArg. (@koic)<testcase> elements only for cops enabled for each inspected file, instead of all cops. (@koic)Layout/SpaceAroundOperators aware of endless method definitions. (@koic)Lint/CopDirectiveSyntax catch keyword typos and unknown cop names. (@bbatsov)