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,200 +0,0 @@
1
- ### New features
2
-
3
- * [#2620](https://github.com/bbatsov/rubocop/pull/2620): New cop `Style/ZeroLengthPredicate` checks for `object.size == 0` and variants, and suggests replacing them with an appropriate `empty?` predicate. ([@drenmi][])
4
- * [#2657](https://github.com/bbatsov/rubocop/pull/2657): Floating headers in HTML output. ([@mattparlane][])
5
- * Add new `Style/SpaceAroundKeyword` cop. ([@lumeet][])
6
- * [#2745](https://github.com/bbatsov/rubocop/pull/2745): New cop `Style/MultilineHashBraceLayout` checks that the closing brace in a hash literal is symmetrical with respect to the opening brace and the hash elements. ([@panthomakos][])
7
- * [#2761](https://github.com/bbatsov/rubocop/pull/2761): New cop `Style/MultilineMethodDefinitionBraceLayout` checks that the closing brace in a method definition is symmetrical with respect to the opening brace and the method parameters. ([@panthomakos][])
8
- * [#2699](https://github.com/bbatsov/rubocop/pull/2699): `Performance/Casecmp` can register offenses when `str.downcase` or `str.upcase` are passed to an equality method. ([@rrosenblum][])
9
- * [#2766](https://github.com/bbatsov/rubocop/pull/2766): New cop `Style/MultilineMethodCallBraceLayout` checks that the closing brace in a method call is symmetrical with respect to the opening brace and the method arguments. ([@panthomakos][])
10
-
11
- ### Bug fixes
12
-
13
- * [#2723](https://github.com/bbatsov/rubocop/issues/2723): Fix NoMethodError in Style/GuardClause. ([@drenmi][])
14
- * [#2674](https://github.com/bbatsov/rubocop/issues/2674): Also check for Hash#update alias in `Performance/RedundantMerge`. ([@drenmi][])
15
- * [#2630](https://github.com/bbatsov/rubocop/issues/2630): Take frozen string literals into account in `Style/MutableConstant`. ([@segiddins][])
16
- * [#2642](https://github.com/bbatsov/rubocop/issues/2642): Support assignment via `||=` in `Style/MutableConstant`. ([@segiddins][])
17
- * [#2646](https://github.com/bbatsov/rubocop/issues/2646): Fix auto-correcting assignment to a constant in `Style/ConditionalAssignment`. ([@segiddins][])
18
- * [#2614](https://github.com/bbatsov/rubocop/issues/2614): Check for zero return value from `casecmp` in `Performance/casecmp`. ([@segiddins][])
19
- * [#2647](https://github.com/bbatsov/rubocop/issues/2647): Allow `xstr` interpolations in `Lint/LiteralInInterpolation`. ([@segiddins][])
20
- * Report a violation when `freeze` is called on a frozen string literal in `Style/RedundantFreeze`. ([@segiddins][])
21
- * [#2641](https://github.com/bbatsov/rubocop/issues/2641): Fix crashing on empty methods with block args in `Perfomance/RedundantBlockCall`. ([@segiddins][])
22
- * `Lint/DuplicateMethods` doesn't crash when `class_eval` is used with an implicit receiver. ([@lumeet][])
23
- * [#2654](https://github.com/bbatsov/rubocop/issues/2654): Fix handling of unary operations in `Style/RedundantParentheses`. ([@lumeet][])
24
- * [#2661](https://github.com/bbatsov/rubocop/issues/2661): `Style/Next` doesn't crash when auto-correcting modifier `if/unless`. ([@lumeet][])
25
- * [#2665](https://github.com/bbatsov/rubocop/pull/2665): Make specs pass when running on Windows. ([@jonas054][])
26
- * [#2691](https://github.com/bbatsov/rubocop/pull/2691): Do not register an offense in `Performance/TimesMap` for calling `map` or `collect` on a variable named `times`. ([@rrosenblum][])
27
- * [#2689](https://github.com/bbatsov/rubocop/pull/2689): Change `Performance/RedundantBlockCall` to respect parentheses usage. ([@rrosenblum][])
28
- * [#2694](https://github.com/bbatsov/rubocop/issues/2694): Fix caching when using a different JSON gem such as Oj. ([@stormbreakerbg][])
29
- * [#2707](https://github.com/bbatsov/rubocop/pull/2707): Change `Lint/NestedMethodDefinition` to respect `Class.new` and `Module.new`. ([@owst][])
30
- * [#2701](https://github.com/bbatsov/rubocop/pull/2701): Do not consider assignments to the same variable as useless if later assignments are within a loop. ([@owst][])
31
- * [#2696](https://github.com/bbatsov/rubocop/issues/2696): `Style/NestedModifier` adds parentheses around a condition when needed. ([@lumeet][])
32
- * [#2666](https://github.com/bbatsov/rubocop/issues/2666): Fix bug when auto-correcting symbol literals in `Lint/LiteralInInterpolation`. ([@lumeet][])
33
- * [#2664](https://github.com/bbatsov/rubocop/issues/2664): `Performance/Casecmp` can auto-correct case comparison to variables and method calls without error. ([@rrosenblum][])
34
- * [#2729](https://github.com/bbatsov/rubocop/issues/2729): Fix handling of hash literal as the first argument in `Style/RedundantParentheses`. ([@lumeet][])
35
- * [#2703](https://github.com/bbatsov/rubocop/issues/2703): Handle byte order mark in `Style/IndentationWidth`, `Style/ElseAlignment`, `Lint/EndAlignment`, and `Lint/DefEndAlignment`. ([@jonas054][])
36
- * [#2710](https://github.com/bbatsov/rubocop/pull/2710): Fix handling of fullwidth characters in some cops. ([@seikichi][])
37
- * [#2690](https://github.com/bbatsov/rubocop/issues/2690): Fix alignment of operands that are part of an assignment in `Style/MultilineOperationIndentation`. ([@jonas054][])
38
- * [#2228](https://github.com/bbatsov/rubocop/issues/2228): Use the config of a related cop whether it's enabled or not. ([@madwort][])
39
- * [#2721](https://github.com/bbatsov/rubocop/issues/2721): Do not register an offense for constants wrapped in parentheses passed to `rescue` in `Style/RedundantParentheses`. ([@rrosenblum][])
40
- * [#2742](https://github.com/bbatsov/rubocop/issues/2742): Fix `Style/TrailingCommaInArguments` & `Style/TrailingCommaInLiteral` for inline single element arrays. ([@annih][])
41
- * [#2768](https://github.com/bbatsov/rubocop/issues/2768): Allow parentheses after keyword `not` in `Style/MethodCallParentheses`. ([@lumeet][])
42
- * [#2758](https://github.com/bbatsov/rubocop/issues/2758): Allow leading underscores in camel case variable names.([@mmcguinn][])
43
-
44
- ### Changes
45
-
46
- * Remove `Style/SpaceAfterControlKeyword` and `Style/SpaceBeforeModifierKeyword` as the more generic `Style/SpaceAroundKeyword` handles the same cases. ([@lumeet][])
47
- * Handle comparisons with `!=` in `Performance/casecmp`. ([@segiddins][])
48
- * [#2684](https://github.com/bbatsov/rubocop/pull/2684): Do not base `Style/FrozenStringLiteralComment` on the version of Ruby that is running. ([@rrosenblum][])
49
- * [#2732](https://github.com/bbatsov/rubocop/issues/2732): Change the default style of `Style/SignalException` to `only_raise`. ([@bbatsov][])
50
-
51
- [@bbatsov]: https://github.com/bbatsov
52
- [@jonas054]: https://github.com/jonas054
53
- [@yujinakayama]: https://github.com/yujinakayama
54
- [@dblock]: https://github.com/dblock
55
- [@nevir]: https://github.com/nevir
56
- [@daviddavis]: https://github.com/daviddavis
57
- [@sds]: https://github.com/sds
58
- [@fancyremarker]: https://github.com/fancyremarker
59
- [@sinisterchipmunk]: https://github.com/sinisterchipmunk
60
- [@vonTronje]: https://github.com/vonTronje
61
- [@agrimm]: https://github.com/agrimm
62
- [@pmenglund]: https://github.com/pmenglund
63
- [@chulkilee]: https://github.com/chulkilee
64
- [@codez]: https://github.com/codez
65
- [@emou]: https://github.com/emou
66
- [@skanev]: http://github.com/skanev
67
- [@claco]: http://github.com/claco
68
- [@rifraf]: http://github.com/rifraf
69
- [@scottmatthewman]: https://github.com/scottmatthewman
70
- [@ma2gedev]: http://github.com/ma2gedev
71
- [@jeremyolliver]: https://github.com/jeremyolliver
72
- [@hannestyden]: https://github.com/hannestyden
73
- [@geniou]: https://github.com/geniou
74
- [@jkogara]: https://github.com/jkogara
75
- [@tmorris-fiksu]: https://github.com/tmorris-fiksu
76
- [@mockdeep]: https://github.com/mockdeep
77
- [@hiroponz]: https://github.com/hiroponz
78
- [@tamird]: https://github.com/tamird
79
- [@fshowalter]: https://github.com/fshowalter
80
- [@cschramm]: https://github.com/cschramm
81
- [@bquorning]: https://github.com/bquorning
82
- [@bcobb]: https://github.com/bcobb
83
- [@irrationalfab]: https://github.com/irrationalfab
84
- [@tommeier]: https://github.com/tommeier
85
- [@sfeldon]: https://github.com/sfeldon
86
- [@biinari]: https://github.com/biinari
87
- [@barunio]: https://github.com/barunio
88
- [@molawson]: https://github.com/molawson
89
- [@wndhydrnt]: https://github.com/wndhydrnt
90
- [@ggilder]: https://github.com/ggilder
91
- [@salbertson]: https://github.com/salbertson
92
- [@camilleldn]: https://github.com/camilleldn
93
- [@mcls]: https://github.com/mcls
94
- [@yous]: https://github.com/yous
95
- [@vrthra]: https://github.com/vrthra
96
- [@SkuliOskarsson]: https://github.com/SkuliOskarsson
97
- [@jspanjers]: https://github.com/jspanjers
98
- [@sch1zo]: https://github.com/sch1zo
99
- [@smangelsdorf]: https://github.com/smangelsdorf
100
- [@mvz]: https://github.com/mvz
101
- [@jfelchner]: https://github.com/jfelchner
102
- [@janraasch]: https://github.com/janraasch
103
- [@jcarbo]: https://github.com/jcarbo
104
- [@oneamtu]: https://github.com/oneamtu
105
- [@toy]: https://github.com/toy
106
- [@Koronen]: https://github.com/Koronen
107
- [@blainesch]: https://github.com/blainesch
108
- [@marxarelli]: https://github.com/marxarelli
109
- [@katieschilling]: https://github.com/katieschilling
110
- [@kakutani]: https://github.com/kakutani
111
- [@rrosenblum]: https://github.com/rrosenblum
112
- [@mattjmcnaughton]: https://github.com/mattjmcnaughton
113
- [@huerlisi]: https://github.com/huerlisi
114
- [@volkert]: https://github.com/volkert
115
- [@lumeet]: https://github.com/lumeet
116
- [@mmozuras]: https://github.com/mmozuras
117
- [@d4rk5eed]: https://github.com/d4rk5eed
118
- [@cshaffer]: https://github.com/cshaffer
119
- [@eitoball]: https://github.com/eitoball
120
- [@iainbeeston]: https://github.com/iainbeeston
121
- [@pimterry]: https://github.com/pimterry
122
- [@palkan]: https://github.com/palkan
123
- [@jdoconnor]: https://github.com/jdoconnor
124
- [@meganemura]: https://github.com/meganemura
125
- [@zvkemp]: https://github.com/zvkemp
126
- [@vassilevsky]: https://github.com/vassilevsky
127
- [@gerry3]: https://github.com/gerry3
128
- [@ypresto]: https://github.com/ypresto
129
- [@clowder]: https://github.com/clowder
130
- [@mudge]: https://github.com/mudge
131
- [@mzp]: https://github.com/mzp
132
- [@bankair]: https://github.com/bankair
133
- [@crimsonknave]: https://github.com/crimsonknave
134
- [@renuo]: https://github.com/renuo
135
- [@sdeframond]: https://github.com/sdeframond
136
- [@til]: https://github.com/til
137
- [@carhartl]: https://github.com/carhartl
138
- [@dylandavidson]: https://github.com/dylandavidson
139
- [@tmr08c]: https://github.com/tmr08c
140
- [@hbd225]: https://github.com/hbd225
141
- [@l8nite]: https://github.com/l8nite
142
- [@sumeet]: https://github.com/sumeet
143
- [@ojab]: https://github.com/ojab
144
- [@chastell]: https://github.com/chastell
145
- [@glasnt]: https://github.com/glasnt
146
- [@crazydog115]: https://github.com/crazydog115
147
- [@RGBD]: https://github.com/RGBD
148
- [@panthomakos]: https://github.com/panthomakos
149
- [@matugm]: https://github.com/matugm
150
- [@m1foley]: https://github.com/m1foley
151
- [@tejasbubane]: https://github.com/tejasbubane
152
- [@bmorrall]: https://github.com/bmorrall
153
- [@fphilipe]: https://github.com/fphilipe
154
- [@gotrevor]: https://github.com/gotrevor
155
- [@awwaiid]: https://github.com/awwaiid
156
- [@segiddins]: https://github.com/segiddins
157
- [@urbanautomaton]: https://github.com/urbanautomaton.com
158
- [@unmanbearpig]: https://github.com/unmanbearpig
159
- [@maxjacobson]: https://github.com/maxjacobson
160
- [@sliuu]: https://github.com/sliuu
161
- [@edmz]: https://github.com/edmz
162
- [@syndbg]: https://github.com/syndbg
163
- [@wli]: https://github.com/wli
164
- [@caseywebdev]: https://github.com/caseywebdev
165
- [@MGerrior]: https://github.com/MGerrior
166
- [@imtayadeway]: https://github.com/imtayadeway
167
- [@mrfoto]: https://github.com/mrfoto
168
- [@karreiro]: https://github.com/karreiro
169
- [@dreyks]: https://github.com/dreyks
170
- [@hmadison]: https://github.com/hmadison
171
- [@miquella]: https://github.com/miquella
172
- [@jhansche]: https://github.com/jhansche
173
- [@cornelius]: https://github.com/cornelius
174
- [@eagletmt]: https://github.com/eagletmt
175
- [@apiology]: https://github.com/apiology
176
- [@alexdowad]: https://github.com/alexdowad
177
- [@minustehbare]: https://github.com/minustehbare
178
- [@tansaku]: https://github.com/tansaku
179
- [@ptrippett]: https://github.com/ptrippett
180
- [@br3nda]: https://github.com/br3nda
181
- [@jujugrrr]: https://github.com/jujugrrr
182
- [@sometimesfood]: https://github.com/sometimesfood
183
- [@cgriego]: https://github.com/cgriego
184
- [@savef]: https://github.com/savef
185
- [@volmer]: https://github.com/volmer
186
- [@domcleal]: https://github.com/domcleal
187
- [@codebeige]: https://github.com/codebeige
188
- [@weh]: https://github.com/weh
189
- [@bfontaine]: https://github.com/bfontaine
190
- [@jawshooah]: https://github.com/jawshooah
191
- [@DNNX]: https://github.com/DNNX
192
- [@mvidner]: https://github.com/mvidner
193
- [@mattparlane]: https://github.com/mattparlane
194
- [@drenmi]: https://github.com/drenmi
195
- [@stormbreakerbg]: https://github.com/stormbreakerbg
196
- [@owst]: https://github.com/owst
197
- [@seikichi]: https://github.com/seikichi
198
- [@madwort]: https://github.com/madwort
199
- [@annih]: https://github.com/annih
200
- [@mmcguinn]: https://github.com/mmcguinn
@@ -1,49 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: true
3
-
4
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
5
- require 'rubocop/version'
6
- require 'English'
7
-
8
- Gem::Specification.new do |s|
9
- s.name = 'rubocop'
10
- s.version = RuboCop::Version::STRING
11
- s.platform = Gem::Platform::RUBY
12
- s.required_ruby_version = '>= 1.9.3'
13
- s.authors = ['Bozhidar Batsov', 'Jonas Arvidsson', 'Yuji Nakayama']
14
- s.description = <<-EOF
15
- Automatic Ruby code style checking tool.
16
- Aims to enforce the community-driven Ruby Style Guide.
17
- EOF
18
-
19
- s.email = 'rubocop@googlegroups.com'
20
- s.files = `git ls-files`.split($RS).reject do |file|
21
- file =~ %r{^(?:
22
- spec/.*
23
- |Gemfile
24
- |Rakefile
25
- |\.rspec
26
- |\.gitignore
27
- |\.rubocop.yml
28
- |\.rubocop_todo.yml
29
- |\.travis.yml
30
- |.*\.eps
31
- )$}x
32
- end
33
- s.test_files = []
34
- s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
35
- s.extra_rdoc_files = ['LICENSE.txt', 'README.md']
36
- s.homepage = 'http://github.com/bbatsov/rubocop'
37
- s.licenses = ['MIT']
38
- s.require_paths = ['lib']
39
- s.rubygems_version = '1.8.23'
40
- s.summary = 'Automatic Ruby code style checking tool.'
41
-
42
- s.add_runtime_dependency('rainbow', '>= 1.99.1', '< 3.0')
43
- s.add_runtime_dependency('parser', '>= 2.3.0.2', '< 3.0')
44
- s.add_runtime_dependency('powerpack', '~> 0.1')
45
- s.add_runtime_dependency('ruby-progressbar', '~> 1.7')
46
- s.add_runtime_dependency('unicode-display_width', '~> 0.3')
47
-
48
- s.add_development_dependency('bundler', '~> 1.3')
49
- end