relnotes/v0.22.0.md
This release brings a few new cops, extended auto-correction support and plenty of bug fixes.
Below is the list of all the gory details. Enjoy!
CommentIndentation checks indentation of comments. (@jonas054)EachWithObject to prefer each_with_object over inject or reduce. (@geniou)Next check for conditions at the end of an iteration and propose to use next instead. (@geniou)GuardClause cop now also looks for unless and it is configurable how many lines the body of an if / unless needs to have to not be ignored. (@geniou)UnneededPercentX checks for %x when backquotes would do. (@jonas054)UnusedBlockArgument and UnusedMethodArgument cops. (@hannestyden)SpaceBeforeComment checks for missing space between code and a comment on the same line. (@jonas054)-F/--fail-fast inspects files in modification time order and stop after the first file with offenses. (@jonas054)NonNilCheck offense reporting and autocorrect are configurable to include semantic changes. (@hannestyden)AllCops/Excludes and AllCops/Includes with final s only give a warning and don't halt rubocop execution. (@jonas054)GuardClause cop is no longer ignoring a one-line body by default - see configuration. (@geniou)rubocop-todo.yml file to .rubocop_todo.yml. (@geniou)AlignParameters cop. (@tommeier)Void and SpaceAroundOperators for short call syntax lambda.(). (@biinari)Delegate for delegation with assignment or constant. (@geniou)--auto-correct. (@jonas054)__FILE__ in LineEndConcatenation. (@bbatsov)NegatedIf when the condition has parentheses around it. (@jonas054)AlignParameters with_fixed_indentation for multi-line method calls. (@molawson)Exclude setting in the cop's configuration. (@jonas054)Exclude config section not being recognized on Windows. (@wndhydrnt)