rubocop 0.37.0 → 0.37.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubocop might be problematic. Click here for more details.

Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +2 -3
  4. data/config/enabled.yml +2 -2
  5. data/lib/rubocop.rb +2 -1
  6. data/lib/rubocop/ast_node.rb +34 -17
  7. data/lib/rubocop/ast_node/traversal.rb +2 -1
  8. data/lib/rubocop/config.rb +1 -1
  9. data/lib/rubocop/cop/commissioner.rb +5 -5
  10. data/lib/rubocop/cop/corrector.rb +17 -3
  11. data/lib/rubocop/cop/lint/debugger.rb +2 -2
  12. data/lib/rubocop/cop/lint/nested_method_definition.rb +5 -1
  13. data/lib/rubocop/cop/lint/unneeded_disable.rb +1 -1
  14. data/lib/rubocop/cop/metrics/parameter_lists.rb +1 -1
  15. data/lib/rubocop/cop/performance/redundant_match.rb +2 -1
  16. data/lib/rubocop/cop/performance/redundant_merge.rb +1 -2
  17. data/lib/rubocop/cop/rails/find_each.rb +1 -1
  18. data/lib/rubocop/cop/style/block_end_newline.rb +1 -1
  19. data/lib/rubocop/cop/style/conditional_assignment.rb +25 -7
  20. data/lib/rubocop/cop/style/empty_line_between_defs.rb +13 -7
  21. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +1 -12
  22. data/lib/rubocop/cop/style/guard_clause.rb +3 -1
  23. data/lib/rubocop/cop/style/initial_indentation.rb +1 -1
  24. data/lib/rubocop/cop/style/line_end_concatenation.rb +1 -1
  25. data/lib/rubocop/cop/style/multiline_block_layout.rb +14 -12
  26. data/lib/rubocop/cop/style/not.rb +1 -1
  27. data/lib/rubocop/cop/style/semicolon.rb +14 -7
  28. data/lib/rubocop/cop/style/space_around_keyword.rb +13 -4
  29. data/lib/rubocop/cop/style/space_around_operators.rb +2 -2
  30. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +32 -27
  31. data/lib/rubocop/cop/style/word_array.rb +1 -1
  32. data/lib/rubocop/cop/team.rb +20 -9
  33. data/lib/rubocop/cop/util.rb +4 -5
  34. data/lib/rubocop/formatter/formatter_set.rb +3 -3
  35. data/lib/rubocop/version.rb +1 -1
  36. metadata +5 -43
  37. data/.yardopts +0 -2
  38. data/CHANGELOG.md +0 -1941
  39. data/CONTRIBUTING.md +0 -68
  40. data/assets/logo.png +0 -0
  41. data/assets/output.html.erb +0 -247
  42. data/logo/rubo-logo-horizontal.png +0 -0
  43. data/logo/rubo-logo-square.png +0 -0
  44. data/logo/rubo-logo-symbol.png +0 -0
  45. data/relnotes/v0.19.0.md +0 -94
  46. data/relnotes/v0.19.1.md +0 -16
  47. data/relnotes/v0.20.0.md +0 -69
  48. data/relnotes/v0.20.1.md +0 -24
  49. data/relnotes/v0.21.0.md +0 -56
  50. data/relnotes/v0.22.0.md +0 -77
  51. data/relnotes/v0.23.0.md +0 -79
  52. data/relnotes/v0.24.0.md +0 -77
  53. data/relnotes/v0.24.1.md +0 -15
  54. data/relnotes/v0.25.0.md +0 -91
  55. data/relnotes/v0.26.0.md +0 -89
  56. data/relnotes/v0.26.1.md +0 -12
  57. data/relnotes/v0.27.0.md +0 -77
  58. data/relnotes/v0.27.1.md +0 -66
  59. data/relnotes/v0.28.0.md +0 -90
  60. data/relnotes/v0.29.0.md +0 -116
  61. data/relnotes/v0.29.1.md +0 -12
  62. data/relnotes/v0.30.0.md +0 -145
  63. data/relnotes/v0.30.1.md +0 -103
  64. data/relnotes/v0.31.0.md +0 -120
  65. data/relnotes/v0.32.0.md +0 -139
  66. data/relnotes/v0.32.1.md +0 -122
  67. data/relnotes/v0.33.0.md +0 -157
  68. data/relnotes/v0.34.0.md +0 -182
  69. data/relnotes/v0.34.1.md +0 -129
  70. data/relnotes/v0.34.2.md +0 -139
  71. data/relnotes/v0.35.0.md +0 -210
  72. data/relnotes/v0.36.0.md +0 -307
  73. data/relnotes/v0.37.0.md +0 -200
  74. data/rubocop.gemspec +0 -49
@@ -1,12 +0,0 @@
1
- RuboCop 0.26.1 is a bugfix-only release. Below is a list of the bugs we've fixed since 0.26.0:
2
-
3
- ### Bugs fixed
4
-
5
- * [#1326](https://github.com/bbatsov/rubocop/issues/1326): Fix problem in `SpaceInsideParens` with detecting space inside parentheses used for grouping expressions. ([@jonas054][])
6
- * [#1335](https://github.com/bbatsov/rubocop/issues/1335): Restrict URI schemes permitted by `LineLength` when `AllowURI` is enabled. ([@smangelsdorf][])
7
- * [#1339](https://github.com/bbatsov/rubocop/issues/1339): Handle `eql?` and `equal?` in `OpMethod`. ([@bbatsov][])
8
- * [#1340](https://github.com/bbatsov/rubocop/issues/1340): Fix crash in `Style/SymbolProc` cop when the block calls a method with no explicit receiver. ([@smangelsdorf][])
9
-
10
- [@bbatsov]: https://github.com/bbatsov
11
- [@jonas054]: https://github.com/jonas054
12
- [@smangelsdorf]: https://github.com/smangelsdorf
@@ -1,77 +0,0 @@
1
- ### New features
2
-
3
- * [#1348](https://github.com/bbatsov/rubocop/issues/1348): New cop `ElseAlignment` checks alignment of `else` and `elsif` keywords. ([@jonas054][])
4
- * [#1321](https://github.com/bbatsov/rubocop/issues/1321): New cop `MultilineOperationIndentation` checks indentation/alignment of binary operations if they span more than one line. ([@jonas054][])
5
- * [#1077](https://github.com/bbatsov/rubocop/issues/1077): New cop `Metrics/AbcSize` checks the ABC metric, based on assignments, branches, and conditions. ([@jonas054][], [@jfelchner][])
6
- * [#1352](https://github.com/bbatsov/rubocop/issues/1352): `WordArray` is now configurable with the `WordRegex` option. ([@bquorning][])
7
- * [#1181](https://github.com/bbatsov/rubocop/issues/1181): New cop `Style/StringLiteralsInInterpolation` checks quotes inside interpolated expressions in strings. ([@jonas054][])
8
- * [#872](https://github.com/bbatsov/rubocop/issues/872): `Style/IndentationWidth` is now configurable with the `Width` option. ([@jonas054][])
9
- * [#1396](https://github.com/bbatsov/rubocop/issues/1396): Include `.opal` files by default. ([@bbatsov][])
10
- * [#771](https://github.com/bbatsov/rubocop/issues/771): Three new `Style` cops, `EmptyLinesAroundMethodBody` , `EmptyLinesAroundClassBody` , and `EmptyLinesAroundModuleBody` replace the `EmptyLinesAroundBody` cop. ([@jonas054][])
11
-
12
- ### Changes
13
-
14
- * [#1084](https://github.com/bbatsov/rubocop/issues/1084): Disabled `Style/CollectionMethods` by default. ([@bbatsov][])
15
-
16
- ### Bugs fixed
17
-
18
- * `AlignHash` no longer skips multiline hashes that contain some elements on the same line. ([@mvz][])
19
- * [#1349](https://github.com/bbatsov/rubocop/issues/1349): `BracesAroundHashParameters` no longer cleans up whitespace in autocorrect, as these extra corrections are likely to interfere with other cops' corrections. ([@jonas054][])
20
- * [#1350](https://github.com/bbatsov/rubocop/issues/1350): Guard against `Blocks` cop introducing syntax errors in auto-correct. ([@jonas054][])
21
- * [#1374](https://github.com/bbatsov/rubocop/issues/1374): To eliminate interference, auto-correction is now done by one cop at a time, with saving and re-parsing inbetween. ([@jonas054][])
22
- * [#1388](https://github.com/bbatsov/rubocop/issues/1388): Fix a false positive in `FormatString`. ([@bbatsov][])
23
- * [#1389](https://github.com/bbatsov/rubocop/issues/1389): Make `--out` to create parent directories. ([@yous][])
24
- * Refine HTML formatter. ([@yujinakayama][])
25
- * [#1410](https://github.com/bbatsov/rubocop/issues/1410): Handle specially Java primitive type references in `ColonMethodCall`. ([@bbatsov][])
26
-
27
- [@bbatsov]: https://github.com/bbatsov
28
- [@jonas054]: https://github.com/jonas054
29
- [@yujinakayama]: https://github.com/yujinakayama
30
- [@dblock]: https://github.com/dblock
31
- [@nevir]: https://github.com/nevir
32
- [@daviddavis]: https://github.com/daviddavis
33
- [@sds]: https://github.com/sds
34
- [@fancyremarker]: https://github.com/fancyremarker
35
- [@sinisterchipmunk]: https://github.com/sinisterchipmunk
36
- [@vonTronje]: https://github.com/vonTronje
37
- [@agrimm]: https://github.com/agrimm
38
- [@pmenglund]: https://github.com/pmenglund
39
- [@chulkilee]: https://github.com/chulkilee
40
- [@codez]: https://github.com/codez
41
- [@emou]: https://github.com/emou
42
- [@skanev]: http://github.com/skanev
43
- [@claco]: http://github.com/claco
44
- [@rifraf]: http://github.com/rifraf
45
- [@scottmatthewman]: https://github.com/scottmatthewman
46
- [@ma2gedev]: http://github.com/ma2gedev
47
- [@jeremyolliver]: https://github.com/jeremyolliver
48
- [@hannestyden]: https://github.com/hannestyden
49
- [@geniou]: https://github.com/geniou
50
- [@jkogara]: https://github.com/jkogara
51
- [@tmorris-fiksu]: https://github.com/tmorris-fiksu
52
- [@mockdeep]: https://github.com/mockdeep
53
- [@hiroponz]: https://github.com/hiroponz
54
- [@tamird]: https://github.com/tamird
55
- [@fshowalter]: https://github.com/fshowalter
56
- [@cschramm]: https://github.com/cschramm
57
- [@bquorning]: https://github.com/bquorning
58
- [@bcobb]: https://github.com/bcobb
59
- [@irrationalfab]: https://github.com/irrationalfab
60
- [@tommeier]: https://github.com/tommeier
61
- [@sfeldon]: https://github.com/sfeldon
62
- [@biinari]: https://github.com/biinari
63
- [@barunio]: https://github.com/barunio
64
- [@molawson]: https://github.com/molawson
65
- [@wndhydrnt]: https://github.com/wndhydrnt
66
- [@ggilder]: https://github.com/ggilder
67
- [@salbertson]: https://github.com/salbertson
68
- [@camilleldn]: https://github.com/camilleldn
69
- [@mcls]: https://github.com/mcls
70
- [@yous]: https://github.com/yous
71
- [@vrthra]: https://github.com/vrthra
72
- [@SkuliOskarsson]: https://github.com/SkuliOskarsson
73
- [@jspanjers]: https://github.com/jspanjers
74
- [@sch1zo]: https://github.com/sch1zo
75
- [@smangelsdorf]: https://github.com/smangelsdorf
76
- [@mvz]: https://github.com/mvz
77
- [@jfelchner]: https://github.com/jfelchner
@@ -1,66 +0,0 @@
1
- ### Changes
2
-
3
- * [#1343](https://github.com/bbatsov/rubocop/issues/1343): Remove auto-correct from `RescueException` cop. ([@bbatsov][])
4
- * [#1425](https://github.com/bbatsov/rubocop/issues/1425): `AllCops/Include` configuration parameters are only taken from the project `.rubocop.yml` and files it inherits from, not from `.rubocop.yml` files in subdirectories. ([@jonas054][])
5
-
6
- ### Bugs fixed
7
-
8
- * [#1411](https://github.com/bbatsov/rubocop/issues/1411): Handle lambda calls without a selector in `MultilineOperationIndentation`. ([@bbatsov][])
9
- * [#1401](https://github.com/bbatsov/rubocop/issues/1401): Files in hidden directories, i.e. ones beginning with dot, can now be selected through configuration, but are still not included by default. ([@jonas054][])
10
- * [#1415](https://github.com/bbatsov/rubocop/issues/1415): String literals concatenated with backslashes are now handled correctly by `StringLiteralsInInterpolation`. ([@jonas054][])
11
- * [#1416](https://github.com/bbatsov/rubocop/issues/1416): Fix handling of `begin/rescue/else/end` in `ElseAlignment`. ([@jonas054][])
12
- * [#1413](https://github.com/bbatsov/rubocop/issues/1413): Support empty elsif branches in `MultilineIfThen`. ([@janraasch][], [@jonas054][])
13
- * [#1406](https://github.com/bbatsov/rubocop/issues/1406): Allow a newline in `SpaceInsideRangeLiteral`. ([@bbatsov][])
14
-
15
- [@bbatsov]: https://github.com/bbatsov
16
- [@jonas054]: https://github.com/jonas054
17
- [@yujinakayama]: https://github.com/yujinakayama
18
- [@dblock]: https://github.com/dblock
19
- [@nevir]: https://github.com/nevir
20
- [@daviddavis]: https://github.com/daviddavis
21
- [@sds]: https://github.com/sds
22
- [@fancyremarker]: https://github.com/fancyremarker
23
- [@sinisterchipmunk]: https://github.com/sinisterchipmunk
24
- [@vonTronje]: https://github.com/vonTronje
25
- [@agrimm]: https://github.com/agrimm
26
- [@pmenglund]: https://github.com/pmenglund
27
- [@chulkilee]: https://github.com/chulkilee
28
- [@codez]: https://github.com/codez
29
- [@emou]: https://github.com/emou
30
- [@skanev]: http://github.com/skanev
31
- [@claco]: http://github.com/claco
32
- [@rifraf]: http://github.com/rifraf
33
- [@scottmatthewman]: https://github.com/scottmatthewman
34
- [@ma2gedev]: http://github.com/ma2gedev
35
- [@jeremyolliver]: https://github.com/jeremyolliver
36
- [@hannestyden]: https://github.com/hannestyden
37
- [@geniou]: https://github.com/geniou
38
- [@jkogara]: https://github.com/jkogara
39
- [@tmorris-fiksu]: https://github.com/tmorris-fiksu
40
- [@mockdeep]: https://github.com/mockdeep
41
- [@hiroponz]: https://github.com/hiroponz
42
- [@tamird]: https://github.com/tamird
43
- [@fshowalter]: https://github.com/fshowalter
44
- [@cschramm]: https://github.com/cschramm
45
- [@bquorning]: https://github.com/bquorning
46
- [@bcobb]: https://github.com/bcobb
47
- [@irrationalfab]: https://github.com/irrationalfab
48
- [@tommeier]: https://github.com/tommeier
49
- [@sfeldon]: https://github.com/sfeldon
50
- [@biinari]: https://github.com/biinari
51
- [@barunio]: https://github.com/barunio
52
- [@molawson]: https://github.com/molawson
53
- [@wndhydrnt]: https://github.com/wndhydrnt
54
- [@ggilder]: https://github.com/ggilder
55
- [@salbertson]: https://github.com/salbertson
56
- [@camilleldn]: https://github.com/camilleldn
57
- [@mcls]: https://github.com/mcls
58
- [@yous]: https://github.com/yous
59
- [@vrthra]: https://github.com/vrthra
60
- [@SkuliOskarsson]: https://github.com/SkuliOskarsson
61
- [@jspanjers]: https://github.com/jspanjers
62
- [@sch1zo]: https://github.com/sch1zo
63
- [@smangelsdorf]: https://github.com/smangelsdorf
64
- [@mvz]: https://github.com/mvz
65
- [@jfelchner]: https://github.com/jfelchner
66
- [@janraasch]: https://github.com/janraasch
@@ -1,90 +0,0 @@
1
- ### New features
2
-
3
- * New cop `ExtraSpacing` points out unnecessary spacing in files. ([@blainesch][])
4
- * New cop `EmptyLinesAroundBlockBody` provides same functionality as the EmptyLinesAround(Class|Method|Module)Body but for blocks. ([@jcarbo][])
5
- * New cop `Style/EmptyElse` checks for empty `else`-clauses. ([@Koronen][])
6
- * [#1454](https://github.com/bbatsov/rubocop/issues/1454): New `--only-guide-cops` and `AllCops/StyleGuideCopsOnly` options that will only enforce cops that link to a style guide. ([@marxarelli][])
7
-
8
- ### Changes
9
-
10
- * [#801](https://github.com/bbatsov/rubocop/issues/801): New style `context_dependent` for `Style/BracesAroundHashParameters` looks at preceding parameter to determine if braces should be used for final parameter. ([@jonas054][])
11
- * [#1427](https://github.com/bbatsov/rubocop/issues/1427): Excluding directories on the top level is now done earlier, so that these file trees are not searched, thus saving time when inspecting projects with many excluded files. ([@jonas054][])
12
- * [#1325](https://github.com/bbatsov/rubocop/issues/1325): When running with `--auto-correct`, only offenses *that can not be corrected* will result in a non-zero exit code. ([@jonas054][])
13
- * [#1445](https://github.com/bbatsov/rubocop/issues/1445): Allow sprockets directive comments (starting with `#=`) in `Style/LeadingCommentSpace`. ([@bbatsov][])
14
-
15
- ### Bugs fixed
16
-
17
- * Fix `%W[]` auto corrected to `%w(]`. ([@toy][])
18
- * Fix Style/ElseAlignment Cop to find the right parent on def/rescue/else/ensure/end. ([@oneamtu][])
19
- * [#1181](https://github.com/bbatsov/rubocop/issues/1181): *(fix again)* `Style/StringLiterals` cop stays away from strings inside interpolated expressions. ([@jonas054][])
20
- * [#1441](https://github.com/bbatsov/rubocop/issues/1441): Correct the logic used by `Style/Blocks` and other cops to determine if an auto-correction would alter the meaning of the code. ([@jonas054][])
21
- * [#1449](https://github.com/bbatsov/rubocop/issues/1449): Handle the case in `MultilineOperationIndentation` where instances of both correct style and unrecognized (plain wrong) style are detected during an `--auto-gen-config` run. ([@jonas054][])
22
- * [#1456](https://github.com/bbatsov/rubocop/pull/1456): Fix autocorrect in `SymbolProc` when there are multiple offenses on the same line. ([@jcarbo][])
23
- * [#1459](https://github.com/bbatsov/rubocop/issues/1459): Handle parenthesis around the condition in `--auto-correct` for `NegatedWhile`. ([@jonas054][])
24
- * [#1465](https://github.com/bbatsov/rubocop/issues/1465): Fix autocorrect of code like `#$1` in `PerlBackrefs`. ([@bbatsov][])
25
- * Fix autocorrect of code like `#$:` in `SpecialGlobalVars`. ([@bbatsov][])
26
- * [#1466](https://github.com/bbatsov/rubocop/issues/1466): Allow leading underscore for unused parameters in `SingleLineBlockParams`. ([@jonas054][])
27
- * [#1470](https://github.com/bbatsov/rubocop/issues/1470): Handle `elsif` + `else` in `ElseAlignment`. ([@jonas054][])
28
- * [#1474](https://github.com/bbatsov/rubocop/issues/1474): Multiline string with both `<<` and `\` caught by `Style/LineEndConcatenation` cop. ([@katieschilling][])
29
- * [#1485](https://github.com/bbatsov/rubocop/issues/1485): Ignore procs in `SymbolProc`. ([@bbatsov][])
30
- * [#1473](https://github.com/bbatsov/rubocop/issues/1473): `Style/MultilineOperationIndentation` doesn't recognize assignment to array/hash element. ([@jonas054][])
31
-
32
- [@bbatsov]: https://github.com/bbatsov
33
- [@jonas054]: https://github.com/jonas054
34
- [@yujinakayama]: https://github.com/yujinakayama
35
- [@dblock]: https://github.com/dblock
36
- [@nevir]: https://github.com/nevir
37
- [@daviddavis]: https://github.com/daviddavis
38
- [@sds]: https://github.com/sds
39
- [@fancyremarker]: https://github.com/fancyremarker
40
- [@sinisterchipmunk]: https://github.com/sinisterchipmunk
41
- [@vonTronje]: https://github.com/vonTronje
42
- [@agrimm]: https://github.com/agrimm
43
- [@pmenglund]: https://github.com/pmenglund
44
- [@chulkilee]: https://github.com/chulkilee
45
- [@codez]: https://github.com/codez
46
- [@emou]: https://github.com/emou
47
- [@skanev]: http://github.com/skanev
48
- [@claco]: http://github.com/claco
49
- [@rifraf]: http://github.com/rifraf
50
- [@scottmatthewman]: https://github.com/scottmatthewman
51
- [@ma2gedev]: http://github.com/ma2gedev
52
- [@jeremyolliver]: https://github.com/jeremyolliver
53
- [@hannestyden]: https://github.com/hannestyden
54
- [@geniou]: https://github.com/geniou
55
- [@jkogara]: https://github.com/jkogara
56
- [@tmorris-fiksu]: https://github.com/tmorris-fiksu
57
- [@mockdeep]: https://github.com/mockdeep
58
- [@hiroponz]: https://github.com/hiroponz
59
- [@tamird]: https://github.com/tamird
60
- [@fshowalter]: https://github.com/fshowalter
61
- [@cschramm]: https://github.com/cschramm
62
- [@bquorning]: https://github.com/bquorning
63
- [@bcobb]: https://github.com/bcobb
64
- [@irrationalfab]: https://github.com/irrationalfab
65
- [@tommeier]: https://github.com/tommeier
66
- [@sfeldon]: https://github.com/sfeldon
67
- [@biinari]: https://github.com/biinari
68
- [@barunio]: https://github.com/barunio
69
- [@molawson]: https://github.com/molawson
70
- [@wndhydrnt]: https://github.com/wndhydrnt
71
- [@ggilder]: https://github.com/ggilder
72
- [@salbertson]: https://github.com/salbertson
73
- [@camilleldn]: https://github.com/camilleldn
74
- [@mcls]: https://github.com/mcls
75
- [@yous]: https://github.com/yous
76
- [@vrthra]: https://github.com/vrthra
77
- [@SkuliOskarsson]: https://github.com/SkuliOskarsson
78
- [@jspanjers]: https://github.com/jspanjers
79
- [@sch1zo]: https://github.com/sch1zo
80
- [@smangelsdorf]: https://github.com/smangelsdorf
81
- [@mvz]: https://github.com/mvz
82
- [@jfelchner]: https://github.com/jfelchner
83
- [@janraasch]: https://github.com/janraasch
84
- [@jcarbo]: https://github.com/jcarbo
85
- [@oneamtu]: https://github.com/oneamtu
86
- [@toy]: https://github.com/toy
87
- [@Koronen]: https://github.com/Koronen
88
- [@blainesch]: https://github.com/blainesch
89
- [@marxarelli]: https://github.com/marxarelli
90
- [@katieschilling]: https://github.com/katieschilling
@@ -1,116 +0,0 @@
1
- ### New features
2
-
3
- * [#1430](https://github.com/bbatsov/rubocop/issues/1430): Add `--except` option for disabling cops on the command line. ([@jonas054][])
4
- * [#1506](https://github.com/bbatsov/rubocop/pull/1506): Add auto-correct from `EvenOdd` cop. ([@blainesch][])
5
- * [#1507](https://github.com/bbatsov/rubocop/issues/1507): `Debugger` cop now checks for the Capybara debug methods `save_and_open_page` and `save_and_open_screenshot`. ([@rrosenblum][])
6
- * [#1539](https://github.com/bbatsov/rubocop/pull/1539): Implement autocorrection for Rails/ReadWriteAttribute cop. ([@huerlisi][])
7
- * [#1324](https://github.com/bbatsov/rubocop/issues/1324): Add `AllCops/DisplayCopNames` configuration option for showing cop names in reports, like `--display-cop-names`. ([@jonas054][])
8
- * [#1271](https://github.com/bbatsov/rubocop/issues/1271): `Lambda` cop does auto-correction. ([@lumeet][])
9
- * [#1284](https://github.com/bbatsov/rubocop/issues/1284): Support namespaces, e.g. `Lint`, in the arguments to `--only` and `--except`. ([@jonas054][])
10
- * [#1276](https://github.com/bbatsov/rubocop/issues/1276): `SelfAssignment` cop does auto-correction. ([@lumeet][])
11
- * Add autocorrect to `RedundantException`. ([@mattjmcnaughton][])
12
- * [#1571](https://github.com/bbatsov/rubocop/pull/1571): New cop `StructInheritance` checks for inheritance from Struct.new. ([@mmozuras][])
13
- * [#1575](https://github.com/bbatsov/rubocop/issues/1575): New cop `DuplicateMethods` points out duplicate method name in class and module. ([@d4rk5eed][])
14
- * [#1144](https://github.com/bbatsov/rubocop/issues/1144): New cop `FirstParameterIndentation` checks the indentation of the first parameter in a method call. ([@jonas054][])
15
- * [#1627](https://github.com/bbatsov/rubocop/issues/1627): New cop `SpaceAroundBlockParameters` checks the spacing inside and after block parameters pipes. ([@jonas054][])
16
-
17
- ### Changes
18
-
19
- * [#1492](https://github.com/bbatsov/rubocop/pull/1492): Abort when auto-correct causes an infinite loop. ([@dblock][])
20
- * Options `-e`/`--emacs` and `-s`/`--silent` are no longer recognized. Using them will now raise an error. ([@bquorning][])
21
- * [#1565](https://github.com/bbatsov/rubocop/issues/1565): Let `--fail-level A` cause exit with error if all offenses are auto-corrected. ([@jonas054][])
22
- * [#1309](https://github.com/bbatsov/rubocop/issues/1309): Add argument handling to `MultilineBlockLayout`. ([@lumeet][])
23
-
24
- ### Bugs fixed
25
-
26
- * [#1634](https://github.com/bbatsov/rubocop/pull/1634): Fix `PerlBackrefs` Cop Autocorrections to Not Raise. ([@cshaffer][])
27
- * [#1553](https://github.com/bbatsov/rubocop/pull/1553): Fix bug where `Style/EmptyLinesAroundAccessModifier` interfered with `Style/EmptyLinesAroundBlockBody` when there is and access modifier at the beginning of a block. ([@volkert][])
28
- * Handle element assignment in `Lint/AssignmentInCondition`. ([@jonas054][])
29
- * [#1484](https://github.com/bbatsov/rubocop/issues/1484): Fix `EmptyLinesAroundAccessModifier` incorrectly finding a violation inside method calls with names identical to an access modifier. ([@dblock][])
30
- * Fix bug concerning `Exclude` properties inherited from a higher directory level. ([@jonas054][])
31
- * [#1500](https://github.com/bbatsov/rubocop/issues/1500): Fix crashing `--auto-correct --only IndentationWidth`. ([@jonas054][])
32
- * [#1512](https://github.com/bbatsov/rubocop/issues/1512): Fix false negative for typical string formatting examples. ([@kakutani][], [@jonas054][])
33
- * [#1504](https://github.com/bbatsov/rubocop/issues/1504): Fail with a meaningful error if the configuration file is malformed. ([@bquorning][])
34
- * Fix bug where `auto_correct` Rake tasks does not take in the options specified in its parent task. ([@rrosenblum][])
35
- * [#1054](https://github.com/bbatsov/rubocop/issues/1054): Handle comments within concatenated strings in `LineEndConcatenation`. ([@yujinakayama][], [@jonas054][])
36
- * [#1527](https://github.com/bbatsov/rubocop/issues/1527): Make autocorrect `BracesAroundHashParameter` leave the correct number of spaces. ([@mattjmcnaughton][])
37
- * [#1547](https://github.com/bbatsov/rubocop/issues/1547): Don't print `[Corrected]` when auto-correction was avoided in `Style/Semicolon`. ([@jonas054][])
38
- * [#1573](https://github.com/bbatsov/rubocop/issues/1573): Fix assignment-related auto-correction for `BlockAlignment`. ([@lumeet][])
39
- * [#1587](https://github.com/bbatsov/rubocop/pull/1587): Exit with exit code 1 if there were errors ("crashing" cops). ([@jonas054][])
40
- * [#1574](https://github.com/bbatsov/rubocop/issues/1574): Avoid auto-correcting `Hash.new` to `{}` when braces would be interpreted as a block. ([@jonas054][])
41
- * [#1591](https://github.com/bbatsov/rubocop/issues/1591): Don't check parameters inside `[]` in `MultilineOperationIndentation`. ([@jonas054][])
42
- * [#1509](https://github.com/bbatsov/rubocop/issues/1509): Ignore class methods in `Rails/Delegate`. ([@bbatsov][])
43
- * [#1594](https://github.com/bbatsov/rubocop/issues/1594): Fix `@example` warnings in Yard Doc documentation generation. ([@mattjmcnaughton][])
44
- * [#1598](https://github.com/bbatsov/rubocop/issues/1598): Fix bug in file inclusion when running from another directory. ([@jonas054][])
45
- * [#1580](https://github.com/bbatsov/rubocop/issues/1580): Don't print `[Corrected]` when auto-correction was avoided in `TrivialAccessors`. ([@lumeet][])
46
- * [#1612](https://github.com/bbatsov/rubocop/issues/1612): Allow `expand_path` on `inherit_from` in `.rubocop.yml`. ([@mattjmcnaughton][])
47
- * [#1610](https://github.com/bbatsov/rubocop/issues/1610): Check that class method names actually match the name of the containing class/module in `Style/ClassMethods`. ([@bbatsov][])
48
-
49
- [@bbatsov]: https://github.com/bbatsov
50
- [@jonas054]: https://github.com/jonas054
51
- [@yujinakayama]: https://github.com/yujinakayama
52
- [@dblock]: https://github.com/dblock
53
- [@nevir]: https://github.com/nevir
54
- [@daviddavis]: https://github.com/daviddavis
55
- [@sds]: https://github.com/sds
56
- [@fancyremarker]: https://github.com/fancyremarker
57
- [@sinisterchipmunk]: https://github.com/sinisterchipmunk
58
- [@vonTronje]: https://github.com/vonTronje
59
- [@agrimm]: https://github.com/agrimm
60
- [@pmenglund]: https://github.com/pmenglund
61
- [@chulkilee]: https://github.com/chulkilee
62
- [@codez]: https://github.com/codez
63
- [@emou]: https://github.com/emou
64
- [@skanev]: http://github.com/skanev
65
- [@claco]: http://github.com/claco
66
- [@rifraf]: http://github.com/rifraf
67
- [@scottmatthewman]: https://github.com/scottmatthewman
68
- [@ma2gedev]: http://github.com/ma2gedev
69
- [@jeremyolliver]: https://github.com/jeremyolliver
70
- [@hannestyden]: https://github.com/hannestyden
71
- [@geniou]: https://github.com/geniou
72
- [@jkogara]: https://github.com/jkogara
73
- [@tmorris-fiksu]: https://github.com/tmorris-fiksu
74
- [@mockdeep]: https://github.com/mockdeep
75
- [@hiroponz]: https://github.com/hiroponz
76
- [@tamird]: https://github.com/tamird
77
- [@fshowalter]: https://github.com/fshowalter
78
- [@cschramm]: https://github.com/cschramm
79
- [@bquorning]: https://github.com/bquorning
80
- [@bcobb]: https://github.com/bcobb
81
- [@irrationalfab]: https://github.com/irrationalfab
82
- [@tommeier]: https://github.com/tommeier
83
- [@sfeldon]: https://github.com/sfeldon
84
- [@biinari]: https://github.com/biinari
85
- [@barunio]: https://github.com/barunio
86
- [@molawson]: https://github.com/molawson
87
- [@wndhydrnt]: https://github.com/wndhydrnt
88
- [@ggilder]: https://github.com/ggilder
89
- [@salbertson]: https://github.com/salbertson
90
- [@camilleldn]: https://github.com/camilleldn
91
- [@mcls]: https://github.com/mcls
92
- [@yous]: https://github.com/yous
93
- [@vrthra]: https://github.com/vrthra
94
- [@SkuliOskarsson]: https://github.com/SkuliOskarsson
95
- [@jspanjers]: https://github.com/jspanjers
96
- [@sch1zo]: https://github.com/sch1zo
97
- [@smangelsdorf]: https://github.com/smangelsdorf
98
- [@mvz]: https://github.com/mvz
99
- [@jfelchner]: https://github.com/jfelchner
100
- [@janraasch]: https://github.com/janraasch
101
- [@jcarbo]: https://github.com/jcarbo
102
- [@oneamtu]: https://github.com/oneamtu
103
- [@toy]: https://github.com/toy
104
- [@Koronen]: https://github.com/Koronen
105
- [@blainesch]: https://github.com/blainesch
106
- [@marxarelli]: https://github.com/marxarelli
107
- [@katieschilling]: https://github.com/katieschilling
108
- [@kakutani]: https://github.com/kakutani
109
- [@rrosenblum]: https://github.com/rrosenblum
110
- [@mattjmcnaughton]: https://github.com/mattjmcnaughton
111
- [@huerlisi]: https://github.com/huerlisi
112
- [@volkert]: https://github.com/volkert
113
- [@lumeet]: https://github.com/lumeet
114
- [@mmozuras]: https://github.com/mmozuras
115
- [@d4rk5eed]: https://github.com/d4rk5eed
116
- [@cshaffer]: https://github.com/cshaffer
@@ -1,12 +0,0 @@
1
- ### Bugs fixed
2
-
3
- * [#1638](https://github.com/bbatsov/rubocop/issues/1638): Use Parser functionality rather than regular expressions for matching comments in `FirstParameterIndentation`. ([@jonas054][])
4
- * [#1642](https://github.com/bbatsov/rubocop/issues/1642): Raise the correct exception if the configuration file is malformed. ([@bquorning][])
5
- * [#1647](https://github.com/bbatsov/rubocop/issues/1647): Skip `SpaceAroundBlockParameters` when lambda has no argument. ([@eitoball][])
6
- * [#1649](https://github.com/bbatsov/rubocop/issues/1649): Handle exception assignments in `UselessSetterCall`. ([@bbatsov][])
7
- * [#1644](https://github.com/bbatsov/rubocop/issues/1644): Don't search the entire file system when a folder is named `,`. ([@bquorning][])
8
-
9
- [@bbatsov]: https://github.com/bbatsov
10
- [@jonas054]: https://github.com/jonas054
11
- [@bquorning]: https://github.com/bquorning
12
- [@eitoball]: https://github.com/eitoball
@@ -1,145 +0,0 @@
1
- Nothing ground-breaking this time around, but the release is pretty exciting non-the-less.
2
- It packs a whole new category of cops (`Performance`) and a bunch of new Rails cops.
3
- A lot of the existing cops got new customization options and we squashed a ton of bugs.
4
-
5
- Thanks to everyone who contributed to this release!
6
-
7
- ### New features
8
-
9
- * [#1600](https://github.com/bbatsov/rubocop/issues/1600): Add `line_count_based` and `semantic` styles to the `BlockDelimiters` (formerly `Blocks`) cop. ([@clowder][], [@mudge][])
10
- * [#1712](https://github.com/bbatsov/rubocop/pull/1712): Set `Offense#corrected?` to `true`, `false`, or `nil` when it was, wasn't, or can't be auto-corrected, respectively. ([@vassilevsky][])
11
- * [#1669](https://github.com/bbatsov/rubocop/pull/1669): Add command-line switch `--display-style-guide`. ([@marxarelli][])
12
- * [#1405](https://github.com/bbatsov/rubocop/issues/1405): Add Rails TimeZone and Date cops. ([@palkan][])
13
- * [#1641](https://github.com/bbatsov/rubocop/pull/1641): Add ruby19_no_mixed_keys style to `HashStyle` cop. ([@iainbeeston][])
14
- * [#1604](https://github.com/bbatsov/rubocop/issues/1604): Add `IgnoreClassMethods` option to `TrivialAccessors` cop. ([@bbatsov][])
15
- * [#1651](https://github.com/bbatsov/rubocop/issues/1651): The `Style/SpaceAroundOperators` cop now also detects extra spaces around operators. A list of operators that *may* be surrounded by multiple spaces is configurable. ([@bquorning][])
16
- * Add auto-correct to `Encoding` cop. ([@rrosenblum][])
17
- * [#1621](https://github.com/bbatsov/rubocop/issues/1621): `TrailingComma` has a new style `consistent_comma`. ([@tamird][])
18
- * [#1611](https://github.com/bbatsov/rubocop/issues/1611): Add `empty`, `nil`, and `both` `SupportedStyles` to `EmptyElse` cop. Default is `both`. ([@rrosenblum][])
19
- * [#1611](https://github.com/bbatsov/rubocop/issues/1611): Add new `MissingElse` cop. Default is to have this cop be disabled. ([@rrosenblum][])
20
- * [#1602](https://github.com/bbatsov/rubocop/issues/1602): Add support for `# :nodoc` in `Documentation`. ([@lumeet][])
21
- * [#1437](https://github.com/bbatsov/rubocop/issues/1437): Modify `HashSyntax` cop to allow the use of hash rockets for hashes that have symbol values when using ruby19 syntax. ([@rrosenblum][])
22
- * New cop `Style/SymbolLiteral` makes sure you're not using the string within symbol syntax unless it's needed. ([@bbatsov][])
23
- * [#1657](https://github.com/bbatsov/rubocop/issues/1657): Autocorrect can be turned off on a specific cop via the configuration. ([@jdoconnor][])
24
- * New cop `Style/AutoResourceCleanup` suggests the use of block taking versions of methods that do resource cleanup. ([@bbatsov][])
25
- * [#1275](https://github.com/bbatsov/rubocop/issues/1275): `WhileUntilModifier` cop does auto-correction. ([@lumeet][])
26
- * New cop `Performance/ReverseEach` to convert `reverse.each` to `reverse_each`. ([@rrosenblum][])
27
- * [#1281](https://github.com/bbatsov/rubocop/issues/1281): `IfUnlessModifier` cop does auto-correction. ([@lumeet][])
28
- * New cop `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][])
29
- * [#1728](https://github.com/bbatsov/rubocop/pull/1728): New cop `NonLocalExitFromIterator` checks for misused `return` in block. ([@ypresto][])
30
- * New cop `Performance/Size` to convert calls to `count` on `Array` and `Hash` to `size`. ([@rrosenblum][])
31
- * New cop `Performance/Sample` to convert usages of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]` to `sample`. ([@rrosenblum][])
32
- * New cop `Performance/FlatMap` to convert `Enumerable#map...Array#flatten` and `Enumerable#collect...Array#flatten` to `Enumerable#flat_map`. ([@rrosenblum][])
33
- * [#1144](https://github.com/bbatsov/rubocop/issues/1144): New cop `ClosingParenthesisIndentation` checks the indentation of hanging closing parentheses. ([@jonas054][])
34
- * New Rails cop `FindBy` identifies usages of `where.first` and `where.take`. ([@bbatsov][])
35
- * New Rails cop `FindEach` identifies usages of `all.each`. ([@bbatsov][])
36
- * [#1342](https://github.com/bbatsov/rubocop/issues/1342): `IndentationConsistency` is now configurable with the styles `normal` and `rails`. ([@jonas054][])
37
-
38
- ### Bugs fixed
39
-
40
- * [#1705](https://github.com/bbatsov/rubocop/issues/1705): Fix crash when reporting offenses of `MissingElse` cop. ([@gerry3][])
41
- * [#1659](https://github.com/bbatsov/rubocop/pull/1659): Fix stack overflow with JRuby and Windows 8, during initial config validation. ([@pimterry][])
42
- * [#1694](https://github.com/bbatsov/rubocop/issues/1694): Ignore methods with a `blockarg` in `TrivialAccessors`. ([@bbatsov][])
43
- * [#1617](https://github.com/bbatsov/rubocop/issues/1617): Always read the html output template using utf-8. ([@bbatsov][])
44
- * [#1684](https://github.com/bbatsov/rubocop/issues/1684): Ignore symbol keys like `:"string"` in `HashSyntax`. ([@bbatsov][])
45
- * Handle explicit `begin` blocks in `Lint/Void`. ([@bbatsov][])
46
- * Handle symbols in `Lint/Void`. ([@bbatsov][])
47
- * [#1695](https://github.com/bbatsov/rubocop/pull/1695): Fix bug with `--auto-gen-config` and `SpaceInsideBlockBraces`. ([@meganemura][])
48
- * Correct issues with whitespace around multi-line lambda arguments. ([@zvkemp][])
49
- * [#1579](https://github.com/bbatsov/rubocop/issues/1579): Fix handling of similar-looking blocks in `BlockAlignment`. ([@lumeet][])
50
- * [#1676](https://github.com/bbatsov/rubocop/pull/1676): Fix auto-correct in `Lambda` when a new multi-line lambda is used as an argument. ([@lumeet][])
51
- * [#1656](https://github.com/bbatsov/rubocop/issues/1656): Fix bug that would include hidden directories implicitly. ([@jonas054][])
52
- * [#1728](https://github.com/bbatsov/rubocop/pull/1728): Fix bug in `LiteralInInterpolation` and `AssignmentInCondition`. ([@ypresto][])
53
- * [#1735](https://github.com/bbatsov/rubocop/issues/1735): Handle trailing space in `LineEndConcatenation` autocorrect. ([@jonas054][])
54
- * [#1750](https://github.com/bbatsov/rubocop/issues/1750): Escape offending code lines output by the HTML formatter in case they contain markup. ([@jonas054][])
55
- * [#1541](https://github.com/bbatsov/rubocop/issues/1541): No inspection of text that follows `__END__`. ([@jonas054][])
56
- * Fix comment detection in `Style/Documentation`. ([@lumeet][])
57
- * [#1637](https://github.com/bbatsov/rubocop/issues/1637): Fix handling of `binding` calls in `UnusedBlockArgument` and `UnusedMethodArgument`. ([@lumeet][])
58
-
59
- ### Changes
60
-
61
- * [#1397](https://github.com/bbatsov/rubocop/issues/1397): `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][])
62
- * [#1020](https://github.com/bbatsov/rubocop/issues/1020): Removed the `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][])
63
- * [#1734](https://github.com/bbatsov/rubocop/issues/1734): The default exclusion of hidden directories has been optimized for speed. ([@jonas054][])
64
- * [#1673](https://github.com/bbatsov/rubocop/issues/1673): `Style/TrivialAccessors` now requires matching names by default. ([@bbatsov][])
65
-
66
- [@bbatsov]: https://github.com/bbatsov
67
- [@jonas054]: https://github.com/jonas054
68
- [@yujinakayama]: https://github.com/yujinakayama
69
- [@dblock]: https://github.com/dblock
70
- [@nevir]: https://github.com/nevir
71
- [@daviddavis]: https://github.com/daviddavis
72
- [@sds]: https://github.com/sds
73
- [@fancyremarker]: https://github.com/fancyremarker
74
- [@sinisterchipmunk]: https://github.com/sinisterchipmunk
75
- [@vonTronje]: https://github.com/vonTronje
76
- [@agrimm]: https://github.com/agrimm
77
- [@pmenglund]: https://github.com/pmenglund
78
- [@chulkilee]: https://github.com/chulkilee
79
- [@codez]: https://github.com/codez
80
- [@emou]: https://github.com/emou
81
- [@skanev]: http://github.com/skanev
82
- [@claco]: http://github.com/claco
83
- [@rifraf]: http://github.com/rifraf
84
- [@scottmatthewman]: https://github.com/scottmatthewman
85
- [@ma2gedev]: http://github.com/ma2gedev
86
- [@jeremyolliver]: https://github.com/jeremyolliver
87
- [@hannestyden]: https://github.com/hannestyden
88
- [@geniou]: https://github.com/geniou
89
- [@jkogara]: https://github.com/jkogara
90
- [@tmorris-fiksu]: https://github.com/tmorris-fiksu
91
- [@mockdeep]: https://github.com/mockdeep
92
- [@hiroponz]: https://github.com/hiroponz
93
- [@tamird]: https://github.com/tamird
94
- [@fshowalter]: https://github.com/fshowalter
95
- [@cschramm]: https://github.com/cschramm
96
- [@bquorning]: https://github.com/bquorning
97
- [@bcobb]: https://github.com/bcobb
98
- [@irrationalfab]: https://github.com/irrationalfab
99
- [@tommeier]: https://github.com/tommeier
100
- [@sfeldon]: https://github.com/sfeldon
101
- [@biinari]: https://github.com/biinari
102
- [@barunio]: https://github.com/barunio
103
- [@molawson]: https://github.com/molawson
104
- [@wndhydrnt]: https://github.com/wndhydrnt
105
- [@ggilder]: https://github.com/ggilder
106
- [@salbertson]: https://github.com/salbertson
107
- [@camilleldn]: https://github.com/camilleldn
108
- [@mcls]: https://github.com/mcls
109
- [@yous]: https://github.com/yous
110
- [@vrthra]: https://github.com/vrthra
111
- [@SkuliOskarsson]: https://github.com/SkuliOskarsson
112
- [@jspanjers]: https://github.com/jspanjers
113
- [@sch1zo]: https://github.com/sch1zo
114
- [@smangelsdorf]: https://github.com/smangelsdorf
115
- [@mvz]: https://github.com/mvz
116
- [@jfelchner]: https://github.com/jfelchner
117
- [@janraasch]: https://github.com/janraasch
118
- [@jcarbo]: https://github.com/jcarbo
119
- [@oneamtu]: https://github.com/oneamtu
120
- [@toy]: https://github.com/toy
121
- [@Koronen]: https://github.com/Koronen
122
- [@blainesch]: https://github.com/blainesch
123
- [@marxarelli]: https://github.com/marxarelli
124
- [@katieschilling]: https://github.com/katieschilling
125
- [@kakutani]: https://github.com/kakutani
126
- [@rrosenblum]: https://github.com/rrosenblum
127
- [@mattjmcnaughton]: https://github.com/mattjmcnaughton
128
- [@huerlisi]: https://github.com/huerlisi
129
- [@volkert]: https://github.com/volkert
130
- [@lumeet]: https://github.com/lumeet
131
- [@mmozuras]: https://github.com/mmozuras
132
- [@d4rk5eed]: https://github.com/d4rk5eed
133
- [@cshaffer]: https://github.com/cshaffer
134
- [@eitoball]: https://github.com/eitoball
135
- [@iainbeeston]: https://github.com/iainbeeston
136
- [@pimterry]: https://github.com/pimterry
137
- [@palkan]: https://github.com/palkan
138
- [@jdoconnor]: https://github.com/jdoconnor
139
- [@meganemura]: https://github.com/meganemura
140
- [@zvkemp]: https://github.com/zvkemp
141
- [@vassilevsky]: https://github.com/vassilevsky
142
- [@gerry3]: https://github.com/gerry3
143
- [@ypresto]: https://github.com/ypresto
144
- [@clowder]: https://github.com/clowder
145
- [@mudge]: https://github.com/mudge