relnotes/v0.30.0.md
Nothing ground-breaking this time around, but the release is pretty exciting non-the-less.
It packs a whole new category of cops (Performance) and a bunch of new Rails cops.
A lot of the existing cops got new customization options and we squashed a ton of bugs.
Thanks to everyone who contributed to this release!
line_count_based and semantic styles to the BlockDelimiters (formerly Blocks) cop. (@clowder, @mudge)Offense#corrected? to true, false, or nil when it was, wasn't, or can't be auto-corrected, respectively. (@vassilevsky)--display-style-guide. (@marxarelli)HashStyle cop. (@iainbeeston)IgnoreClassMethods option to TrivialAccessors cop. (@bbatsov)Style/SpaceAroundOperators cop now also detects extra spaces around operators. A list of operators that may be surrounded by multiple spaces is configurable. (@bquorning)Encoding cop. (@rrosenblum)TrailingComma has a new style consistent_comma. (@tamird)empty, nil, and both SupportedStyles to EmptyElse cop. Default is both. (@rrosenblum)MissingElse cop. Default is to have this cop be disabled. (@rrosenblum)# :nodoc in Documentation. (@lumeet)HashSyntax cop to allow the use of hash rockets for hashes that have symbol values when using ruby19 syntax. (@rrosenblum)Style/SymbolLiteral makes sure you're not using the string within symbol syntax unless it's needed. (@bbatsov)Style/AutoResourceCleanup suggests the use of block taking versions of methods that do resource cleanup. (@bbatsov)WhileUntilModifier cop does auto-correction. (@lumeet)Performance/ReverseEach to convert reverse.each to reverse_each. (@rrosenblum)IfUnlessModifier cop does auto-correction. (@lumeet)Performance/Detect to detect usage of select.first, select.last, find_all.first, and find_all.last and convert them to use detect instead. (@palkan, @rrosenblum)NonLocalExitFromIterator checks for misused return in block. (@ypresto)Performance/Size to convert calls to count on Array and Hash to size. (@rrosenblum)Performance/Sample to convert usages of shuffle.first, shuffle.last, and shuffle[Integer] to sample. (@rrosenblum)Performance/FlatMap to convert Enumerable#map...Array#flatten and Enumerable#collect...Array#flatten to Enumerable#flat_map. (@rrosenblum)ClosingParenthesisIndentation checks the indentation of hanging closing parentheses. (@jonas054)FindBy identifies usages of where.first and where.take. (@bbatsov)FindEach identifies usages of all.each. (@bbatsov)IndentationConsistency is now configurable with the styles normal and rails. (@jonas054)MissingElse cop. (@gerry3)blockarg in TrivialAccessors. (@bbatsov):"string" in HashSyntax. (@bbatsov)begin blocks in Lint/Void. (@bbatsov)Lint/Void. (@bbatsov)--auto-gen-config and SpaceInsideBlockBraces. (@meganemura)BlockAlignment. (@lumeet)Lambda when a new multi-line lambda is used as an argument. (@lumeet)LiteralInInterpolation and AssignmentInCondition. (@ypresto)LineEndConcatenation autocorrect. (@jonas054)__END__. (@jonas054)Style/Documentation. (@lumeet)binding calls in UnusedBlockArgument and UnusedMethodArgument. (@lumeet)UnneededPercentX renamed to CommandLiteral. The cop can be configured to enforce using either %x or backticks around command literals, or using %x around multi-line commands and backticks around single-line commands. The cop ignores heredoc commands. (@bquorning)MaxSlashes configuration option for RegexpLiteral. Instead, the cop can be configured to enforce using either %r or slashes around regular expressions, or using %r around multi-line regexes and slashes around single-line regexes. (@bquorning)Style/TrivialAccessors now requires matching names by default. (@bbatsov)