Rubocop v0.47.0 Release Notes
Release Date: 2017-01-16 // over 7 years ago-
๐ New features
- ๐
#3822: Add
Rails/FilePath
cop. ([@iguchi1124][]) - ๐ #3821: Add
Security/YAMLLoad
cop. ([@cyberdelia][]) - ๐ #3816: Add
Security/MarshalLoad
cop. ([@cyberdelia][]) - #3757: Add Auto-Correct for
Bundler/OrderedGems
cop. ([@pocke][]) Style/FrozenStringLiteralComment
now supports the stylenever
that will remove thefrozen_string_literal
comment. ([@rrosenblum][])- ๐ #3795: Add
Lint/MultipleCompare
cop. ([@pocke][]) - #3772: Allow exclusion of certain methods for
Metrics/BlockLength
. ([@NobodysNightmare][]) - ๐ #3804: Add new
Lint/SafeNavigationChain
cop. ([@pocke][]) - #3670: Add
CountBlocks
boolean option toMetrics/BlockNesting
. It allows blocks to be counted towards the nesting limit. ([@georgyangelov][]) - ๐
#2992: Add a configuration to
Style/ConditionalAssignment
to toggle offenses for ternary expressions. ([@rrosenblum][]) - ๐ #3824: Add new
Performance/RegexpMatch
cop. ([@pocke][]) - ๐
#3825: Add new
Rails/SkipsModelValidations
cop. ([@rahulcs][]) - ๐
#3737: Add new
Style/MethodCallWithArgsParentheses
cop. ([@dominh][]) - ๐ Renamed
MethodCallParentheses
toMethodCallWithoutArgsParentheses
. ([@dominh][]) - ๐
#3854: Add new
Rails/ReversibleMigration
cop. ([@sue445][]) - #3872: Detect
String#%
with hash literal. ([@backus][]) - ๐ #2731: Allow configuration of method calls that create methods for
Lint/UselessAccessModifier
. ([@pat][])
๐ Changes
- ๐ #3820: Rename
Lint/Eval
toSecurity/Eval
. ([@cyberdelia][]) - ๐
#3725: Disable
Style/SingleLineBlockParams
by default. ([@tejasbubane][]) - ๐
#3765: Add a validation for supported styles other than EnforcedStyle.
AlignWith
,IndentWhenRelativeTo
andEnforcedMode
configurations are renamed. ([@pocke][]) - ๐
#3782: Add check for
add_reference
method byRails/NotNullColumn
cop. ([@pocke][]) - ๐
#3761: Update
Style/RedundantFreeze
message fromFreezing immutable objects is pointless.
toDo not freeze immutable objects, as freezing them has no effect.
. ([@lucasuyezu][]) - #3753: Change error message of
Bundler/OrderedGems
to mentionAlphabetize Gems
. ([@tejasbubane][]) - #3802: Ignore case when checking Gemfile order. ([@breckenedge][])
- โ Add missing examples in
Lint
cops documentation. ([@enriikke][]) - ๐
Make
Style/EmptyMethod
cop aware of class methods. ([@drenmi][]) - ๐ #3871: Add check for void
defined?
andself
byLint/Void
cop. ([@pocke][]) - ๐ Allow ignoring methods in
Style/BlockDelimiters
when using any style. ([@twe4ked][])
๐ Bug fixes
- ๐
#3751: Avoid crash in
Rails/EnumUniqueness
cop. ([@pocke][]) - ๐
#3766: Avoid crash in
Style/ConditionalAssignment
cop with masgn. ([@pocke][]) - ๐
#3770:
Style/RedundantParentheses
Don't flag raised to a power negative numeric literals, since removing the parentheses would change the meaning of the expressions. ([@amogil][]) - ๐
#3750: Register an offense in
Style/ConditionalAssignment
when the assignment spans multiple lines. ([@rrosenblum][]) - ๐
#3775: Avoid crash in
Style/HashSyntax
cop with an empty hash. ([@pocke][]) - ๐
#3783: Maintain parentheses in
Rails/HttpPositionalArguments
when methods are defined with them. ([@kevindew][]) - ๐
#3786: Avoid crash
Style/ConditionalAssignment
cop with mass assign method. ([@pocke][]) - ๐
#3749: Detect corner case of
Style/NumericLitterals
. ([@kamaradclimber][]) - ๐
#3788: Prevent bad auto-correct in
Style/Next
when block has nested conditionals. ([@drenmi][]) - ๐ #3807: Prevent
Style/Documentation
andStyle/DocumentationMethod
from mistaking RuboCop directives for class documentation. ([@drenmi][]) - ๐
#3815: Fix false positive in
Style/IdenticalConditionalBranches
cop when branches have same line at leading. ([@pocke][]) - ๐ Fix false negative in
Rails/HttpPositionalArguments
where offense would go undetected if one of the request parameter names matched one of the special keyword arguments. ([@deivid-rodriguez][]) - ๐ Fix false negative in
Rails/HttpPositionalArguments
where offense would go undetected if the:format
keyword was used with other non-special keywords. ([@deivid-rodriguez][]) - #3406: Enable cops if Enabled is not explicitly set to false. ([@metcalf][])
- ๐ Fix
Lint/FormatParameterMismatch
for splatted last argument. ([@zverok][]) - #3853: Fix false positive in
RedundantParentheses
cop with multiple expression. ([@pocke][]) - ๐
#3870: Avoid crash in
Rails/HttpPositionalArguments
. ([@pocke][]) - ๐ #3869: Prevent
Lint/FormatParameterMismatch
from breaking when#%
is passed an empty array. ([@drenmi][]) - #3879: Properly handle Emacs and Vim magic comments for
FrozenStringLiteralComment
. ([@backus][]) - ๐
#3736: Fix to remove accumulator return value by auto-correction in
Style/EachWithObject
. ([@pocke][])
- ๐
#3822: Add