This version is outdated! Click here to see latest
Gems_big

rubocop

0.45.0

Automatic Ruby code style checking tool. Aims to enforce the community-driven Ruby Style Guide.

Critical or Security advisories for 0.45.0

This version doesn't have any advisory. Want to report one?

Changelog for 0.45.0

New features

  • #3615: Add autocorrection for Lint/EmptyInterpolation. (@pocke)
  • Make PercentLiteralDelimiters enforce delimiters around %I() too. (@bronson)
  • #3408: Add check for repeated values in case conditionals. (@swcraig)
  • #3646: Add new Lint/EmptyWhen cop. (@drenmi)
  • #3246: Add list of all cops to the manual (generated automatically from a rake task). (@sihu)
  • #3647: Add --force-default-config option. (@jawshooah)
  • #3570: Add new MultilineIfModifier cop to avoid usage of if/unless-modifiers on multiline statements. (@tessi)
  • #3631: Add new Style/SpaceInLambdaLiteral cop to check for spaces in lambda literals. (@swcraig)
  • Add new Lint/EmptyExpression cop. (@drenmi)

Bug fixes

  • #3553: Make Style/RedundantSelf cop to not register an offence for self.(). (@iGEL)
  • #3474: Make the Rails/TimeZone only analyze functions which have "Time" in the receiver. (@b-t-g)
  • #3607: Fix Style/RedundantReturn cop for empty if body. (@pocke)
  • #3291: Improve detection of raw and html_safe methods in Rails/OutputSafety. (@lumeet)
  • Redundant return style now properly handles empty when blocks. (@albus522)
  • #3622: Fix false positive for Metrics/MethodLength and Metrics/BlockLength. (@meganemura)
  • #3625: Fix some cops errors when condition is empty brace. (@pocke)
  • #3468: Fix bug regarding alignment inside begin..end block in Style/MultilineMethodCallIndentation. (@jonas054)
  • #3644: Fix generation incorrect documentation. (@pocke)
  • #3637: Fix Style/NonNilCheck crashing for ternary condition. (@tejasbubane)
  • #3654: Add missing keywords for Rails/HttpPositionalArguments. (@eitoball)
  • #3652: Avoid crash Rails/HttpPositionalArguments for lvar params when auto-correct. (@pocke)
  • Fix bug in Style/SafeNavigation where there is a check for an object in an elsif statement with a method call on that object in the branch. (@rrosenblum)
  • #3660: Fix false positive for Rails/SafeNavigation when without receiver. (@pocke)
  • #3650: Fix Style/VariableNumber registering an offense for variables with double digit numbers. (@rrosenblum)
  • #3494: Check rails style indentation also inside blocks in Style/IndentationWidth. (@jonas054)
  • #3676: Ignore raw and html_safe invocations when wrapped inside a safe_join. (@b-t-g)

Changes

  • #3601: Change default args for Style/SingleLineBlockParams. This cop checks that reduce and inject use the variable names a and e for block arguments. These defaults are uncommunicative variable names and thus conflict with the "Uncommunicative Variable Name" check in Reek. Default args changed to acc and elem.(@jessieay)
  • #3645: Fix bug with empty case when nodes in Style/RedundantReturn. (@tiagocasanovapt)
  • #3263: Fix auto-correct of if statements inside of unless else statements in Style/ConditionalAssignment. (@rrosenblum)
  • Bump default Ruby version to 2.1. (@drenmi)

Dependencies for 0.45.0

Name Requirement Status
< 3.0, >= 2.3.1.1

~> 0.1

< 3.0, >= 1.99.1

~> 1.7

>= 1.0.1, ~> 1.0

My projects using rubocop

Name Locked version Requirement
You should be logged in to see which of your projects use rubocop.