Rubocop v0.75.0 Release Notes
Release Date: 2019-09-30 // over 4 years ago-
๐ New features
- ๐ #7274: Add new
Lint/SendWithMixinArgument
cop. (@koic) - โ #7272: Show warning message if passed string to
Enabled
,Safe
,SafeAutocorrect
, andAutoCorrect
keys in .rubocop.yml. (@unasuke) - ๐
#7295: Make it possible to set
StyleGuideBaseURL
per department. (@koic) - ๐ #7301: Add check for calls to
remote_byebug
toLint/Debugger
cop. (@riley-klingler) - #7321: Allow YAML aliases in
.rubocop.yml
. (@raymondfallon) - #7317: Add new formatter
pacman
. (@crojasaragonez) - ๐ #6075: Support
IgnoredPatterns
option forNaming/MethodName
cop. (@koic) - #7335: Add todo as an alias to disable.
--disable-uncorrectable
will now disable cops usingrubocop:todo
instead ofrubocop:disable
. (@desheikh)
๐ Bug fixes
- ๐
#7256: Fix an error of
Style/RedundantParentheses
on method calls where the first argument begins with a hash literal. (@halfwhole) - #7263: Make
Layout/SpaceInsideArrayLiteralBrackets
properly handle tab-indented arrays. (@buehmann) - #7252: Prevent infinite loops by making
Layout/SpaceInsideStringInterpolation
skip over interpolations that start or end with a line break. (@buehmann) - ๐ #7262:
Lint/FormatParameterMismatch
did not recognize named format sequences like%.2<name>f
where the name appears after some modifiers. (@buehmann) - ๐ #7253: Fix an error for
Lint/NumberConversion
when#to_i
called without a receiver. (@koic) - #7271, #6498: Fix an interference between
Style/TrailingCommaIn*Literal
andLayout/Multiline*BraceLayout
for arrays and hashes. (@buehmann) - ๐
#7241: Make
Style/FrozenStringLiteralComment
match only true & false. (@tejasbubane) - ๐
#7290: Handle inner conditional inside
else
inStyle/ConditionalAssignment
. (@jonas054) - #5788: Allow block arguments on separate lines if line would be too long in
Layout/MultilineBlockLayout
. (@jonas054) - ๐
#7305: Register
Style/BlockDelimiters
offense when block result is assigned to an attribute. (@mvz) - ๐ #4802: Don't leave any
Lint/UnneededCopEnableDirective
offenses undetected/uncorrected. (@jonas054) - ๐
#7326: Fix a false positive for
Style/AccessModifierDeclarations
when access modifier name is used for hash literal value. (@koic) - ๐ #3591: Handle modifier
if
/unless
correctly inLint/UselessAssignment
. (@jonas054) - ๐
#7161: Fix
Style/SafeNavigation
cop for preserve comments inside if expression. (@tejasbubane) - ๐
#5212: Avoid false positive for braces that are needed to preserve semantics in
Style/BracesAroundHashParameters
. (@jonas054) - ๐
#7353: Fix a false positive for
Style/RedundantSelf
when receiver and multiple assigned lvalue have the same name. (@koic) - ๐
#7353: Fix a false positive for
Style/RedundantSelf
when a self receiver is used as a method argument. (@koic) - ๐
#7358: Fix an incorrect autocorrect for
Style/NestedModifier
when parentheses are required in method arguments. (@koic) - ๐
#7361: Fix a false positive for
Style/TernaryParentheses
when only the closing parenthesis is used in the last line of condition. (@koic) - #7369: Fix an infinite loop error for
Layout/IndentAssignment
withLayout/IndentFirstArgument
when using multiple assignment. (@koic) - #7177, #7370: When correcting alignment, do not insert spaces into string literals. (@buehmann)
- ๐
#7367: Fix an error for
Style/OrAssignment
cop whenthen
branch body is empty. (@koic) - ๐
#7363: Fix an incorrect autocorrect for
Layout/SpaceInsideBlockBraces
andStyle/BlockDelimiters
when using multiline empty braces. (@koic) - #7212: Fix a false positive for
Layout/EmptyLinesAroundAccessModifier
andUselessAccessModifier
when using method with the same name as access modifier around a method definition. (@koic)
๐ Changes
- ๐
#7312: Mark
Style/StringHashKeys
as unsafe. (@prathamesh-sonpatki) - ๐
#7275: Make
Style/VariableName
aware argument names when invoking a method. (@koic) - ๐
#3534: Make
Style/IfUnlessModifier
report and auto-correct modifier lines that are too long. (@jonas054) - ๐
#7261:
Style/FrozenStringLiteralComment
no longer inserts an empty line after the comment. This is left toLayout/EmptyLineAfterMagicComment
. (@buehmann) - ๐
#7091:
Style/FormatStringToken
now detects format sequences with flags and modifiers. (@buehmann) - ๐
#7319: Rename
IgnoredMethodPatterns
option toIgnoredPatterns
option forStyle/MethodCallWithArgsParentheses
. (@koic) - ๐
#7345: Mark unsafe for
Style/YodaCondition
. (@koic)
- ๐ #7274: Add new