Rubocop v0.46.0 Release Notes

Release Date: 2016-11-30 // over 7 years ago
  • ๐Ÿ†• New features

    • #3600: Add new Bundler/DuplicatedGem cop. ([@jmks][])
    • #3624: Add new configuration option empty_lines_special to Style/EmptyLinesAroundClassBody and Style/EmptyLinesAroundModuleBody. ([@legendetm][])
    • โž• Add new Style/EmptyMethod cop. ([@drenmi][])
    • ๐Ÿ’… Style/EmptyLiteral will now auto-correct Hash.new when it is the first argument being passed to a method. The arguments will be wrapped with parenthesis. ([@rrosenblum][])
    • 0๏ธโƒฃ #3713: Respect DisabledByDefault in parent configs. ([@aroben][])
    • ๐Ÿ†• New cop Rails/EnumUniqueness checks for duplicate values defined in enum config. ([@olliebennett][])
    • ๐Ÿ†• New cop Rails/EnumUniqueness checks for duplicate values defined in enum config hash. ([@olliebennett][])
    • #3451: Add new require_parentheses_when_complex style to Style/TernaryParentheses cop. ([@swcraig][])
    • #3600: Add new Bundler/OrderedGems cop. ([@tdeo][])
    • ๐Ÿ”ง #3479: Add new configuration option IgnoredPatterns to Metrics/LineLength. ([@jonas054][])

    ๐Ÿ”„ Changes

    • ๐ŸŽ The offense range for Performance/FlatMap now includes any parameters that are passed to flatten. ([@rrosenblum][])
    • ๐Ÿ’… #1747: Update Style/SpecialGlobalVars messages with a reminder to require 'English'. ([@ivanovaleksey][])
    • ๐Ÿ‘• Checks binding.irb call by Lint/Debugger cop. ([@pocke][])
    • ๐ŸŽ #3742: Checks min and max call by Performance/CompareWithBlock cop. ([@pocke][])

    ๐Ÿ› Bug fixes

    • ๐Ÿ‘• #3662: Fix the auto-correction of Lint/UnneededSplatExpansion when the splat expansion is inside of another array. ([@rrosenblum][])
    • ๐Ÿ’… #3699: Fix false positive in Style/VariableNumber on variable names ending with an underscore. ([@bquorning][])
    • ๐Ÿ’… #3687: Fix the fact that Style/TernaryParentheses cop claims to correct uncorrected offenses. ([@Ana06][])
    • ๐Ÿ’… #3568: Fix --auto-gen-config behavior for Style/VariableNumber. ([@jonas054][])
    • โž• Add format as an acceptable keyword argument for Rails/HttpPositionalArguments. ([@aesthetikx][])
    • ๐Ÿ’… #3598: In Style/NumericPredicate, don't report x != 0 or x.nonzero? as the expressions have different values. ([@jonas054][])
    • ๐Ÿ’… #3690: Do not register an offense for multiline braces with content in Style/SpaceInsideBlockBraces. ([@rrosenblum][])
    • #3746: Lint/NonLocalExitFromIterator does not warn about return in a block which is passed to Object#define_singleton_method. ([@AlexWayfer][])