This release is mostly about fixing bugs, but it also features a few prominent changes: * Cops are now namespace aware, which would it make it simpler to write RuboCop extensions without worrying about name collisions (e.g. you can now have `Style/Filename` and `RSpec/Filename` cops). * There's now logic which prevents auto-corrections from generated invalid Ruby code. * The `Rubocop` module was renamed to `RuboCop`, which will affect packages relying on RuboCop's public API. Below is the list of all the gory details. Enjoy! ### New features * [#1117](https://github.com/bbatsov/rubocop/issues/1117): `BlockComments` cop does auto-correction. ([@jonas054][]) * [#1124](https://github.com/bbatsov/rubocop/pull/1124): `TrivialAccessors` cop auto-corrects class-level accessors. ([@ggilder][]) * [#1062](https://github.com/bbatsov/rubocop/pull/1062): New cop `InlineComment` checks for inline comments. ([@salbertson][]) * [#1118](https://github.com/bbatsov/rubocop/issues/1118): Add checking and auto-correction of right brackets in `IndentArray` and `IndentHash`. ([@jonas054][]) ### Changes * [#1097](https://github.com/bbatsov/rubocop/issues/1097): Add optional namespace prefix to cop names: `Style/LineLength` instead of `LineLength` in config files, `--only` argument, `--show-cops` output, and `# rubocop:disable`. ([@jonas054][]) * [#1075](https://github.com/bbatsov/rubocop/issues/1075): More strict limits on when to require trailing comma. ([@jonas054][]) * Renamed `Rubocop` module to `RuboCop`. ([@bbatsov][]) ### Bugs fixed * [#1126](https://github.com/bbatsov/rubocop/pull/1126): Fix `--auto-gen-config` bug with `RegexpLiteral` where only the last file's results would be used. ([@ggilder][]) * [#1104](https://github.com/bbatsov/rubocop/issues/1104): Fix `EachWithObject` with modifier if as body. ([@geniou][]) * [#1106](https://github.com/bbatsov/rubocop/issues/1106): Fix `EachWithObject` with single method call as body. ([@geniou][]) * Avoid the warning about ignoring syck YAML engine from JRuby. ([@jonas054][]) * [#1111](https://github.com/bbatsov/rubocop/issues/1111): Fix problem in `EndOfLine` with reading non-UTF-8 encoded files. ([@jonas054][]) * [#1115](https://github.com/bbatsov/rubocop/issues/1115): Fix `Next` to ignore super nodes. ([@geniou][]) * [#1117](https://github.com/bbatsov/rubocop/issues/1117): Don't auto-correct indentation in scopes that contain block comments (`=begin`..`=end`). ([@jonas054][]) * [#1123](https://github.com/bbatsov/rubocop/pull/1123): Support setter calls in safe assignment in `ParenthesesAroundCondition`. ([@jonas054][]) * [#1090](https://github.com/bbatsov/rubocop/issues/1090): Correct handling of documentation vs annotation comment. ([@jonas054][]) * [#1118](https://github.com/bbatsov/rubocop/issues/1118): Never write invalid ruby to a file in auto-correct. ([@jonas054][]) * [#1120](https://github.com/bbatsov/rubocop/issues/1120): Don't change indentation of heredoc strings in auto-correct. ([@jonas054][]) * [#1109](https://github.com/bbatsov/rubocop/issues/1109): Handle conditions with modifier ops in them in `ParenthesesAroundCondition`. ([@bbatsov][]) [@bbatsov]: https://github.com/bbatsov [@jonas054]: https://github.com/jonas054 [@yujinakayama]: https://github.com/yujinakayama [@dblock]: https://github.com/dblock [@nevir]: https://github.com/nevir [@daviddavis]: https://github.com/daviddavis [@sds]: https://github.com/sds [@fancyremarker]: https://github.com/fancyremarker [@sinisterchipmunk]: https://github.com/sinisterchipmunk [@vonTronje]: https://github.com/vonTronje [@agrimm]: https://github.com/agrimm [@pmenglund]: https://github.com/pmenglund [@chulkilee]: https://github.com/chulkilee [@codez]: https://github.com/codez [@emou]: https://github.com/emou [@skanev]: http://github.com/skanev [@claco]: http://github.com/claco [@rifraf]: http://github.com/rifraf [@scottmatthewman]: https://github.com/scottmatthewman [@ma2gedev]: http://github.com/ma2gedev [@jeremyolliver]: https://github.com/jeremyolliver [@hannestyden]: https://github.com/hannestyden [@geniou]: https://github.com/geniou [@jkogara]: https://github.com/jkogara [@tmorris-fiksu]: https://github.com/tmorris-fiksu [@mockdeep]: https://github.com/mockdeep [@hiroponz]: https://github.com/hiroponz [@tamird]: https://github.com/tamird [@fshowalter]: https://github.com/fshowalter [@cschramm]: https://github.com/cschramm [@bquorning]: https://github.com/bquorning [@bcobb]: https://github.com/bcobb [@irrationalfab]: https://github.com/irrationalfab [@tommeier]: https://github.com/tommeier [@sfeldon]: https://github.com/sfeldon [@biinari]: https://github.com/biinari [@barunio]: https://github.com/barunio [@molawson]: https://github.com/molawson [@wndhydrnt]: https://github.com/wndhydrnt [@ggilder]: https://github.com/ggilder [@salbertson]: https://github.com/salbertson