Update dependency rubocop to v1.68.0 #16
Open
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.22.2
->1.68.0
Release Notes
rubocop/rubocop (rubocop)
v1.68.0
Compare Source
New features
Style/BitwisePredicate
cop. ([@koic][])Style/CombinableDefined
cop. ([@dvandersluis][])Style/AmbiguousEndlessMethodDefinition
cop. ([@dvandersluis][])Lint/UnescapedBracketInRegexp
cop. ([@dvandersluis][])AllowSteepAnnotation
config option toLayout/LeadingCommentSpace
. ([@tk0miya][])IgnoreDuplicateElseBranch
option toLint/DuplicateBranch
. ([@fatkodima][])Style/SafeNavigationChainLength
cop. ([@fatkodima][])Style/KeywordArgumentsMerging
cop. ([@fatkodima][])Bug fixes
Style/RedundantLineContinuation
when there is a line continuation at the EOF. ([@koic][])Naming/BlockForwarding
withStyle/ExplicitBlockArgument
. ([@koic][])Style/BlockDelimiters
autocorrection does not move other code between the block and comment. ([@dvandersluis][])Lint/UselessAssignment
cop when there is a useless assignment followed by a block. ([@pCosta99][])Style/MapIntoArray
when using non-splatted arguments. ([@vlad-pisanov][])Layout/SpaceBeforeBrackets
when there is a dot before[]=
. ([@earlopain][])Lint/SafeNavigationConsistency
when using safe navigation on the LHS with operator method on the RHS of&&
. ([@koic][])Style/GuardClause
when using a local variable assigned in a conditional expression in a branch. ([@koic][])Style/RedundantLineContinuation
when required line continuations for&&
is used with an assignment after a line break. ([@koic][])Style/RedundantParentheses
when parentheses are used around method chain withdo
...end
block in keyword argument. ([@koic][])Lint/SafeNavigationChain
when a safe navigation operator is used with a method call as the RHS operand of&&
for the same receiver. ([@koic][])--disable-uncorrectable
to not insert a comment inside a string continuation. ([@dvandersluis][])Lint/UselessAssignment
a multiple assignment orfor
contains an inner assignment. ([@dvandersluis][])Style/BlockDelimiters
whenEnforcedStyle: semantic
is set and used withLayout/SpaceInsideBlockBraces
. ([@koic][])Style/RedundantInterpolationUnfreeze
andStyle/RedundantFreeze
when strings contain interpolated global, instance, and class variables. ([@vlad-pisanov][])Layout/LineLength
from breaking up a method with arguments chained onto a heredoc delimiter. ([@dvandersluis][])--display-only-correctable
and--display-only-safe-correctable
when no offenses are displayed. ([@dvandersluis][])Style/MultipleComparison
whenComparisonsThreshold
exceeds 2. ([@fatkodima][],[@vlad-pisanov][])Lint/NonAtomicFileOperation
when using a postfixunless
for file existence checks before creating a file, in cases withDir.mkdir
. ([@kotaro0522][])PercentLiteralCorrector
to be able to write pairs of delimiters without excessive escaping. ([@dvandersluis][])Style/SafeNavigation
to not autocorrect if the RHS of anand
node is anor
node. ([@dvandersluis][])Style/TernaryParentheses
with asend
node condition, ensure its arguments are parenthesized. ([@dvandersluis][])Changes
rubocop -V
, show the analysis Ruby version of the current directory. ([@earlopain][])v1.67.0
Compare Source
New features
Lint/DuplicateSetElement
cop. ([@koic][])AllowRBSInlineAnnotation
config option toLayout/LeadingCommentSpace
to support RBS::Inline style annotation comments. ([@tk0miya][])rubocop -V
. ([@koic][])Bug fixes
Style/Semicolon
when using a semicolon between a closing parenthesis after a line break and a consequent expression. ([@koic][])Lint/ParenthesesAsGroupedExpression
with compound ranges. ([@gsamokovarov][])Style/BlockDelimiters
when a single line do-end block with an inlinerescue
with a semicolon beforerescue
. ([@koic][])Layout/AccessModifierIndentation
when the access modifier is on the same line as the class definition. ([@koic][])Style/OneLineConditional
when using nested if/then/else/end. ([@koic][])Lint/ImplicitStringConcatenation
withLint/TripleQuotes
when string literals with triple quotes are used. ([@koic][])Style/ArgumentsForwarding
when using only forwarded arguments in brackets. ([@koic][])Style/CombinableLoops
when looping over the same data with different block variable names. ([@koic][])Style/RescueModifier
when using modifier rescue for method call with heredoc argument. ([@koic][])--auto-gen-config
when passing an absolute config path. ([@earlopain][])Style/OperatorMethodCall
with/
operations followed by a parenthesized argument. ([@dvandersluis][])Style/IfUnlessModifier
when multilineif
that fits on one line and using implicit method call with hash value omission syntax. ([@koic][])Style/ArgumentsForwarding
with Ruby 3.0 and optional position arguments. ([@earlopain][])Lint/AmbiguousRange
when using rational literals. ([@koic][])Lint/RedundantSafeNavigation
with namespaced constants. ([@earlopain][])Style/OperatorMethodCall
with named forwarding. ([@earlopain][])Style/AccessModifierDeclarations
whenAllowModifiersOnAttrs: true
and using splat with a percent symbol array, or with a constant. ([@koic][])Style/RedundantLineContinuation
when line continuations with comparison operator and the LHS is wrapped in parentheses. ([@koic][])Style/ArgumentsForwarding
when argument is used inside a block. ([@dvandersluis][])Style/CollectionCompact
when usingdelete_if
. ([@masato-bkn][])regexp
inLint/LiteralInInterpolation
. ([@dvandersluis][])Style/IfWithSemicolon
when single-lineif/;/end
when the then body contains a method call with[]
or[]=
. ([@koic][])Style/HashEachMethods
if the hash is modified within the block. ([@dvandersluis][])TargetRubyVersion
from a gemspec when the gemspec is not named like the folder it is located in. ([@earlopain][])Style/GuardClause
when using heredoc withoutelse
branch. ([@earlopain][])Lint/BigDecimalNew
when using::BigDecimal.new
. ([@earlopain][])Style/MethodCallWithArgsParentheses
withEnforcedStyle: omit_parentheses
and whitespace. ([@earlopain][])Style/RedundantBegin
andStyle/BlockDelimiters
withEnforcedStyle: braces_for_chaining
. ([@earlopain][])Changes
Style/AccessorGrouping
. ([@tk0miya][])AllowedMethods
configuration toLayout/FirstMethodArgumentLineBreak
. ([@dvandersluis][])Style/ArgumentsForwarding
for detecting forwarding of all anonymous arguments. ([@dvandersluis][])Style/CommentedKeyword
. ([@tk0miya][])RuboCop::Cop::Cop
. ([@earlopain][])EnforcedShorthandSyntax: either
by default forStyle/HashSyntax
. ([@koic][])Naming/InclusiveLanguage
when a sole suggestion is set. ([@koic][])Style/SelectByRegexp
aware offilter
in Ruby version 2.6 or above. ([@masato-bkn][])Lint/SafeNavigationConsistency
cop to check that the safe navigation operator is applied consistently and without excess or deficiency. ([@koic][])Style/SafeNavigation
offenses. ([@dvandersluis][])filter/filter!
inStyle/CollectionCompact
. ([@masato-bkn][])Lint/UriRegexp
to avoid obsolete API. ([@koic][])Style/MapIntoArray
to be able to handle arrays created using[].tap
. ([@dvandersluis][])Style/ReturnNilInPredicateMethodDefinition
to detect implicitnil
returns insideif
. ([@dvandersluis][])v1.66.1
Compare Source
Bug fixes
Style/IfWithSemicolon
when using nested single-line if/;/end in block of if/else branches. ([@koic][])Style/EmptyLiteral
withHash.new([])
. ([@earlopain][])Style/EmptyElse
whenAllowComments: true
and the else clause is missing. ([@vlad-pisanov][])Style/MapIntoArray
autocorrection when usingensure
,def
,defs
andfor
. ([@vlad-pisanov][])v1.66.0
Compare Source
New features
StringLiteralsFrozenByDefault
option for correct analysis withRUBYOPT=--enable=frozen-string-literal
. ([@earlopain][])DocumentationExtension
global option to serve documentation with extensions different than.html
. ([@earlopain][])Lint/UselessNumericOperation
cop to check for inconsequential numeric operations. ([@zopolis4][])Style/RedundantInterpolationUnfreeze
cop to check fordup
and@+
on interpolated strings in Ruby >= 3.0. ([@earlopain][])Bug fixes
Lint/ImplicitStringConcatenation
when implicitly concatenating a string literal with a line break and string interpolation. ([@koic][])Style/IdenticalConditionalBranches
when handling empty case branches. ([@koic][])Style/IfWithSemicolon
when a nestedif
with a semicolon is used. ([@koic][])Style/InPatternThen
when using alternative pattern matching deeply. ([@koic][])Style/OneLineConditional
when using if/then/else/end with multiple expressions in thethen
body. ([@koic][])Layout/EmptyLineBetweenDefs
when two method definitions are on the same line separated by a semicolon. ([@koic][])Style/IfWithSemicolon
when a single-lineif/;/end
has an argument in the then body expression. ([@koic][])Style/IfWithSemicolon
when using multiple expressions in theelse
body. ([@koic][])Style/TrailingBodyOnMethodDefinition
when an expression precedes a method definition on the same line with a semicolon. ([@koic][])Layout/BlockAlignment
whenEnforcedStyleAlignWith: either (default)
. ([@koic][])Style/MultipleComparison
when expression with more comparisons precedes an expression with less comparisons. ([@fatkodima][])Layout/EmptyLinesAroundExceptionHandlingKeywords
whenensure
orelse
andend
are on the same line. ([@koic][])Lint/ImplicitStringConcatenation
when there are multiple adjacent string interpolation literals on the same line. ([@koic][])Style/GuardClause
when if clause is empty and correction would not fit on single line because ofLayout/LineLength
. ([@earlopain][])Style/ParallelAssignment
when using__FILE__
. ([@earlopain][])TargetRubyVersion
detection if the gemspec is not valid syntax. ([@earlopain][])Lint/Void
when usingensure
,defs
andnumblock
. ([@vlad-pisanov][])Style/MapIntoArray
when initializing the destination usingArray[]
,Array([])
, orArray.new([])
. ([@vlad-pisanov][])Style/EmptyLiteral
when usingArray[]
,Hash[]
,Array.new([])
andHash.new([])
. ([@vlad-pisanov][])Style/Alias
when using multiplealias
indef
. ([@koic][])Style/EmptyElse
when a comment-onlyelse
is used afterelsif
andAllowComments: true
is set. ([@koic][])Style/MapIntoArray
when splatting. ([@earlopain][])Style/ArgumentsForwarding
when forwarding kwargs/block arg with non-matching additional args. ([@koic][])Style/RedundantCondition
when using modifierif
orunless
. ([@koic][])Lint/Void
when using using frozen literals. ([@vlad-pisanov][])Lint/EmptyConditionalBody
when missingelsif
body withend
on the same line. ([@koic][])Lockfile
parser when it contains incompatibleBUNDLED WITH
versions. ([@earlopain][])TargetRubyVersion
through the gemfile if the gemfile ruby version is below 2.7. ([@earlopain][])Changes
get_!
,set_!
,get_?
,set_?
,get_=
, andset_=
inNaming/AccessorMethodName
. ([@koic][])Lint/UselessAssignment
autocorrection safe. ([@koic][])Style/RedundantRegexpArgument
respect theEnforcedStyle
ofStyle/StringLiterals
. ([@koic][])rexml
gem. ([@bquorning][])RuboCop::AST::RationalNode
. ([@koic][])v1.65.1
Compare Source
New features
Naming/PredicateName
to check that allForbiddenPrefixes
are being checked. ([@maxjacobson][])Bug fixes
Lint/FloatComparison
when comparing with rational literal. ([@koic][])Lint/UselessAssignment
when same name variables are assigned using chained assignment. ([@koic][])Style/InvertibleUnlessCondition
when using empty parenthesis as condition. ([@earlopain][])fileutils
before calculatingbefore_us
. ([@r7kamura][])Lint/ImplicitStringConcatenation
when using adjacent string interpolation literals on the same line. ([@koic][])Style/GlobalStdStream
when using namespaced constants likeFoo::STDOUT
. ([@earlopain][])Style/ZeroLengthPredicate
when using safe navigation and non-zero comparison. ([@fatkodima][])Lint/UselessAssignment
when pattern match variable is assigned and used in a block. ([@koic][])Naming/RescuedExceptionsVariableName
when using hash value omission. ([@koic][])v1.65.0
Compare Source
New features
Gemspec/AddRuntimeDependency
cop. ([@koic][])Bug fixes
Style/ArgumentsForwarding
when arguments forwarding inyield
. ([@koic][])Layout/SpaceAroundOperators
when using multiple spaces between an operator and a tailing comment. ([@koic][])Lint/ToEnumArguments
when enumerator is created for another method. ([@koic][])Style/MethodCallWithArgsParentheses
whenEnforcedStyle: omit_parentheses
is set and parenthesized method call is used before constant resolution. ([@koic][])Style/RedundantBegin
when endless method definition withrescue
. ([@koic][])Style/RedundantRegexpCharacterClass
when using regexp_parser gem 2.3.1 or older. ([@koic][])Style/SuperArguments
when the hash argument is or-assigned. ([@koic][])Style/SymbolProc
when using lambda->
with one argument and multilinedo
...end
block. ([@koic][])inherit_gem
config when the Gemfile contains an uninstalled git gem. ([@earlopain][])inherit_gem
config when running RuboCop without bundler and no Gemfile exists. ([@earlopain][])Lint/UnmodifiedReduceAccumulator
when the block is empty. ([@earlopain][])Lint/Void
when void expression with guard clause is not on last line. ([@koic][])Lint/Void
when using parenthesized void operators. ([@koic][])Style/ZeroLengthPredicate
when using safe navigation operator. ([@koic][])Lint/NestedMethodDefinition
when definition of method on variable. ([@koic][])Style/HashExcept
when usingreject
and callinginclude?
method with bang. ([@koic][])Style/SendWithLiteralMethodName
usingsend
with writer method name. ([@koic][])Style/SuperArguments
when calling super in a block. ([@koic][])Changes
CountModifierForms
option toMetrics/BlockNesting
and set it tofalse
by default. ([@koic][])bundle update
. ([@koic][])Style/MapCompactWithConditionalBlock
aware offilter_map
. ([@koic][])Lint/ImplicitStringConcatenation
. ([@koic][])v1.64.1
Compare Source
Bug fixes
Style/Copyright
whenAutocorrectNotice
is missing. ([@koic][])Style/SuperArguments
when the methods block argument is reassigned beforesuper
. ([@earlopain][])Style/RedundantLineContinuation
when line continuations involvebreak
,next
, oryield
with a return value. ([@koic][])Style/SendWithLiteralMethodName
whenpublic_send
argument is a method name that cannot be autocorrected. ([@koic][])v1.64.0
Compare Source
New features
either_consistent
SupportedShorthandSyntax
toStyle/HashSyntax
. ([@pawelma][])Style/SendWithLiteralMethodName
cop. ([@koic][])Style/SuperArguments
cop. ([@earlopain][])--format
command line option. ([@koic][])AllowModifiersOnAttrs
option forStyle/AccessModifierDeclarations
. ([@krororo][])AllowedMethods
forStyle/DocumentationMethod
. ([@koic][])Bug fixes
Style/Copyright
when using multiline copyright notice. ([@koic][])Layout/EmptyComment
when using an empty comment next to code after comment line. ([@koic][])Style/ArgumentsForwarding
when forward target issuper
. ([@koic][])Style/ArgumentsForwarding
when forward target is safe navigation method. ([@koic][])Style/MapIntoArray
when usingeach
without receiver with<<
to build an array. ([@koic][])--no-exclude-limit
generating a todo withMax
config instead of listing everything out withExclude
. ([@earlopain][])TargetRailsVersion
when parsing from the lockfile with prerelease rails. ([@earlopain][])Changes
cop.documentation_url
with--show-docs-url
when passing a config as argument. ([@earlopain][])ActiveSupportExtensionsEnabled
forStyle/SymbolProc
. ([@koic][])workspace/executeCommand
LSP method. ([@koic][])v1.63.5
Compare Source
Bug fixes
Layout/FirstArgumentIndentation
when specifyingEnforcedStyle: with_fixed_indentation
ofLayout/ArrayAlignment
. ([@koic][])Metrics/BlockLength
when theCountAsOne
config is invalid. ([@koic][])Style/NumericPredicate
is used with negations. ([@fatkodima][])Layout/CommentIndentation
for comment-only pattern matching. ([@nekketsuuu][])v1.63.4
Compare Source
Bug fixes
rubocop -V
when.rubocop.yml
contains ERB. ([@earlopain][])Style/RedundantLineContinuation
when line continuations involvereturn
with a return value. ([@koic][])textDocument/diagnostic
. ([@muxcmux][])bundle exec
. ([@amomchilov][])v1.63.3
Compare Source
Bug fixes
Lint/UnreachableCode
when using pattern matching. ([@koic][])Lint/EmptyFile
in formatters when using cache. ([@earlopain][])RuboCop::Lockfile
when the constant Bundler is uninitialized. ([@koic][])Changes
v1.63.2
Compare Source
Bug fixes
Lint/MixedCaseRange
when a character betweenZ
anda
is used in the regexp range. ([@koic][])RuboCop::Lockfile
when there is no Bundler environment. ([@koic][])Style/ArgumentsForwarding
when using block arg in nested method definitions. ([@koic][])Lint/UnreachableLoop
when using pattern matching. ([@koic][])Changes
debug/open_nonstop
fromLint/Debugger
by default. ([@koic][])v1.63.1
Compare Source
Bug fixes
Lint/AssignmentInCondition
if assigning inside a method call. ([@earlopain][])RuboCop::Lockfile::Bundler
", caused when running RuboCop withoutbundler exec
on codebases that userubocop-rails
. ([@amomchilov][])v1.63.0
Compare Source
New features
Style/MapIntoArray
cop. ([@ymap][])requires_gem
API for declaring which gems a Cop needs. ([@amomchilov][])Bug fixes
Lint/RedundantWithIndex
when callingwith_index
with receiver and a block. ([@koic][])Style/Alias
withEnforcedStyle: prefer_alias
when callingalias_method
with fewer than 2 arguments. ([@earlopain][])Style/ExactRegexpMatch
when callingmatch
without a receiver. ([@earlopain][])Style/RedundantEach
when usingreverse_each.each
without a block. ([@earlopain][])&.
the same way as.
for setter methods inLint/AssignmentInCondition
. ([@jonas054][])Style/RedundantLineContinuation
when using line continuation with modifier. ([@koic][])Naming/BlockForwarding
when using explicit block forwarding in block method and others. ([@koic][])Style/EvalWithLocation
when usingeval
with a line number from a method call or a variable. ([@koic][])Style/RedundantArgument
when when single-quoted strings for cntrl character. ([@koic][])Style/RedundantLineContinuation
when using line continuations with&&
or||
operator in assignment. ([@koic][])Style/RedundantLineContinuation
when multi-line continuations with operators. ([@koic][])Style/CollectionCompact
when usingdelete_if
. ([@koic][])Style/RedundantPercentQ
safe on multiline strings. ([@boardfish][])Naming/FileName
andNaming/InclusiveLanguage
for empty files. ([@earlopain][])Style/Copyright
when the file is empty. ([@earlopain][])Changes
Lint/Debugger
. ([@ydah][])Rakefile.rb
inNaming/FileName
in the default config. ([@artur-intech][])Lint/Debugger
aware ofruby/debug
requires. ([@earlopain][])rubocop -V
display rubocop-rspec_rails version when using it. ([@ydah][])Bundler::LockfileParser
. ([@amomchilov][])v1.62.1
Compare Source
Bug fixes
Style/HashEachMethods
when the key block argument ofEnumerable#each
method is unused afterchunk
. ([@koic][])Style/NilComparison
without receiver andEnforcedStyle: comparison
. ([@earlopain][])Gemspec/RequiredRubyVersion
when the file is empty. ([@earlopain][])Lint/RedundantWithIndex
when the method has no receiver. ([@earlopain][])Lint/UselessTimes
when no block is present. ([@earlopain][])Style/ClassVars
when callingclass_variable_set
without arguments. ([@earlopain][])Style/For
with `EnfoConfiguration
📅 Schedule: 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.
This PR was generated by Mend Renovate. View the repository job log.