RuboCop 0.47

@bbatsov bbatsov released this Jan 16, 2017 · 106 commits to master since this release

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 style never that will remove the frozen_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 to Metrics/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 Perfomance/RegexpMatch cop. (@pocke)
  • #3825: Add new Rails/SkipsModelValidations cop. (@rahulcs)
  • #3737: Add new Style/MethodCallWithArgsParentheses cop. (@dominh)
  • Renamed MethodCallParentheses to MethodCallWithoutArgsParentheses. (@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 to Security/Eval. (@cyberdelia)
  • #3725: Disable Style/SingleLineBlockParams by default. (@tejasbubane)
  • #3765: Add a validation for supported styles other than EnforcedStyle. AlignWith, IndentWhenRelativeTo and EnforcedMode configurations are renamed. (@pocke)
  • #3782: Add check for add_reference method by Rails/NotNullColumn cop. (@pocke)
  • #3761: Update Style/RedundantFreeze message from Freezing immutable objects is pointless. to Do not freeze immutable objects, as freezing them has no effect.. (@lucasuyezu)
  • #3753: Change error message of Bundler/OrderedGems to mention Alphabetize 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? and self by Lint/Void cop. (@pocke)

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 and Style/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)

Downloads