Update dependency rubocop to '~> 0.93', '>= 0.93.1' #8
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:
'~> 0.34'
->'~> 0.93', '>= 0.93.1'
Release Notes
rubocop/rubocop (rubocop)
v0.93.1
: RuboCop 0.93.1Compare Source
Bug fixes
Style/TernaryParentheses
withdefined?
. (@dvandersluis)Lint/RedundantSafeNavigation
to be more safe. (@fatkodima)Style/RedundantBegin
with a postfixwhile
oruntil
. (@dvandersluis)Style/RedundantBegin
when usingbegin
for or assignment and method call. (@koic)Lint/AmbiguousRegexpLiteral
when using regexp without method calls in nested structure. (@koic)Metrics/ClassLength
when multiple assignments to constants. (@koic)Style/RedundantBegin
when usingbegin
for method argument or part of conditions. (@koic)Style/ClassEqualityComparison
when comparing class name. (@koic)Style/ClassLength
when overlapping constant assignments. (@koic)v0.93.0
: RuboCop 0.93Compare Source
New features
Lint/HashCompareByIdentity
cop. (@fatkodima)Style/ClassEqualityComparison
cop. (@fatkodima)Lint/RedundantSafeNavigation
cop. (@fatkodima)Style/RedundantBegin
aware ofbegin
withoutrescue
orensure
. (@koic)Bug fixes
Style/RaiseArgs
. (@pbernays)Lint/BooleanSymbol
when used within%i[...]
. (@fatkodima)Style/For
. (@pbernays)Layout/SpaceAroundEqualsInParameterDefault
only registered once in a line. (@rdunlop)Style/MethodDefParentheses
per file. (@rdunlop)Style/ExplicitBlockArgument
when code is called outside of a method. (@ghiculescu)Style/CaseLikeIf
cop. (@dsavochkin)Style/NestedTernaryOperator
when using a nested ternary operator expression with no parentheses on the outside. (@koic)Style/ParenthesesAsGroupedExpression
when method argument parentheses are omitted and hash argument key is enclosed in parentheses. (@koic)Style/StringConcatenation
when string includes double quotes. (@tleish)Style/RedundantCondition
when using assignment by hash key access. (@koic)Style/CombinableLoops
when using the same method with different arguments. (@dvandersluis)Lint/AmbiguousRegexpLiteral
when sending method to regexp literal receiver. (@koic)Style/RedundantInterpolation
when using string interpolation for non-operator methods. (@koic)Lint/AmbiguousBlockAssociation
cop. (@AllanSiqueira)Layout/EmptyLinesAroundAccessModifier
andStyle/AccessModifierDeclarations
when using only access modifier. (@koic)Changes
RegexpNode#parsed_tree
now processes regexps including interpolation (by blanking the interpolation before parsing, rather than skipping). (@owst)Style/RedundantRegexpCharacterClass
andStyle/RedundantRegexpEscape
by usingregexp_parser
gem. (@owst)TargetFinder
class which improves initial startup speed. (@tleish)Struct.new
. (@tejasbubane)Gemspec/RequiredRubyVersion
cop aware ofGem::Requirement
. (@tejasbubane)v0.92.0
: RuboCop 0.92Compare Source
New features
--regenerate-todo
. (@dvandersluis)AllowedMethods
option toStyle/OptionalBooleanParameter
cop. (@fatkodima)Style/DateTime
. (@dvandersluis)Bug fixes
Layout/ArrayAlignment
with parallel assignment. (@dvandersluis)Changes
TargetFinder
class which improves rubocop initial startup speed. (@tleish)Style/ArrayCoercion
cop by default. (@koic)v0.91.1
: RuboCop 0.91.1Compare Source
Bug fixes
Lint/IdentityComparison
when callingobject_id
method without receiver in LHS or RHS. (@koic)Style/RedundantReturn
when a rescue has an else clause. (@fatkodima)Layout/RescueEnsureAlignment
whenLayout/BeginEndAlignment
cop is not enabled status. (@koic)Naming/VariableNumber
when naming multibyte character variable name. (@koic)Lint/UselessTimes
when there is a blank line in the method definition. (@koic)Style/HashAsLastArrayItem
when the hash is in an implicit array. (@dvandersluis)Lint/UselessTimes
when using empty block argument. (@koic)Metrics/AbcSize
. (@marcandre)Style/MultilineWhenThen
when line break for multiple condidate values ofwhen
statement. (@koic)Style/RandomWithOffset
when using a range with non-integer bounds. (@eugeneius)Layout/EmptyLinesAroundAccessModifier
withLayout/EmptyLinesAroundBlockBody
when using access modifier with block argument. (@koic)Lint/RedundantCopEnableDirective
autocorrection to not leave orphaned empty# rubocop:enable
comments. (@dvandersluis)Lint/RedundantCopDisableDirective
autocorrection. (@dvandersluis)Layout/CaseIndentation
not showing the cop name in output messages. (@dvandersluis)Style/OneLineConditional
when usingif-then-elsif-then-end
. (@koic)Style/IfUnlessModifier
to ignore cop disable comment directives when considering conversion to the modifier form. (@dsavochkin)Changes
respond_to_missing?
fromOptionalBooleanParameter
cop. (@em-gazelle)Style/SafeNavigation
marked as having unsafe auto-correction. (@marcandre)Style/IpAddresses
by default inGemfile
and gemspec files. (@dvandersluis)v0.91.0
: RuboCop 0.91Compare Source
New features
--cache-root
and support for theRUBOCOP_CACHE_ROOT
environment variable. Both can be used to override theAllCops: CacheRootDirectory
config, especially in a CI setting. (@sascha-wolf)Layout/BeginEndAlignment
cop. (@koic)Lint/IdentityComparison
cop. (@koic)Lint/UselessTimes
cop. (@dvandersluis)Lint/ConstantDefinitionInBlock
cop. (@eugeneius)Bug fixes
Lint/DuplicateRequire
when same feature argument but different require method. (@koic)Layout/EmptyLineAfterMultilineCondition
when conditional is at the top level. (@fatkodima)Style/RedundantSelfAssignment
when calling coercion methods. (@fatkodima)Lint/EmptyFile
. (@fatkodima)Lint/UnreachableLoop
when conditional branch includes continue statement preceding break statement. (@fatkodima)Style/RedundantParentheses
when parentheses are used like method argument parentheses. (@koic)Style/HashTransformKeys
andStyle/HashTransformValues
when the receiver is an array. (@eugeneius)Layout/DefEndAlignment
when using refinements andprivate def
. (@koic)Style/ClassAndModuleChildren
when using cbase class name. (@koic)Style/SafeNavigation
when checkingfoo&.empty?
in a conditional. (@koic)Style/ClassAndModuleChildren
when using cbase module name. (@koic)Naming/BinaryOperatorParameterName
when naming multibyte character method name. (@koic)Bundler/DuplicatedGem
when gem is duplciated in condition. (@tejasbubane)Style/ExplicitBlockArgument
when using safe navigation method call. (@koic)Style/HashAsLastArrayItem
withno_braces
for empty hash. (@fsateler)Style/HashTransformKeys
andStyle/HashTransformValues
when theeach_with_object
hash is used in the transformed key or value. (@eugeneius)Style/GlobalStdStream
as unsafe autocorrection. (@marcandre)Style/SpaceInsideHashLiteralBraces
when a correct empty hash precedes the incorrect hash. (@dvandersluis)Lint/UselessMethodDefinition
. (@marcandre)Lint/AmbiguousOperator
when using sa 8000 fe navigation operator with a unary operator. (@koic)Style/MultilineTernaryOperator
when returning a multiline ternary operator expression. (@koic)Style/CaseEquality
cop when the receiver is not a camel cased constant. (@koic)--format=json
and--stdin
options. (@koic)Changes
Style/StringConcatenation
when parts of the expression are too complex. (@dvandersluis)Lint/UselessMethodDefinition
to not register an offense when method definition includes optional arguments. (@fatkodima)Style/HashAsLastArrayItem
to not register an offense when all items in an array are hashes. (@dvandersluis)in?
to AllowedMethods forLint/SafeNavigationChain
cop. (@tejasbubane)mtime
, which changes each CI build. (@dvandersluis)Style/ClassMethodsDefinitions
. (@dvandersluis)v0.90.0
: RuboCop 0.90Compare Source
New features
Style/RedundantSelfAssignment
cop. (@fatkodima)Layout/EmptyLineAfterMultilineCondition
cop. (@fatkodima)Style/SoleNestedConditional
cop. (@fatkodima)Style/KeywordParametersOrder
cop. (@fatkodima)Style/CombinableLoops
cop. (@fatkodima)Style/ClassMethodsDefinitions
cop. (@fatkodima)Lint/DuplicateRequire
cop. (@fatkodima)Lint/UselessMethodDefinition
cop. (@fatkodima)Lint/EmptyFile
cop. (@fatkodima)Lint/TrailingCommaInAttributeDeclaration
cop. (@drenmi):restore_registry
context andstub_cop_class
helper class. (@marcandre)Cop.documentation_url
. (@marcandre)RegexpNode#each_capture
andparsed_tree
. (@marcandre)on_send
can be optimized by defining the constantRESTRICT_ON_SEND
with a list of acceptable method names. (@marcandre)Bug fixes
Style/CaseLikeIf
when conditional contains comparison with a class. MarkStyle/CaseLikeIf
as not safe. (@fatkodima)Layout/EmptyLineBetweenDefs
. (@fatkodima)Lint/BinaryOperatorWithIdenticalOperands
for binary operators used as unary operators. (@marcandre)Bundler/GemComment
. (@pocke)Style/RescueModifier
to handle parentheses around rescue modifiers. (@dsavochkin)Style/CaseEquality
cop when comparing with===
against a regular expression receiver. (@koic)Layout/EmptyLinesAroundClassBody
andLayout/EmptyLinesAroundModuleBody
to correctly handle an access modifier as a first child. (@dsavochkin)Lint/ConstantResolution
cop reporting offense formodule
andclass
definitions. (@tejasbubane)Style/MultilineWhenThen
cop to correctly handle cases with multiline body. (@dsavochkin)Style/OneLineConditional
cop to handle if/then/elsif/then/else/end cases. AddAlwaysCorrectToMultiline
config option to this cop to always convert offenses to the multi-line form (false by default). (@Lykos, @dsavochkin)Layout/{Def}EndAlignment
,Lint/EmptyEnsure
,Style/ClassAndModuleChildren
. (@marcandre)Style/RedundantRegexpEscape
false positive for line continuations. (@owst)Style/RedundantRegexpCharacterClass
false positive for interpolated multi-line expressions. (@owst)Style/CaseLikeIf
cop where it does not properly handle overridden equality methods with no arguments. (@Skipants)Changes
.rubocop.yml
as well as a notice aboutNewCops: enable
config option. (@colszowka)Lint/ShadowingOuterLocalVariable
documentation. (@chocolateboy)Style/HashTransformKeys
andStyle/HashTransformValues
aware ofto_h
with block. (@eugeneius)Lint/FrozenStringLiteralComment
asSafe
, but with unsafe auto-correction. (@marcandre)to_enum(:scan, regexp)
to work on TruffleRuby. (@jaimerave)v0.89.1
: RuboCop 0.89.1Compare Source
Bug fixes
Lint/OutOfRangeRegexpRef
when a regexp is defined and matched in separate steps. (@eugeneius)when
,grep
,gsub
,gsub!
,sub
,sub!
,[]
,slice
,slice!
,scan
,index
,rindex
,partition
,rpartition
,start_with?
, andend_with?
inLint/OutOfRangeRegexpRef
. (@eugeneius)Lint/UriRegexp
when usingregexp
method without receiver. (@koic)Lint/BinaryOperatorWithIdenticalOperands
for mathematical operations. (@marcandre)Lint/MissingSuper
. (@marcandre)Style/SymbolArray
andStyle/WordArray
. (@biinari)Style/HashAsLastArrayItem
when there are duplicate hashes in the array. (@wcmonty)Style/IfUnlessModifier
to add parentheses when converting if-end condition inside a parenthesized method argument list. (@dsavochkin)Changes
<
and>
as comparison operators inStyle/ConditionalAssignment
cop. (@biinari)v0.89.0
: RuboCop 0.89Compare Source
New features
Style/CaseEquality
cop. (@fatkodima)Gemspec/RequiredRubyVersion
cop with check thatrequired_ruby_version
is specified. (@fatkodima)Lint/SelfAssignment
cop. (@fatkodima)Lint/DuplicateRescueException
cop. (@fatkodima)Lint/BinaryOperatorWithIdenticalOperands
cop. (@fatkodima)Lint/UnreachableLoop
cop. (@fatkodima)Style/OptionalBooleanParameter
cop. (@fatkodima)Lint/FloatComparison
cop. (@fatkodima)Lint/MissingSuper
cop. (@fatkodima)Style/ExplicitBlockArgument
cop. (@fatkodima)Lint/Loop
cop. (@fatkodima)Config#for_badge
as an efficient way to get a cop's config merged with its department's. (@marcandre)Style/StringConcatenation
cop. (@fatkodima)Lint/TopLevelReturnWithArgument
cop. (@iamravitejag)Style/GlobalStdStream
cop. (@fatkodima)Style/SingleArgumentDig
cop. (@volfgox)Lint/EmptyConditionalBody
cop. (@fatkodima)Lint/OutOfRangeRegexpRef
cop. (@sonalinavlakhe)Bug fixes
Style/MethodCallWithArgsParentheses
EnforcedStyle: omit_parentheses
to fix invalid Ruby auto-correction. (@gsamokovarov)Layout/SpaceAroundMethodCallOperator
when usingProc#call
shorthand syntax. (@fatkodima)Style/ConditionalAssignment
to preserve constant namespace. (@biinari)Style/CaseLikeIf
when checking againstequal?
andmatch?
without a receiver. (@fatkodima)Style/HashAsLastArrayItem
when hash is not a last array item. (@fatkodima)Style/RedundantCondition
when usingraise
,rescue
, orand
without argument parentheses inelse
. (@koic)Style/RedundantRegexpEscape
. (@owst)EnforcedStyle: hash_rockets
ofStyle/HashSyntax
withLayout/HashAlignment
. (@koic)Style/EmptyMethod
. (@koic)Lint/EnsureReturn
. (@marcandre)Style/ArrayCoercion
as not safe. (@marcandre)Style/AccessorGrouping
's auto-correction to remove redundant blank lines. (@koic)Style/MissingRespondToMissing
when defined method with inline access modifier. (@koic)Lint/SelfAssignment
when using or-assignment for constant. (@koic)Style/SingleArgumentDig
when without a receiver. (@koic)Lint/IneffectiveAccessModifier
when there isbegin...end
before a method definition. (@koic)Style/IfUnlessModifier
to correctly take into account code before the if condition when considering conversation to a single-line form. (@dsavochkin)Style/IfUnlessModifier
to correctly take into account a comment on the first line when considering conversation to a single-line form. (@dsavochkin)Style/IfUnlessModifier
to correctly take into account code on the last line after the end keyword when considering conversion to a single-line form. (@dsavochkin)Style/IfUnlessModifier
to add parentheses when converting if-end condition inside an array or a hash to a single-line form. (@dsavochkin)Style/StructInheritance
when there is a comment before class declaration. (@koic)Layout/FirstMethodArgumentLineBreak
when using kwargs insuper
. (@koic)Changes
Style/MethodMissingSuper
cop is removed in favor of newLint/MissingSuper
cop. (@fatkodima)Lint/UselessComparison
cop is removed in favor of newLint/BinaryOperatorWithIdenticalOperands
cop. (@fatkodima)Style/MultilineMethodSignature
. (@koic)Metrics/AbcSize
now counts ||=, &&=, multiple assignments, for, yield, iterating blocks.&.
now count as conditions too (unless repeated on the same variable). Default bumped from 15 to 17. Consider usingrubocop -a --disable-uncorrectable
to ease transition. (@marcandre)Metrics/CyclomaticComplexity
not longer counts&.
when repeated on the same variable. (@marcandre)Metrics/PerceivedComplexity
now countselse
incase
statements,&.
,||=
,&&=
and blocks known to iterate. Default bumped from 7 to 8. Consider usingrubocop -a --disable-uncorrectable
to ease transition. (@marcandre)Lint/InterpolationCheck
marked as unsafe. (@marcandre)RuboCop::Cop::ParserDiagnostic
mixin module. (@koic)v0.88.0
: RuboCop 0.88Compare Source
New features
Lint/NonDeterministicRequireOrder
cop. (@biinari)Style/RedundantFileExtensionInRequire
cop. (@fatkodima)Lint/DisjunctiveAssignmentInConstructor
cop. (@fatkodima)bin/rubocop-profile
and rake tasks. (@marcandre)Style/ArrayCoercion
cop. (@fatkodima)Lint/DuplicateElsifCondition
cop. (@fatkodima)Style/CaseLikeIf
cop. (@fatkodima)Style/HashAsLastArrayItem
cop. (@fatkodima)Style/HashLikeCase
cop. (@fatkodima)expect_offense
allows abbreviated offense messages. (@marcandre)Bug fixes
Layout/EmptyLinesAroundAccessModifier
whenend
immediately after access modifier. (@koic)Layout/MultilineArrayBraceLayout
when comment is present after last element. (@shekhar-patil)Layout/MultilineMethodCallBraceLayout
when comment is present before closing braces. (@shekhar-patil)Style/IfUnlessModifier
bad precedence detection. (@tejasbubane)Style/AccessorGrouping
to not register offense for accessor with comment. (@tejasbubane)Gemspec/RequiredRubyVersion
. (@eugeneius)Style/PercentLiteralDelimiters
when the source contains invalid characters. (@eugeneius).rubocop.yml
files at all outside of the current project, unless they are personal configuration files and the project has no configuration. (@deivid-rodriguez)Changes
Layout/SpaceAroundMethodCallOperator
cop to make it faster. (@fatkodima)of
toAllowedNames
ofMethodParameterName
cop. (@AlexWayfer)v0.87.1
: RuboCop 0.87.1Compare Source
Bug fixes
--safe-autocorrect
to--safe-auto-correct
, which is compatible with RuboCop 0.86 and lower. (@koic)Style/BisectedAttrAccessor
when accessors have different access modifiers. (@fatkodima)Style/AccessorGrouping
when accessors have different access modifiers. (@fatkodima)Style/BisectedAttrAccessor
when usingattr_reader
andattr_writer
with splat arguments. (@fatkodima).rubocop.yml
from personal folders to check for exclusions if given a custom configuration file. (@deivid-rodriguez)--auto-gen-config
when running a cop who do not support auto-correction. (@koic)Lint/DeprecatedOpenSSLConstant
auto-correction ofOpenSSL::Cipher
to use lower case, as some Linux-based systems do not accept upper cased cipher names. (@bdewater)v0.87.0
: RuboCop 0.87Compare Source
New features
Cop::Base
is the new recommended base class for cops. (@marcandre)Style/AccessorGrouping
cop. (@fatkodima)Style/BisectedAttrAccessor
cop. (@fatkodima)AsciiConstants
option forNaming/AsciiIdentifiers
. (@fatkodima)Style/RedundantAssignment
cop. (@fatkodima)CountAsOne
option for code length relatedMetric
cops. (@fatkodima)Lint/InterpolationCheck
. (@koic)Style/IfUnlessModifierOfIfUnless
. (@koic)Lint/SafeNavigationWithEmpty
. (@koic)Bug fixes
Lint/ParenthesesAsGroupedExpression
in when using operators or chain functions. (@CamilleDrapier)Style/RedundantFetchBlock
when using withRails.cache
. (@fatkodima)Style/RedundantFetchBlock
when using#fetch
with empty block. (@koic)Style/RedundantRegexpCharacterClass
when using[\b]
. (@owst)Style/RedundantRegexpCharacterClass
when using a leading escaped]
. (@owst)Style/RedundantParentheses
with hash literal as first argument toyield
. (@karlwithak).rubocop.yml
from personal folders to check for exclusions if there's a project configuration. (@deivid-rodriguez)Changes
Team
,Commissioner
,Corrector
.Cop::Cop#corrections
not completely compatible. See Upgrade Notes. (@marcandre)rubocop -a / --autocorrect
no longer run unsafe corrections;rubocop -A / --autocorrect-all
run both safe and unsafe corrections. Options--safe-autocorrect
is deprecated. (@marcandre)ConsiderPunctuation
setting is set totrue
. (@marcandre)Style/ClassVars
cop now detectsclass_variable_set
. (@biinari)::Const
in various cops. (@biinari)v0.86.0
: RuboCop 0.86Compare Source
New features
Style/RedundantFetchBlock
cop. (@fatkodima)Style/StructInheritance
. (@tejasbubane)expect_offense
templates add variable-length whitespace with_{foo}
. (@eugeneius)Style/MultilineTernaryOperator
. (@koic)Style/NestedTernaryOperator
. (@koic)Lint/ConstantResolution
cop. (@robotdana)Lint/RegexpAsCondition
. (@koic)Lint/RaiseException
. (@koic)Bug fixes
Naming/MethodName: EnforcedStyle: camelCase
and_
ori
variables. (@avrusanov)Lint::FormatParameterMismatch
when argument contains formatting. (@andrykonchin)Style/RedundantRegexpEscape
with escaped delimiters. (@owst)Lint/FormatParameterMismatch
when using named parameters with escaped%
. (@koic)Style/RedundantRegexpCharacterClass
when using interpolations. (@owst)Layout/EmptyLinesAroundAttributeAccessor
when using attribute accessors inif
...else
branches. (@koic)Layout/MultilineBlockLayout
when missing newline before opening parenthesis(
for block body. (@koic)Style/YodaCondition
when interpolation is used on the left hand side. (@koic)Changes
Metrics/CyclomaticComplexity
now counts&.
,||=
,&&=
and blocks known to iterate. Default bumped from 6 to 7. (@marcandre)Lint/RaiseException
. (@koic)v0.85.1
: RuboCop 0.85.1Compare Source
Bug fixes
Lint/MixedRegexpCaptureTypes
cop when using a regular expression that cannot be processed by regexp_parser gem. (@koic)Lint/SuppressedException
when empty rescue block indo
block. (@koic)Lint/SuppressedException
when empty rescue block in defs. (@koic)Layout/HeredocIndentation
auto-correct. ([@jonas054][])Lint::FormatParameterMismatch
wConfiguration
📅 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.
disabled