@bbatsov bbatsov released this Sep 19, 2016 · 2084 commits to master since this release

Assets 2

New features

  • #3379: Add table of contents at the beginning of HTML formatted output. (@hedgesky)
  • #2968: Add new Style/DocumentationMethod cop. (@sooyang)
  • #3360: Add RequireForNonPublicMethods configuration option to Style/DocumentationMethod cop. (@drenmi)
  • Add new Rails/SafeNavigation cop to convert try! to &.. (@rrosenblum)
  • #3415: Add new Rails/NotNullColumn cop. (@pocke)
  • #3167: Add new Style/VariableNumber cop. (@sooyang)
  • Add new style no_mixed_keys to Style/HashSyntax to only check for hashes with mixed keys. (@daviddavis)
  • Allow including multiple configuration files from a single gem. (@tjwallace)
  • Add check for persisted? method call when using a create method in Rails/SaveBang. (@QuinnHarris)
  • Add new Style/SafeNavigation cop to convert method calls safeguarded by a non nil check for the object to &.. (@rrosenblum)
  • Add new Performance/SortWithBlock cop to use sort_by(&:foo) instead of sort_by { |a, b| a.foo <=> b.foo }. (@koic)
  • #3492: Add new UnifiedInteger cop. (@pocke)

Bug fixes

  • #3383: Fix the local variable reset issue with Style/RedundantSelf cop. (@bankair)
  • #3445: Fix bad autocorrect for Style/AndOr cop. (@mikezter)
  • #3349: Fix bad autocorrect for Style/Lambda cop. (@metcalf)
  • #3351: Fix bad auto-correct for Performance/RedundantMatch cop. (@annaswims)
  • #3347: Prevent infinite loop in Style/TernaryParentheses cop when used together with Style/RedundantParentheses. (@drenmi)
  • #3209: Remove faulty line length check from Style/GuardClause cop. (@drenmi)
  • #3366: Make Style/MutableConstant cop aware of splat assignments. (@drenmi)
  • #3372: Fix RuboCop crash with empty brackets in Style/Next cop. (@pocke)
  • #3358: Make Style/MethodMissing cop aware of class scope. (@drenmi)
  • #3342: Fix error in Lint/ShadowedException cop if last rescue does not have parameter. (@soutaro)
  • #3380: Fix false positive in Style/TrailingUnderscoreVariable cop. (@drenmi)
  • #3388: Fix bug where Lint/ShadowedException would register an offense when rescuing different numbers of custom exceptions in multiple rescue groups. (@rrosenblum)
  • #3386: Make VariableForce understand an empty RegExp literal as LHS to =~. (@drenmi)
  • #3421: Fix clobbering inherit_from additions when not using Namespaces in the configs. (@nicklamuro)
  • #3425: Fix bug for invalid bytes in UTF-8 in Lint/PercentStringArray cop. (@pocke)
  • #3374: Make SpaceInsideBlockBraces and SpaceBeforeBlockBraces not depend on BlockDelimiters configuration. (@jonas054)
  • Fix error in Lint/ShadowedException cop for higher number of rescue groups. (@groddeck)
  • #3456: Don't crash on a multiline empty brace in Style/MultilineMethodCallBraceLayout. (@pocke)
  • #3423: Checks if .rubocop is a file before parsing. (@joejuzl)
  • #3439: Fix variable assignment check not working properly when a block is used in Rails/SaveBang. (@QuinnHarris)
  • #3401: Read file contents in binary mode so Style/EndOfLine works on Windows. (@jonas054)
  • #3450: Prevent Style/TernaryParentheses cop from making unsafe corrections. (@drenmi)
  • #3460: Fix false positives in Style/InlineComment cop. (@drenmi)
  • #3485: Make OneLineConditional cop not register offense for empty else. (@tejasbubane)
  • #3508: Fix false negatives in Rails/NotNullColumn. (@pocke)
  • #3462: Don't create MultilineMethodCallBraceLayout offenses for single-line method calls when receiver spans multiple lines. (@maxjacobson)


  • #3341: Exclude RSpec tests from inspection by Style/NumericPredicate cop. (@drenmi)
  • Rename Lint/UselessArraySplat to Lint/UnneededSplatExpansion, and add functionality to check for unnecessary expansion of other literals. (@rrosenblum)
  • No longer register an offense for splat expansion of an array literal in Performance/CaseWhenSplat. Lint/UnneededSplatExpansion now handles this behavior. (@rrosenblum)
  • Lint/InheritException restricts inheriting from standard library subclasses of Exception. (@metcalf)
  • No longer register an offense if the first line of code starts with #\ in Style/LeadingCommentSpace. config.ru files consider such lines as options. (@scottohara)
  • #3292: Remove Performance/PushSplat as it can produce code that is slower or even cause failure. (@jonas054)