Rubocop v0.68.0 Release Notes
Release Date: 2019-04-29 // about 5 years ago-
๐ New features
- ๐
#6973: Add
always_braces
toStyle/BlockDelimiter
. (@iGEL) - #6841: Node patterns can now match children in any order using
<>
. (@marcandre) - #6928: Add
--init
option for generate.rubocop.yml
file in the current directory. (@koic) - โ Add new
Layout/HeredocArgumentClosingParenthesis
cop. (@maxh) - ๐ #6895: Add support for XDG config home for user-config. (@Mange, @tejasbubane)
- โ Add initial autocorrection support to
Metrics/LineLength
. (@maxh) - โ Add
Layout/IndentFirstParameter
. (@maxh) - #6974: Make
Layout/FirstMethodArgumentLineBreak
aware of calling usingsuper
. (@koic) - โ Add new
Lint/HeredocMethodCallPosition
cop. (@maxh)
๐ Bug fixes
- Do not annotate message with cop name in JSON output. (@elebow)
- ๐
#6914: Fix an error for
Rails/RedundantAllowNil
when with interpolations. (@Blue-Pix) - ๐
#6888: Fix an error for
Rails/ActiveRecordOverride
when noparent_class
present. (@diachini) - ๐
#6941: Add missing absence validations to
Rails/Validation
. (@jmanian) - 0๏ธโฃ #6926: Allow nil values to unset config defaults. (@dduugg)
- ๐
#6946: Allow
Rails/ReflectionClassName
to use string interpolation forclass_name
. (@r7kamura) - #6778: Fix a false positive in
Style/HashSyntax
cop when a hash key is an interpolated string and EnforcedStyle is ruby19_no_mixed_keys. (@tatsuyafw) - #6902: Fix a bug where
Naming/RescuedExceptionsVariableName
would handle an only first rescue for multiple rescue groups. (@tatsuyafw) - ๐
#6860: Prevent auto-correct conflict of
Style/InverseMethods
andStyle/Not
. (@hoshinotsuyoshi) - #6935:
Layout/AccessModifierIndentation
should ignore access modifiers that apply to specific methods. (@deivid-rodriguez) - ๐ #6956: Prevent auto-correct confliction of
Lint/Lambda
andLint/UnusedBlockArgument
. (@koic) - ๐
#6915: Fix false positive in
Style/SafeNavigation
when a modifier if is safe guarding a method call being passed tobreak
,fail
,next
,raise
,return
,throw
, andyield
. (@rrosenblum) - ๐ #6822: Fix Lint/LiteralInInterpolation autocorrection for single quotes. (@hoshinotsuyoshi)
- ๐ #6985: Fix an incorrect auto-correct for
Lint/LiteralInInterpolation
if contains array percent literal. (@yakout)
๐ Changes
- ๐ #6966: Mark Rails/TimeZone as unsafe. (@vfonic)
- ๐ #5977: Remove Performance cops. (@koic)
- โ Add auto-correction to
Naming/RescuedExceptionsVariableName
. (@anthony-robin) - ๐ #6903: Handle variables prefixed with
_
inNaming/RescuedExceptionsVariableName
cop. (@anthony-robin) - #6917: Bump Bundler dependency to >= 1.15.0. (@koic)
- โ Add
--auto-gen-only-exclude
to the command outputted inrubocop_todo.yml
if the option is specified. (@dvandersluis) - ๐ #6887: Allow
Lint/UnderscorePrefixedVariableName
cop to be configured to allow use of block keyword args. (@dduugg) - โช #6885: Revert adding psych >= 3.1 as runtime dependency. (@andreaseger)
- ๐ Rename
Layout/FirstParameterIndentation
toLayout/IndentFirstArgument
. (@maxh) - Extract method call argument alignment behavior from
Layout/AlignParameters
intoLayout/AlignArguments
. (@maxh) - ๐ Rename
IndentArray
andIndentHash
toIndentFirstArrayElement
andIndentFirstHashElement
. (@maxh)
- ๐
#6973: Add