github rubocop/rubocop v0.46.0
RuboCop 0.46

latest releases: v1.63.3, v1.63.4, v1.63.2...
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)
  • #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 Perfomance/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)

Don't miss a new rubocop release

NewReleases is sending notifications on new releases.