chore(deps): update dependency rubocop to v1.75.2#2455
Merged
Conversation
tido64
approved these changes
Apr 28, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.69.2->1.75.2Release Notes
rubocop/rubocop (rubocop)
v1.75.2Compare Source
Changes
Lint/RedundantTypeConversionto register an offense forto_json.to_s. ([@lovro-bikic][])Bug fixes
Lint/DeprecatedOpenSSLConstantcipher constant argument is notcbc. ([@koic][])Style/RedundantConditionwhen true is used as the true branch and the condition takes arguments. ([@koic][])Lint/ReturnInVoidContextwhen returning insidedefine_methodor a nested singleton method. ([@earlopain][])Style/ConditionalAssignmentcop error on dynamic string node in branch. ([@viralpraxis][])Style/FrozenStringLiteralCommentcop errors on emacs-styled magic comment. ([@viralpraxis][])v1.75.1Compare Source
Changes
EnforcedStyle: allow_named_parametertoEnforcedStyle: only_numbered_parametersinStyle/ItBlockParameter. ([@koic][])v1.75.0Compare Source
New features
Style/HashFetchChaincop to detect chainedfetchcalls that can be replaced with a single call todig. ([@dvandersluis][])Style/ItBlockParametercop. ([@koic][])itblock parameter inLayoutcops. ([@koic][])itblock parameter inLintcops. ([@koic][])itblock parameter inMetricscops. ([@koic][])itblock parameter inStylecops. ([@koic][])TargetRubyVersion: 3.5(experimental). ([@earlopain][])Bug fixes
Style/HashFetchChainwhen no arguments are given tofetch. ([@koic][])Layout/MultilineMethodParameterLineBreakswhen class method definitions are used. ([@vlad-pisanov][])Layout/LineLengthwhen autocorrecting class method definitions. ([@vlad-pisanov][])Layout/SpaceAroundOperatorsandLayout/HashAlignmentwithEnforcedHashRocketStylebeing an array containingtable. ([@dvandersluis][])InternalAffairs/RedundantDescribedClassAsSubjectcop error on missingdescribe. ([@viralpraxis][])Lint/ShadowingOuterLocalVariablewhen block local variable is used inside a condition. ([@lovro-bikic][])Lint/UselessAssignmentwhen a variable is reassigned in a different branch. ([@eugeneius][])Style/SoleNestedConditional. ([@lovro-bikic][])Style/IfInsideElse. ([@lovro-bikic][])Changes
doesas a forbidden prefix toNaming/PredicateName. ([@dvandersluis][])ForbiddenIdentifiersandForbiddenPatternsconfig options toNaming/MethodNamecop. ([@tejasbubane][])Array#intersectiontoStyle/ArrayIntersect. ([@dvandersluis][])prismtranslation layer to analyze Ruby 3.4+ by default. ([@earlopain][])Style/RedundantParenthesesto offend parentheses for chained&&expressions. ([@lovro-bikic][])AllowConsecutiveConditionalssetting toStyle/Nextto allow consecutive conditional statements. ([@vlad-pisanov][])Style/RedundantFormatto register offenses when the only argument toformatorsprintfis a constant. ([@dvandersluis][])v1.74.0Compare Source
New features
Style/ComparableBetween. ([@lovro-bikic][])Style/CommentedKeyword. ([@dak2][])Bug fixes
Lint/SharedMutableDefaultwhencapacitykeyword argument is used. ([@koic][])Style/DoubleNegationwhen callingdefine_method/define_singleton_methodwith a numblock. ([@earlopain][])Lint/ReturnInVoidContextwhen returning out of a block. ([@earlopain][])Lint/UselessConstantScopingfor constants defined inclass << self. ([@earlopain][])Lint/NonLocalExitFromIteratorwith numblocks. ([@earlopain][])Style/RedundantCurrentDirectoryInPathwhen using a complex current directory path inrequire_relative. ([@koic][])Lint/LiteralAsConditionwhen the literal is followed byreturn,break, ornext. ([@earlopain][])Style/MethodCallWithArgsParentheseswithEnforcedStyle: omit_parenthesesstyle and numblocks. ([@earlopain][])rubocop-railsorrubocop-performanceextraction, even if they are already part of the Gemfile. ([@earlopain][])Lint/RedundantCopDisableDirectiveto register an offense when cop names are given with improper casing. ([@dvandersluis][])Style/RescueModifierwhen using parallel assignment and the right-hand-side is not a bracketed array. ([@earlopain][])Changes
EnforcedStyleForClassesandEnforcedStyleForModulesconfiguration options toStyle/ClassAndModuleChildren. ([@dvandersluis][])Mode: conservativeconfiguration toStyle/FormatStringTokento make the cop only register offenses for strings given toprintf,sprintf,format, and%. ([@dvandersluis][])TLS1_1andTLS1_2by default inNaming/VariableNumberto accommodate OpenSSL version parameter names. ([@koic][])Lint/RedundantTypeConversionaware of redundantto_d. ([@koic][])v1.73.2Compare Source
Bug fixes
Style/InverseMethodswhen usingany?ornone?with safe navigation operator. ([@koic][])Style/RedundantConditionwhen a variable or a constant is used. ([@koic][])Style/RedundantFreezewhen calling methods that produce frozen objects with numblocks. ([@earlopain][])end pattern with unmatched parenthesis: / (RegexpError)on Ruby 3.2.0. ([@dvandersluis][])Style/KeywordParametersOrderwhen the arguments are on multiple lines and contain comments. ([@earlopain][])Changes
Lint/EmptyConditionalBodyto be safe. ([@dvandersluis][])v1.73.1Compare Source
Bug fixes
Lint/MixedCaseRangewhen/[[ ]]/is used. ([@koic][])Lint/EmptyConditionalBodywhen assigning to a variable with only a single branch. ([@earlopain][])Style/RedundantConditionwhen using when true is used as the true branch and the condition is not a predicate method. ([@koic][])Layout/ClosingParenthesisIndentationwhen first parameter is a hash. ([@tejasbubane][])Style/CommentedKeyword. ([@dak2][])Lint/LiteralAsConditionacting on the right hand side of && nodes. ([@zopolis4][])v1.73.0Compare Source
New features
require_alwaysoption toStyle/EndlessMethod. ([@koic][])require_single_lineoption toStyle/EndlessMethod. ([@jtannas][])Bug fixes
Style/RedundantSelfAssignmentwhen the method receives a block. ([@vlad-pisanov][])Lint/MixedCaseRangeis enabled. ([@earlopain][])Lint/Voidwhen using operator method call without argument. ([@koic][])Style/TrivialAccessorswithinstance_evaland numblocks. ([@earlopain][])Style/EndlessMethodwhen using setter method definitions. ([@koic][])Layout/LineLengthwith interpolated strings when not on the first line. ([@dvandersluis][])Layout/EmptyLinesAroundAccessModifierandLayout/EmptyLinesAroundBlockBodywithEnforcedStyle: no_empty_lines. ([@dvandersluis][])Style/AccessorGroupingwith constants. ([@tejasbubane][])Style/RedundantFormatfor annotated template strings with missing hash keys. ([@dvandersluis][])Style/RedundantFormatwhen given double-splatted arguments. ([@dvandersluis][])Style/StringConcatenationwhen numblocks are used. ([@earlopain][])require 'pp'to be redundant forLint/RedundantRequireStatement. ([@earlopain][])Style/HashExceptandStyle/HashSliceto not register an offense if selecting over the hash value. ([@dvandersluis][])Changes
ForbiddenNamesconfiguration toNaming/VariableNameto specify names that are forbidden. ([@dvandersluis][])Lint/LiteralAsConditioncop to check for redundant conditions. ([@zopolis4][])Referenceto common params. ([@sambostock][])Lint/RedundantTypeConversionto not register an offense when given a constructor withexception: false. ([@dvandersluis][])Style/RedundantConditioncop to detect conditional expressions where the true branch istrueand suggest replacing them with a logical OR. ([@datpmt][])v1.72.2Compare Source
Bug fixes
AllCops: Excludeas expected. ([@koic][])Style/RedundantFormatwhen a template argument is used without keyword arguments. ([@koic][])Style/RedundantFormatwhen numeric placeholders is used in the template argument. ([@koic][])ArgumentErrorrelated to two deprecatedAllowedPatternAPIs. ([@koic][])Lint/UselessConstantScopingwhen multiple assigning to constants afterprivateaccess modifier. ([@koic][])Lint/UselessConstantScopingwhen a constant is used afterprivateaccess modifier with arguments. ([@koic][])Changes
Style/RedundantFormatas unsafe autocorrect. ([@koic][])v1.72.1Compare Source
Bug fixes
Style/RedundantParentheseswhen a different expression appears before a range literal. ([@koic][])Lint/RedundantTypeConversionwhen passing block arguments when generating a Hash or a Set. ([@koic][])Changes
v1.72.0Compare Source
New features
Lint/CopDirectiveSyntaxcop. ([@kyanagi][])Lint/SuppressedExceptionInNumberConversioncop. ([@koic][])Lint/RedundantTypeConversioncop. ([@dvandersluis][])Lint/UselessConstantScopingcop. ([@koic][])Style/RedundantFormatcop to check for uses offormatorsprintfwith only a single string argument. ([@dvandersluis][])InternalAffairs/LocationExistscop to check for code that can be replaced withNode#loc?orNode#loc_is?. ([@dvandersluis][])inherit_fromandrequirefor automatically restart. ([@koic][])Naming/PredicateName: Optionally use Sorbet to detect predicate methods. ([@issyl0][])Bug fixes
Style/RedundantParentheseswhen chaining[]method calls. ([@koic][])Style/RedundantParentheseswhen[]method is called with variable or constant receivers. ([@koic][])Style/RedundantParentheseswhen handling range literals with redundant parentheses. ([@koic][])Layout/EmptyLinesAroundMethodBodyfor endless methods. ([@dvandersluis][])Lint/FormatParameterMismatchwhen the width value is interpolated. ([@dvandersluis][])Layout/BlockAlignmentfor blocks that are the body of an endless method. ([@dvandersluis][])v1.71.2Compare Source
Bug fixes
Layout/ElseAlignmentwhenelseis part of a numblock. ([@earlopain][])Lint/UselessAssignmentwhen assigning in branch and block. ([@pCosta99][])Lint/Voidwheneachnumblock with conditional expressions that has multiple statements. ([@earlopain][])Style/ExplicitBlockArgumentwhen using arguments ofzsuperin method definition. ([@koic][])Style/EachWithObjectcop error in case of single block argument. ([@viralpraxis][])Lint/UnmodifiedReduceAccumulatorwhen omitting the accumulator in a nested numblock. ([@earlopain][])v1.71.1Compare Source
Bug fixes
include RuboCop::RSpec::ExpectOffensein rubocop/rspec/support.rb. ([@d4rky-pl][])Lint/AmbiguousBlockAssociationwith numblocks. ([@earlopain][])Lint/ConstantDefinitionInBlockwith numblocks. ([@earlopain][])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][])Layout/EmptyLineBetweenDefswithDefLikeMacrosand numblocks. ([@earlopain][])Style/RedundantParentheseswith numblocks. ([@earlopain][])Style/AccessModifierDeclarationswhen using access modifier in a numblock. ([@earlopain][])Lint/AssignmentInConditionwhen assigning in numblocks. ([@earlopain][])Layout/RedundantLineBreakwhen using numbered block parameter. ([@koic][])Style/SuperArgumentswhen calling super in a numblock. ([@earlopain][])Lint/UnreachableCodewithinstance_evalnumblock. ([@earlopain][])Style/RedundantSelfAssignmentwhen assigning to attribute ofself. ([@koic][])Style/HashExceptandStyle/HashSlicewhen checking for inclusion with a range. ([@dvandersluis][])Layout/ExtraSpacingwithForceEqualSignAlignment: truefor endless methods. ([@dvandersluis][])Style/IdenticalConditionalBranchesautocorrect when condition is inside assignment. ([@dvandersluis][])Layout/SingleLineBlockChainwith numblocks. ([@earlopain][])Style/SoleNestedConditionalwhen using numblocks. ([@earlopain][])v1.71.0Compare Source
New features
Lint/ArrayLiteralInRegexpcop. ([@dvandersluis][])Style/HashSlicecop. ([@lovro-bikic][])Bug fixes
Style/FrozenStringLiteralCommentwhen using the frozen string literal magic comment in Active Admin's arb files. ([@koic][])rubocop_cacheto the path given by--cache-rootwhen pruning cache. ([@capncavedan][])Lint/OutOfRangeRegexpRefwhen matching withmatchusing safe navigation. ([@koic][])Style/BlockDelimiterswhen using brace blocks as conditions underEnforcedStyle: semantic. ([@koic][])Style/RedundantLineContinuationwhen the continuation is preceded by an interpolated string. ([@dvandersluis][])Style/RedundantLineContinuationwhen the continuation is followed by a percent array. ([@dvandersluis][])Style/RedundantLineContinuationwhen the ruby code ends with a commented continuation. ([@dvandersluis][])Style/ArrayFirstLastwhen calling.[]or&.[]with 0 or -1. ([@dvandersluis][])Lint/SafeNavigationChainwhen adding safe navigation to an operator call inside a hash. ([@dvandersluis][])Style/IfUnlessModifierwhen using omitted hash values in an assignment. ([@elliottt][])Style/SoleNestedConditional. ([@tejasbubane][])Style/RedundantLineContinuationwhen calling methods with fully qualified constants. ([@earlopain][])Style/ConditionalAssignmentcop error onunlesswithoutelseandassign_inside_conditionenforced style. ([@viralpraxis][])Style/FrozenStringLiteralCommentcop error on unnormalized magic comment andneverenforced style. ([@viralpraxis][])Metrics/CollectionLiteralLengthto only register for[]when called onSet. ([@dvandersluis][])Changes
Lint/FloatComparison. ([@dvandersluis][])Layout/MultilineMethodCallBraceLayout. ([@dvandersluis][])Layout/MultilineMethodArgumentLineBreaks. ([@dvandersluis][])Security/CompoundHash. ([@dvandersluis][])Style/BlockDelimiters. ([@dvandersluis][])Style/CollectionMethods. ([@dvandersluis][])Style/MapToSet. ([@dvandersluis][])Style/MethodCallWithoutArgsParentheses. ([@dvandersluis][])Lint/NumericOperationWithConstantResult. ([@dvandersluis][])Lint/RedundantStringCoercion. ([@dvandersluis][])Lint/UselessNumericOperation. ([@dvandersluis][])--show-cops. ([@kyanagi][])Style/RedundantParenthesesaware of parenthesized assignment. ([@koic][])Style/RedundantLineContinuationto handle required continuations followingsuper. ([@dvandersluis][])v1.70.0Compare Source
New features
Style/ItAssignmentcop to detect local assignments toitinside blocks. ([@dvandersluis][])Lint/SharedMutableDefaultcop to alert on mutable Hash defaults. ([@corsonknowles][])Lint/ConstantReassignment. ([@lovro-bikic][])target_gem_versionAPI to change behavior of a cop at runtime depending on which gem version is present. ([@earlopain][])Bug fixes
Lint/NonAtomicFileOperationto detect offenses with fully qualified constants. ([@viralpraxis][])--formatoption to accept fully qualified formatter class names. ([@viralpraxis][])Lint/Syntaxwhen a syntax error occurs. ([@earlopain][])RuboCop::Cop::Util.to_string_literalto work correctly with frozen strings. ([@viralpraxis][])Lint/Voidinside of non-modifier conditionals. ([@GabeIsman][])Style/MultipleComparisonwhen settingAllowMethodComparison: falseand comparing with simple method calls. ([@koic][])Layout/EmptyLinesAroundAccessModifierwhen an access modifier and an expression are on the same line. ([@koic][])Style/MethodCallWithArgsParentheseswhen settingEnforcedStyle: omit_parenthesesand last argument is an endless range. ([@earlopain][])Style/RaiseArgswith anonymous splat and triple dot forwarding. ([@earlopain][])Lint/NestedMethodDefinitionwhen defining a method on a constant or a method call. ([@koic][])Style/MultipleComparisonwhen using multiple safe navigation method calls. ([@koic][])Style/RedundantInitializewhen empty initialize method has arguments. ([@marocchino][])rubocop -don a config with a remoteinherit_fromthat causes a duplicate setting warning. ([@dvandersluis][])Style/RedundantLineContinuationwith multiple line continuations. ([@dvandersluis][])Naming/BlockForwardingwhen method just returns the block argument. ([@mvz][])Layout/HashAlignmentwhen there is a multiline positional argument andLayout/ArgumentAlignmentis configured withEnforcedStyle: with_fixed_indentation. ([@dvandersluis][])Layout/SpaceAroundOperatorswhen different comparison operators were aligned with each other. ([@dvandersluis][])Lint/LiteralInInterpolationcop error on invalid string literal. ([@viralpraxis][])Lint/NonAtomicFileOperationcop error on non-constant receiver. ([@viralpraxis][])Lint/Voidcop error onifwithout body. ([@viralpraxis][])Style/ClassAndModuleChildrencop error oncompactenforced style and unindented body. ([@viralpraxis][])Style/FloatDivisioncop error if#to_fhas implicit receiver. ([@viralpraxis][])Style/HashExceptto recognize safe navigation whenActiveSupportExtensionsEnabledconfig is enabled. ([@lovro-bikic][])Style/HashSyntaxcop error on implicitcallmethod. ([@viralpraxis][])Style/MissingElsecop error ifStyle/EmptyElse'sEnforcedStyleis notbothandifexpression containselsif. ([@viralpraxis][])Style/MissingElsecop error ifStyle/EmptyElse'sEnforcedStyleis notbothandifexpression contains multipleelsif. ([@viralpraxis][])Style/RedundantConditioncop error on parentheses and modifierifinelse. ([@viralpraxis][])Style/RedundantRegexpArgumentwhen the regex contains a single quote. ([@mrzasa][])Style/YodaExpressioncop error in case of suffix form of operator. ([@viralpraxis][])Layout/LineContinuationSpacingto ignore continuations inside aregexporxstr. ([@dvandersluis][])Style/SuperArgumentsto handlesuperwith a block or with a chained method with a block. ([@dvandersluis][])NoMethodErrorinConfigValidatorwhen a Cop's config is not aHashand raiseValidationErrorinstead. ([@amomchilov][])Changes
Style/ObjectThen. ([@dvandersluis][])Layout/HashAlignment. ([@dvandersluis][])Layout/HeredocArgumentClosingParenthesis. ([@dvandersluis][])Layout/LineLength. ([@dvandersluis][])Style/SendWithLiteralMethodName. ([@dvandersluis][])Lint/NumericOperationWithConstantResult. ([@earlopain][])Style/SlicingWithRangewhen calling.[]or&.[]with a correctable range. ([@dvandersluis][])Lint/DuplicateSetElementto detect offences withinSortedSet. ([@viralpraxis][])Layout/TrailingWhitespaceto support blank characters other than space and tab. ([@krororo][])Metrics/MethodLengthto make use ofAllowedMethodsandAllowedPatternsfor methods defined dynamically withdefine_method. ([@dvandersluis][])Style/AccessModifierDeclarationsto addAllowModifiersOnAliasMethodconfiguration (defaulttrue). ([@dvandersluis][])Style/RedundantSelfAssignmentto handle safe navigation on the right-hand side of the assignment. ([@dvandersluis][])Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) in timezone Europe/Oslo, 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.
This PR was generated by Mend Renovate. View the repository job log.