Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubocop 1.68.0 → 1.70.0 (minor) #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Jan 17, 2025

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ rubocop (1.68.0 → 1.70.0) · Repo · Changelog

Release Notes

1.70.0

New features

  • #13474: Add new Style/ItAssignment cop to detect local assignments to it inside blocks. (@dvandersluis)
  • #11013: Add new Lint/SharedMutableDefault cop 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_version API to change behavior of a cop at runtime depending on which gem version is present. (@earlopain)

Bug fixes

  • #13589: Fix Lint/NonAtomicFileOperation to detect offenses with fully qualified constants. (@viralpraxis)
  • #13630: Fix CLI --format option to accept fully qualified formatter class names. (@viralpraxis)
  • #13624: Don't show warnings from Lint/Syntax when a syntax error occurs. (@earlopain)
  • #13605: Fix RuboCop::Cop::Util.to_string_literal to work correctly with frozen strings. (@viralpraxis)
  • #12393: Fix false negatives for Lint/Void inside of non-modifier conditionals. (@GabeIsman)
  • #13623: Fix false negatives for Style/MultipleComparison when setting AllowMethodComparison: false and comparing with simple method calls. (@koic)
  • #13644: Fix a false positive for Layout/EmptyLinesAroundAccessModifier when an access modifier and an expression are on the same line. (@koic)
  • #13645: Fix a false positive for Style/MethodCallWithArgsParentheses when setting EnforcedStyle: omit_parentheses and last argument is an endless range. (@earlopain)
  • #13614: Fix false positives for Style/RaiseArgs with anonymous splat and triple dot forwarding. (@earlopain)
  • #13591: Fix false positives for Lint/NestedMethodDefinition when defining a method on a constant or a method call. (@koic)
  • #13594: Fix false positives for Style/MultipleComparison when using multiple safe navigation method calls. (@koic)
  • #13654: Fix false positives for Style/RedundantInitialize when empty initialize method has arguments. (@marocchino)
  • #13608: Fix crash when running rubocop -d on a config with a remote inherit_from that causes a duplicate setting warning. (@dvandersluis)
  • #12430: Fix false negatives in Style/RedundantLineContinuation with multiple line continuations. (@dvandersluis)
  • #13638: Fix false positive for Naming/BlockForwarding when method just returns the block argument. (@mvz)
  • #13599: Fix incorrect autocorrect for Layout/HashAlignment when there is a multiline positional argument and Layout/ArgumentAlignment is configured with EnforcedStyle: with_fixed_indentation. (@dvandersluis)
  • #13586: Fix regression in Layout/SpaceAroundOperators when different comparison operators were aligned with each other. (@dvandersluis)
  • #13603: Fix Lint/LiteralInInterpolation cop error on invalid string literal. (@viralpraxis)
  • #13582: Fix Lint/NonAtomicFileOperation cop error on non-constant receiver. (@viralpraxis)
  • #13598: Fix Lint/Void cop error on if without body. (@viralpraxis)
  • #13634: Fix Style/ClassAndModuleChildren cop error on compact enforced style and unindented body. (@viralpraxis)
  • #13642: Fix Style/FloatDivision cop error if #to_f has implicit receiver. (@viralpraxis)
  • #13517: Fixes Style/HashExcept to recognize safe navigation when ActiveSupportExtensionsEnabled config is enabled. (@lovro-bikic)
  • #13585: Fix Style/HashSyntax cop error on implicit call method. (@viralpraxis)
  • #13632: Fix Style/MissingElse cop error if Style/EmptyElse's EnforcedStyle is not both and if expression contains elsif. (@viralpraxis)
  • #13659: Fix Style/MissingElse cop error if Style/EmptyElse's EnforcedStyle is not both and if expression contains multiple elsif. (@viralpraxis)
  • #13596: Fix Style/RedundantCondition cop error on parentheses and modifier if in else. (@viralpraxis)
  • #13616: Fix incorrect autocorrect for Style/RedundantRegexpArgument when the regex contains a single quote. (@mrzasa)
  • #13619: Fix Style/YodaExpression cop error in case of suffix form of operator. (@viralpraxis)
  • #13578: Update Layout/LineContinuationSpacing to ignore continuations inside a regexp or xstr. (@dvandersluis)
  • #13601: Update Style/SuperArguments to handle super with a block or with a chained method with a block. (@dvandersluis)
  • #13568: Fix NoMethodError in ConfigValidator when a Cop's config is not a Hash and raise ValidationError instead. (@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/SlicingWithRange when calling .[] or &.[] with a correctable range. (@dvandersluis)
  • #13548: Enhance Lint/DuplicateSetElement to detect offences within SortedSet. (@viralpraxis)
  • #13646: Update Layout/TrailingWhitespace to support blank characters other than space and tab. (@krororo)
  • #13652: Update Metrics/MethodLength to make use of AllowedMethods and AllowedPatterns for methods defined dynamically with define_method. (@dvandersluis)
  • #13606: Update Style/AccessModifierDeclarations to add AllowModifiersOnAliasMethod configuration (default true). (@dvandersluis)
  • #13662: Update Style/RedundantSelfAssignment to handle safe navigation on the right-hand side of the assignment. (@dvandersluis)

1.69.2

Bug fixes

  • #13553: Fix an incorrect autocorrect for Style/MultipleComparison when a variable is compared multiple times after a method call. (@koic)
  • #13562: Fix Bundler/DuplicatedGem cop error in case of empty branch. (@viralpraxis)
  • #13573: Fix Lint/UnescapedBracketInRegexp cop failure with invalid multibyte escape. (@earlopain)
  • #13556: Fix false positives for Style/FileNull when using 'nul' string. (@koic)
  • #12995: Fix --disable-uncorrectable to not insert directives inside a string. (@dvandersluis)
  • #13320: Fix incorrect autocorrect when Layout/LineContinuationLeadingSpace and Style/StringLiterals autocorrects in the same pass. (@dvandersluis)
  • #13299: Fix Style/BlockDelimiters to always accept braces when an operator method argument is chained. (@dvandersluis)
  • #13565: Fix Style/RedundantLineContinuation false negatives when a redundant continuation follows a required continuation. (@dvandersluis)
  • #13551: Fix an incorrect autocorrect for Style/IfWithSemicolon when using multi value assignment in if with a semicolon is used. (@koic)
  • #13534: Fix Layout/LineLength cop failure in case of YARD-comment-like string. (@viralpraxis)
  • #13558: Fix Lint/NonAtomicFileOperation cop error in case of implicit receiver. (@viralpraxis)
  • #13564: Fix Metrics/ClassLength cop error in case of chained assignments. (@viralpraxis)
  • #13570: Fix Naming/RescuedExceptionsVariableName cop error when exception is assigned with writer method. (@viralpraxis)
  • #13559: Fix a false positive for Style/RedundantLineContinuation when a method definition is used as an argument for a method call. (@davidrunger)
  • #13574: Fix Style/ExactRegexpMatch cop error on invalid regular expression literal. (@viralpraxis)
  • #13554: Fix Style/FrozenStringLiteralComment false positive in case of non-downcased value literal. (@viralpraxis)
  • #13569: Fix Style/MethodCallWithoutArgsParentheses cop error in case of mass hash assignment. (@viralpraxis)
  • #13542: Fix Style/RedundantCondition cop failure in case of empty arguments. (@viralpraxis)
  • #13509: Update Layout/ExtraSpacing and Layout/SpaceAroundOperators to handle preceding operators inside strings. (@dvandersluis)

1.69.1

Bug fixes

  • #13502: Fix an incorrect autocorrect for Style/DigChain when using safe navigation method chain with dig method. (@koic)
  • #13505: Fix an error for Style/ParallelAssignment when using the anonymous splat operator. (@earlopain)
  • #13184: Fix some false positives in Lint/UnreachableCode. (@isuckatcs)
  • #13494: Fix false positives for Style/HashExcept cop when using reject/!include?, reject/!in? or select/!exclude? combinations. (@lovro-bikic)
  • #13522: Fix Lint/UnescapedBracketInRegexp cop failure with invalid regular expression. (@viralpraxis)
  • #13523: Fix Style::AccessModifierDeclarations cop failure in case of if node without else. (@viralpraxis)
  • #13524: Fix Style/RedundantArgument cop failure while inspecting string literal with invalid encoding. (@viralpraxis)
  • #13528: Fix Style/RedundantParentheses cop failure in case of splatted case node without condition. (@viralpraxis)
  • #13521: Fix Style/RedundantSelf cop failure with kwnilarg argument node. (@viralpraxis)
  • #13526: Fix Style/StringConcatenation cop failure when there are mixed implicit and explicit concatenations. (@viralpraxis)
  • #13511: Fix false positive in Lint/UnescapedBracketInRegexp when using regexp_parser 2.9.2 and earlier. (@dvandersluis)
  • #13096: Update Style/BlockDelimiters to not change braces when they are required for syntax. (@dvandersluis)
  • #13512: Update Style/LambdaCall to be aware of safe navigation. (@dvandersluis)

1.69.0

New features

Bug fixes

  • #13455: Fix a false positive for Layout/EmptyLineAfterGuardClause when using a guard clause outside oneliner block. (@koic)
  • #13412: Fix a false positive for Style/RedundantLineContinuation when 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/IfWithSemicolon when using return with value in if with a semicolon is used. (@koic)
  • #13448: Fix an incorrect autocorrect for Style/IfWithSemicolon when the then body contains an arithmetic operator method call with an argument. (@koic)
  • #13199: Make Style/RedundantCondition skip autocorrection when a branch has a comment. (@koic)
  • #13411: Fix Style/BitwisePredicate when having regular method. (@d4be4st)
  • #13432: Fix false positive for Lint/FloatComparison against nil. (@lovro-bikic)
  • #13461: Fix false positives for Lint/InterpolationCheck when using invalid syntax in interpolation. (@koic)
  • #13402: Fix a false positive for Lint/SafeNavigationConsistency when using unsafe navigation with both && and ||. (@koic)
  • #13434: Fix a false positive for Naming/MemoizedInstanceVariableName for assignment methods`. (@earlopain)
  • #13415: Fix false positives for Naming/MemoizedInstanceVariableName when using initialize_clone, initialize_copy, or initialize_dup. (@koic)
  • #13421: Fix false positives for Style/SafeNavigation when using a method chain that exceeds the MaxChainLength value and includes safe navigation operator. (@koic)
  • #13433: Fix autocorrection for Style/AccessModifierDeclarations for multiple inline symbols. (@dvandersluis)
  • #13430: Fix EmptyLinesAroundMethodBody for methods with arguments spanning multiple lines. (@aduth)
  • #13438: Fix incorrect correction in Lint/Void if an operator is called in a void context using a dot. (@dvandersluis)
  • #13419: Fix Lint/DeprecatedOpenSSLConstant false positive when the argument is a safe navigation method call. (@dvandersluis)
  • #13404: Fix Style/AccessModifierDeclarations to register (as positive or negative, depending on AllowModifiersOnSymbols value) access modifiers with multiple symbols. (@dvandersluis)
  • #13436: Fix incorrect offense and autocorrect for Lint/RedundantSplatExpansion when percent literal array is used in a safe navigation method call. (@lovro-bikic)
  • #13442: Fix an incorrect autocorrect for Style/NestedTernaryOperator when ternary operators are nested and the inner condition is parenthesized. (@koic)
  • #13444: Fix an incorrect autocorrect for Style/OneLineConditional when the else branch of a ternary operator has multiple expressions. (@koic)
  • #13483: Fix an incorrect autocorrect for Style/RedundantRegexpArgument when using escaped double quote character. (@koic)
  • #13497: Fix infinite loop error for Style/IfWithSemicolon when using nested if/;/end in if body. (@koic)
  • #13477: Update Layout/LeadingCommentSpace to accept multiline shebangs at the top of the file. (@dvandersluis)
  • #13453: Update Style/AccessModifierDeclarations to handle attr_* methods with multiple parameters. (@dvandersluis)
  • #12597: Update Style/SingleLineDoEndBlock to not register an offense if it will introduce a conflicting Layout/RedundantLineBreak offense. (@dvandersluis)

Changes

  • #11680: Add autocorrection for strings to Layout/LineLength when SplitStrings is set to true. (@dvandersluis)
  • #13470: Make Style/ArrayIntersect aware of none?. (@earlopain)
  • #13481: Support unicode-display_width v3. (@gemmaro)
  • #13473: Update Lint/ItWithoutArgumentsInBlock to not register offenses in Ruby 3.4. (@dvandersluis)
  • #13420: Update Lint/RedundantSafeNavigation to register an offense when the receiver is self. (@dvandersluis)
  • #11393: Update Lint/UnusedMethodArgument to allow the class names for IgnoreNotImplementedMethods to be configured. (@dvandersluis)
  • #13058: Update Style/AccessModifierDeclarations to accept modifier with splatted method call. (@dvandersluis)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ json (indirect, 2.8.1 → 2.9.1) · Repo · Changelog

Release Notes

2.9.1

What's Changed

  • Add support for Solaris 10 which lacks strnlen()

2.9.0

What's Changed

  • Fix C implementation of script_safe escaping to not confuse some other 3 wide characters with \u2028 and \u2029.
    e.g. JSON.generate(["倩", "瀨"], script_safe: true) would generate the wrong JSON.
  • JSON.dump(object, some_io) now write into the IO in chunks while previously it would buffer the entire JSON before writing.
  • JSON::GeneratorError now has a #invalid_object attribute, making it easier to understand why an object tree cannot be serialized.
  • Numerous improvements to the JRuby extension.

Full Changelog: v2.8.2...v2.9.0

2.8.2

What's Changed

  • JSON.load_file: explictly load the file as UTF-8

Full Changelog: v2.8.1...v2.8.2

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ parser (indirect, 3.3.6.0 → 3.3.7.0) · Repo · Changelog

Release Notes

3.3.7.0 (from changelog)

API modifications:

  • Bump maintenance branches to 3.3.7 (#1061) (Koichi ITO)
  • bump 3.4 branch, remove 3.0 from CI (EOL) (#1057) (Ilya Bylich)
  • assert that version-specific checks actually run against at least one version (#1050) (Earlopain)

Features implemented:

  • ruby34.y: reject return in singleton class (#1048) (Earlopain)

Bugs fixed:

  • Fix ruby-parse with a folder ending in .rb (#1047) (Earlopain)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ regexp_parser (indirect, 2.9.2 → 2.10.0) · Repo · Changelog

Release Notes

2.10.0 (from changelog)

Added

  • #referenced_expressions
    • like #referenced_expression, but for multiplexing backrefs
    • returns the Group expressions that are being referenced

Fixed

  • fixed #char & #codepoint errors for single-digit hex escapes
    • e.g. \xA

2.9.3 (from changelog)

Fixed

  • fixed positive lookbehinds with character ">" being treated as named groups

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ rubocop-ast (indirect, 1.35.0 → 1.37.0) · Repo · Changelog

Release Notes

1.37.0 (from changelog)

New features

  • #341: Make RuboCop::AST::IfNode support then?. (@koic)

Changes

  • #343: Add StrNode#single_quoted?, StrNode#double_quoted? and StrNode#percent_literal? to simplify checking for string delimiters. (@dvandersluis)

1.36.2 (from changelog)

Bug fixes

1.36.1 (from changelog)

Bug fixes

  • #339: Do not emit a deprecation warning for EnsureNode#body to give RuboCop a chance to update its usage. EnsureNode#body will still be changed in the next major version of rubocop-ast. (@earlopain)

1.36.0 (from changelog)

Changes

  • #337: Deprecate EnsureNode#body in favour of EnsureNode#branch. EnsureNode#body will be redefined in the next major version of rubocop-ast. (@dvandersluis)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ unicode-display_width (indirect, 2.6.0 → 3.1.4) · Repo · Changelog

Release Notes

3.1.4 (from changelog)

  • Fix that skin tone modifiers were ignored when used in a non-ZWJ sequence context (= single emoji char + modifier) #29
  • Add more docs and specs about modifier handling

3.1.3 (from changelog)

Better handling of non-UTF-8 strings, patch by @Earlopain:

  • Data with BINARY encoding is interpreted as UTF-8, if possible
  • Use invalid: :replace and undef: :replace options when converting to UTF-8

3.1.2 (from changelog)

  • Performance improvements

3.1.1 (from changelog)

  • Performance improvements

3.1.0 (from changelog)

Improve Emoji support:

  • Emoji modes: Differentiate between well-formed Emoji (:possible) and any ZWJ/modifier sequence (:all). The latter is more common and more efficient to implement.
  • Unify rgi_{fqe,mqe,uqe} options to just :rgi to keep things simpler (corresponds to the former :rgi_uqe option). Most terminals that want to support the RGI set will probably want to catch Emoji sequences with missing VS16s.
  • Add new :all_no_vs16 and :rgi_at modes to be able to support some terminals that needs these quirks
  • Add alias emoji: :auto for emoji: true and emoji: :none for emoji: false
  • :auto mode: Only consider terminal cells when recommending Emoji support level (Emoji themselves might display differently)
  • :auto mode: Set default Emoji mode for unknown/unsupported terminals to :none
  • Rename :basic mode to :vs16

3.0.1 (from changelog)

  • Add WezTerm and foot as good Emoji terminals

3.0.0 (from changelog)

Rework Emoji support:

  • Emoji widths are now enabled by default
  • Only reduce Emoji width to 2 when RGI Emoji detected (configurable)
  • VS16 turns Emoji characters of width 1 into full-width
  • Please note that Emoji parsing has a notable impact on performance. You can use the emoji: false option to disable Emoji adjustments
  • Tries to detect terminal's Emoji support level automatically (from ENV vars)

Index fixes and updates:

  • Private-use characters are considered ambiguous (were given width 1 before)
  • Fix that a few zero-width ignorable codepoints from recent Unicode were missing
  • Consider the following separators to be zero-width:
    • U+2028 - LINE SEPARATOR - Zl
    • U+2029 - PARAGRAPH SEPARATOR - Zp

Other:

  • Add keyword arguments to Unicode::DisplayWidth.of. If you are using a hash with overwrite values as third parameter, be sure to put it in curly braces.
  • Using third parameter or explicit hash as fourth parameter is deprecated, please migrate to the keyword arguments API
  • Gem raises ArgumentError for ambiguous values other than 1 or 2
  • Performance optimizations
  • Require Ruby 2.5

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🆕 unicode-emoji (added, 4.0.4)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot requested a review from epistrephein as a code owner January 17, 2025 08:16
@depfu depfu bot added the dependencies Libraries depended upon label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Libraries depended upon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant