github rubocop/rubocop v0.39.0
RuboCop 0.39

latest releases: v1.63.3, v1.63.4, v1.63.2...
8 years ago

New features

  • Performance/TimesMap cop can auto-correct. (@lumeet)
  • Style/ZeroLengthPredicate cop can auto-correct. (@lumeet)
  • #2828: Style/ConditionalAssignment is now configurable to enforce assignment inside of conditions or to enforce assignment to conditions. (@rrosenblum)
  • #2862: Performance/Detect and Performance/Count have a new configuration SafeMode that is defaulted to true. These cops have known issues with Rails and other ORM frameworks. With this default configuration, these cops will not run if the Rails cops are enabled. (@rrosenblum)
  • Style/IfUnlessModifierOfIfUnless cop added. (@amuino)

Bug fixes

  • #2948: Style/SpaceAroundKeyword should allow yield[n] and super[n]. (@laurelfan)
  • #2950: Fix auto-correcting cases in which precedence has changed in Style/OneLineConditional. (@lumeet)
  • #2947: Fix auto-correcting if-then in Style/Next. (@lumeet)
  • #2904: Style/RedundantParentheses doesn't flag -(1.method) or +(1.method), since removing the parentheses would change the meaning of these expressions. (@alexdowad)
  • #2958: Style/MultilineMethodCallIndentation doesn't fail when inspecting unary ops which span multiple lines. (@alexdowad)
  • #2959: Lint/LiteralInInterpolation doesn't report offenses for iranges and eranges with non-literal endpoints. (@alexdowad)
  • #2960: Lint/AssignmentInCondition catches method assignments (like obj.attr = val) in a condition. (@alexdowad)
  • #2871: Second solution for possible encoding incompatibility when outputting an HTML report. (@jonas054)
  • #2967: Fix auto-correcting of ===, <=, and >= in Style/ConditionalAssignment. (@rrosenblum)
  • #2977: Fix auto-correcting of "#{$!}" in Style/SpecialGlobalVars. (@lumeet)
  • #2935: Make configuration loading work if SafeYAML.load is private. (@jonas054)

Changes

  • require: only does relative includes when it starts with a .. (@ptarjan)
  • Style/IfUnlessModifier does not trigger if the body is another conditional. (@amuino)
  • #2963: Performance/RedundantMerge will now register an offense inside of each_with_object. (@rrosenblum)

Don't miss a new rubocop release

NewReleases is sending notifications on new releases.