rubocop 1.4.0 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/logo.png +0 -0
- data/assets/output.html.erb +261 -0
- data/config/default.yml +49 -9
- data/lib/rubocop.rb +4 -0
- data/lib/rubocop/cli.rb +5 -1
- data/lib/rubocop/cli/command/suggest_extensions.rb +108 -0
- data/lib/rubocop/config_loader.rb +1 -1
- data/lib/rubocop/config_loader_resolver.rb +5 -1
- data/lib/rubocop/config_obsoletion.rb +21 -3
- data/lib/rubocop/config_validator.rb +8 -1
- data/lib/rubocop/cop/autocorrect_logic.rb +21 -6
- data/lib/rubocop/cop/generator.rb +1 -1
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +3 -3
- data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +6 -1
- data/lib/rubocop/cop/layout/end_of_line.rb +5 -5
- data/lib/rubocop/cop/layout/first_argument_indentation.rb +7 -2
- data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +12 -0
- data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +7 -3
- data/lib/rubocop/cop/lint/interpolation_check.rb +7 -2
- data/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +1 -1
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +13 -0
- data/lib/rubocop/cop/lint/unexpected_block_arity.rb +85 -0
- data/lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb +7 -2
- data/lib/rubocop/cop/metrics/abc_size.rb +25 -1
- data/lib/rubocop/cop/metrics/block_length.rb +13 -7
- data/lib/rubocop/cop/metrics/method_length.rb +7 -2
- data/lib/rubocop/cop/metrics/parameter_lists.rb +64 -1
- data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +20 -10
- data/lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb +146 -0
- data/lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb +6 -1
- data/lib/rubocop/cop/mixin/configurable_numbering.rb +3 -2
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +9 -1
- data/lib/rubocop/cop/mixin/ignored_methods.rb +36 -3
- data/lib/rubocop/cop/mixin/method_complexity.rb +6 -0
- data/lib/rubocop/cop/naming/variable_number.rb +3 -1
- data/lib/rubocop/cop/style/and_or.rb +10 -0
- data/lib/rubocop/cop/style/class_and_module_children.rb +8 -3
- data/lib/rubocop/cop/style/format_string.rb +8 -3
- data/lib/rubocop/cop/style/if_with_semicolon.rb +39 -4
- data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +11 -2
- data/lib/rubocop/cop/style/numeric_literals.rb +14 -11
- data/lib/rubocop/cop/style/redundant_argument.rb +3 -1
- data/lib/rubocop/cop/style/redundant_condition.rb +2 -1
- data/lib/rubocop/cop/style/redundant_regexp_escape.rb +24 -8
- data/lib/rubocop/cop/style/sole_nested_conditional.rb +59 -3
- data/lib/rubocop/cop/style/string_concatenation.rb +7 -1
- data/lib/rubocop/cop/style/symbol_proc.rb +5 -3
- data/lib/rubocop/core_ext/hash.rb +20 -0
- data/lib/rubocop/ext/regexp_node.rb +29 -12
- data/lib/rubocop/ext/regexp_parser.rb +20 -9
- data/lib/rubocop/version.rb +1 -1
- metadata +23 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77baac77fdf5ed6293449d9653e1caeadc94b18e49bbd5115176c3681b8ed752
|
4
|
+
data.tar.gz: 677ced7d3409d54555aaba855aec07fac0717bdb100eef4ea0196d68688247d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d083c6f78d892e14780bc3ab2cadf4b4208b87ab3dae357df39cc5dcbd9c2a18ff416795cd73a39c0d743fd07923ccbd092b916be3e738114558aa2b37f724cc
|
7
|
+
data.tar.gz: 6a5e0502cfbc9c0c5c11f075b89a91ea7ae4ec1b70134fbe6930caca9f7959282dea23f9358db291cca2a4e1fa72e830a1717c1c845528024eb89d23e6368379
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ To prevent an unwanted RuboCop update you might want to use a conservative versi
|
|
51
51
|
in your `Gemfile`:
|
52
52
|
|
53
53
|
```rb
|
54
|
-
gem 'rubocop', '~> 1.
|
54
|
+
gem 'rubocop', '~> 1.5', require: false
|
55
55
|
```
|
56
56
|
|
57
57
|
See [versioning](https://docs.rubocop.org/rubocop/1.0/versioning.html) for further details.
|
data/assets/logo.png
ADDED
Binary file
|
@@ -0,0 +1,261 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset='UTF-8' />
|
5
|
+
<title>RuboCop Inspection Report</title>
|
6
|
+
<%# TODO: Clean up the messy markup and style definitions. %>
|
7
|
+
<style>
|
8
|
+
* {
|
9
|
+
-webkit-box-sizing: border-box;
|
10
|
+
-moz-box-sizing: border-box;
|
11
|
+
box-sizing: border-box;
|
12
|
+
}
|
13
|
+
|
14
|
+
body, html {
|
15
|
+
font-size: 62.5%;
|
16
|
+
}
|
17
|
+
body {
|
18
|
+
background-color: #ecedf0;
|
19
|
+
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
20
|
+
margin: 0;
|
21
|
+
}
|
22
|
+
code {
|
23
|
+
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
24
|
+
font-size: 85%;
|
25
|
+
}
|
26
|
+
#header {
|
27
|
+
background: #f9f9f9;
|
28
|
+
color: #333;
|
29
|
+
border-bottom: 3px solid #ccc;
|
30
|
+
height: 50px;
|
31
|
+
padding: 0;
|
32
|
+
}
|
33
|
+
#header .logo {
|
34
|
+
float: left;
|
35
|
+
margin: 5px 12px 7px 20px;
|
36
|
+
width: 38px;
|
37
|
+
height: 38px;
|
38
|
+
}
|
39
|
+
#header .title {
|
40
|
+
display: inline-block;
|
41
|
+
float: left;
|
42
|
+
height: 50px;
|
43
|
+
font-size: 2.4rem;
|
44
|
+
letter-spacing: normal;
|
45
|
+
line-height: 50px;
|
46
|
+
margin: 0;
|
47
|
+
}
|
48
|
+
|
49
|
+
.information, #offenses {
|
50
|
+
width: 100%;
|
51
|
+
padding: 20px;
|
52
|
+
color: #333;
|
53
|
+
}
|
54
|
+
#offenses {
|
55
|
+
padding: 0 20px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.information .infobox {
|
59
|
+
border-left: 3px solid;
|
60
|
+
border-radius: 4px;
|
61
|
+
background-color: #fff;
|
62
|
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
63
|
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
64
|
+
padding: 15px;
|
65
|
+
border-color: #0088cc;
|
66
|
+
font-size: 1.4rem;
|
67
|
+
}
|
68
|
+
.information .infobox .info-title {
|
69
|
+
font-size: 1.8rem;
|
70
|
+
line-height: 2.2rem;
|
71
|
+
margin: 0 0 0.5em;
|
72
|
+
}
|
73
|
+
.information .offenses-list li {
|
74
|
+
line-height: 1.8rem
|
75
|
+
}
|
76
|
+
.information .offenses-list {
|
77
|
+
padding-left: 20px;
|
78
|
+
margin-bottom: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
#offenses .offense-box {
|
82
|
+
border-radius: 4px;
|
83
|
+
margin-bottom: 20px;
|
84
|
+
background-color: #fff;
|
85
|
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
86
|
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
87
|
+
}
|
88
|
+
.fixed .box-title {
|
89
|
+
position: fixed;
|
90
|
+
top: 0;
|
91
|
+
z-index: 10;
|
92
|
+
width: 100%;
|
93
|
+
}
|
94
|
+
.box-title-placeholder {
|
95
|
+
display: none;
|
96
|
+
}
|
97
|
+
.fixed .box-title-placeholder {
|
98
|
+
display: block;
|
99
|
+
}
|
100
|
+
#offenses .offense-box .box-title h3, #offenses .offense-box .box-title-placeholder h3 {
|
101
|
+
color: #33353f;
|
102
|
+
background-color: #f6f6f6;
|
103
|
+
font-size: 2rem;
|
104
|
+
line-height: 2rem;
|
105
|
+
display: block;
|
106
|
+
padding: 15px;
|
107
|
+
border-radius: 5px;
|
108
|
+
margin: 0;
|
109
|
+
}
|
110
|
+
#offenses .offense-box .offense-reports {
|
111
|
+
padding: 0 15px;
|
112
|
+
}
|
113
|
+
#offenses .offense-box .offense-reports .report {
|
114
|
+
border-bottom: 1px dotted #ddd;
|
115
|
+
padding: 15px 0px;
|
116
|
+
position: relative;
|
117
|
+
font-size: 1.3rem;
|
118
|
+
}
|
119
|
+
#offenses .offense-box .offense-reports .report:last-child {
|
120
|
+
border-bottom: none;
|
121
|
+
}
|
122
|
+
#offenses .offense-box .offense-reports .report pre code {
|
123
|
+
display: block;
|
124
|
+
background: #000;
|
125
|
+
color: #fff;
|
126
|
+
padding: 10px 15px;
|
127
|
+
border-radius: 5px;
|
128
|
+
line-height: 1.6rem;
|
129
|
+
}
|
130
|
+
#offenses .offense-box .offense-reports .report .location {
|
131
|
+
font-weight: bold;
|
132
|
+
}
|
133
|
+
#offenses .offense-box .offense-reports .report .message code {
|
134
|
+
padding: 0.3em;
|
135
|
+
background-color: rgba(0,0,0,0.07);
|
136
|
+
border-radius: 3px;
|
137
|
+
}
|
138
|
+
.severity {
|
139
|
+
text-transform: capitalize;
|
140
|
+
font-weight: bold;
|
141
|
+
}
|
142
|
+
.highlight {
|
143
|
+
padding: 2px;
|
144
|
+
border-radius: 2px;
|
145
|
+
font-weight: bold;
|
146
|
+
}
|
147
|
+
<%- SEVERITY_COLORS.each do |severity, color| %>
|
148
|
+
.severity.<%= severity %> {
|
149
|
+
color: <%= color %>;
|
150
|
+
}
|
151
|
+
.highlight.<%= severity %> {
|
152
|
+
background-color: <%= color.fade_out(0.4) %>;
|
153
|
+
border: 1px solid <%= color.fade_out(0.6) %>;
|
154
|
+
}
|
155
|
+
<%- end %>
|
156
|
+
footer {
|
157
|
+
margin-bottom: 20px;
|
158
|
+
margin-right: 20px;
|
159
|
+
font-size: 1.3rem;
|
160
|
+
color: #777;
|
161
|
+
text-align: right;
|
162
|
+
}
|
163
|
+
.extra-code {
|
164
|
+
color: #ED9C28
|
165
|
+
}
|
166
|
+
</style>
|
167
|
+
|
168
|
+
<script>
|
169
|
+
(function() {
|
170
|
+
// floating headers. requires classList support.
|
171
|
+
if (!('classList' in document.createElement("_"))) return;
|
172
|
+
|
173
|
+
var loaded = false,
|
174
|
+
boxes,
|
175
|
+
boxPositions;
|
176
|
+
|
177
|
+
window.onload = function() {
|
178
|
+
var scrollY = window.scrollY;
|
179
|
+
boxes = document.querySelectorAll('.offense-box');
|
180
|
+
boxPositions = [];
|
181
|
+
for (var i = 0; i < boxes.length; i++)
|
182
|
+
// need to add scrollY because the page might be somewhere other than the top when loaded.
|
183
|
+
boxPositions[i] = boxes[i].getBoundingClientRect().top + scrollY;
|
184
|
+
loaded = true;
|
185
|
+
};
|
186
|
+
|
187
|
+
window.onscroll = function() {
|
188
|
+
if (!loaded) return;
|
189
|
+
var i,
|
190
|
+
idx,
|
191
|
+
scrollY = window.scrollY;
|
192
|
+
for (i = 0; i < boxPositions.length; i++) {
|
193
|
+
if (scrollY <= boxPositions[i] - 1) {
|
194
|
+
idx = i;
|
195
|
+
break;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
if (typeof idx == 'undefined') idx = boxes.length;
|
199
|
+
if (idx > 0)
|
200
|
+
boxes[idx - 1].classList.add('fixed');
|
201
|
+
for (i = 0; i < boxes.length; i++) {
|
202
|
+
if (i < idx) continue;
|
203
|
+
boxes[i].classList.remove('fixed');
|
204
|
+
}
|
205
|
+
};
|
206
|
+
})();
|
207
|
+
</script>
|
208
|
+
</head>
|
209
|
+
<body>
|
210
|
+
<div id="header">
|
211
|
+
<img class="logo" src="data:image/png;base64,<%= base64_encoded_logo_image %>" alt="">
|
212
|
+
<h1 class="title">RuboCop Inspection Report</h1>
|
213
|
+
</div>
|
214
|
+
<div class="information">
|
215
|
+
<div class="infobox">
|
216
|
+
<div class="total">
|
217
|
+
<%= pluralize(files.count, 'file') %> inspected,
|
218
|
+
<%= pluralize(summary.offense_count, 'offense', no_for_zero: true) %> detected:
|
219
|
+
</div>
|
220
|
+
<ul class="offenses-list">
|
221
|
+
<% files.each do |file| %>
|
222
|
+
<% next if file.offenses.none? %>
|
223
|
+
<li>
|
224
|
+
<a href="#offense_<%= relative_path(file.path) %>">
|
225
|
+
<%= relative_path(file.path) %> - <%= pluralize(file.offenses.count, 'offense') %>
|
226
|
+
</a>
|
227
|
+
</li>
|
228
|
+
<% end %>
|
229
|
+
</ul>
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
<div id="offenses">
|
233
|
+
<% files.each do |file| %>
|
234
|
+
<% if file.offenses.any? %>
|
235
|
+
<div class="offense-box" id="offense_<%= relative_path(file.path) %>">
|
236
|
+
<div class="box-title-placeholder"><h3> </h3></div>
|
237
|
+
<div class="box-title"><h3><%= relative_path(file.path) %> - <%= pluralize(file.offenses.count, 'offense') %></h3></div>
|
238
|
+
<div class="offense-reports">
|
239
|
+
<% file.offenses.each do |offense| %>
|
240
|
+
<div class="report">
|
241
|
+
<div class="meta">
|
242
|
+
<span class="location">Line #<%= offense.location.line %></span> –
|
243
|
+
<span class="severity <%= offense.severity %>"><%= offense.severity %>:</span>
|
244
|
+
<span class="message"><%= decorated_message(offense) %></span>
|
245
|
+
</div>
|
246
|
+
<% unless offense.location.source_line.strip.empty? %>
|
247
|
+
<pre><code><%= highlighted_source_line(offense) %></code></pre>
|
248
|
+
<% end %>
|
249
|
+
</div>
|
250
|
+
<% end %>
|
251
|
+
</div>
|
252
|
+
</div>
|
253
|
+
<% end %>
|
254
|
+
<% end %>
|
255
|
+
</div>
|
256
|
+
<footer>
|
257
|
+
Generated by <a href="https://github.com/rubocop-hq/rubocop">RuboCop</a>
|
258
|
+
<span class="version"><%= RuboCop::Version::STRING %></span>
|
259
|
+
</footer>
|
260
|
+
</body>
|
261
|
+
</html>
|
data/config/default.yml
CHANGED
@@ -139,6 +139,16 @@ AllCops:
|
|
139
139
|
# from the lock file.) If the Ruby version is still unresolved, RuboCop will
|
140
140
|
# use the oldest officially supported Ruby version (currently Ruby 2.4).
|
141
141
|
TargetRubyVersion: ~
|
142
|
+
# Determines if a notification for extension libraries should be shown when
|
143
|
+
# rubocop is run. Keys are the name of the extension, and values are an array
|
144
|
+
# of gems in the Gemfile that the extension is suggested for, if not already
|
145
|
+
# included.
|
146
|
+
SuggestExtensions:
|
147
|
+
rubocop-rails: [rails]
|
148
|
+
rubocop-rspec: [rspec, rspec-rails]
|
149
|
+
rubocop-minitest: [minitest]
|
150
|
+
rubocop-sequel: [sequel]
|
151
|
+
rubocop-rake: [rake]
|
142
152
|
|
143
153
|
#################### Bundler ###############################
|
144
154
|
|
@@ -459,7 +469,7 @@ Layout/EmptyLineAfterMultilineCondition:
|
|
459
469
|
- https://github.com/airbnb/ruby#multiline-if-newline
|
460
470
|
|
461
471
|
Layout/EmptyLineBetweenDefs:
|
462
|
-
Description: 'Use empty lines between defs.'
|
472
|
+
Description: 'Use empty lines between class/module/method defs.'
|
463
473
|
StyleGuide: '#empty-lines-between-methods'
|
464
474
|
Enabled: true
|
465
475
|
VersionAdded: '0.49'
|
@@ -1998,6 +2008,23 @@ Lint/UnderscorePrefixedVariableName:
|
|
1998
2008
|
VersionAdded: '0.21'
|
1999
2009
|
AllowKeywordBlockArguments: false
|
2000
2010
|
|
2011
|
+
Lint/UnexpectedBlockArity:
|
2012
|
+
Description: 'Looks for blocks that have fewer arguments that the calling method expects.'
|
2013
|
+
Enabled: pending
|
2014
|
+
Safe: false
|
2015
|
+
VersionAdded: '1.5'
|
2016
|
+
Methods:
|
2017
|
+
chunk_while: 2
|
2018
|
+
each_with_index: 2
|
2019
|
+
each_with_object: 2
|
2020
|
+
inject: 2
|
2021
|
+
max: 2
|
2022
|
+
min: 2
|
2023
|
+
minmax: 2
|
2024
|
+
reduce: 2
|
2025
|
+
slice_when: 2
|
2026
|
+
sort: 2
|
2027
|
+
|
2001
2028
|
Lint/UnifiedInteger:
|
2002
2029
|
Description: 'Use Integer instead of Fixnum or Bignum.'
|
2003
2030
|
Enabled: true
|
@@ -2007,6 +2034,7 @@ Lint/UnmodifiedReduceAccumulator:
|
|
2007
2034
|
Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
|
2008
2035
|
Enabled: pending
|
2009
2036
|
VersionAdded: '1.1'
|
2037
|
+
VersionChanged: '1.5'
|
2010
2038
|
|
2011
2039
|
Lint/UnreachableCode:
|
2012
2040
|
Description: 'Unreachable code.'
|
@@ -2110,21 +2138,23 @@ Metrics/AbcSize:
|
|
2110
2138
|
- https://en.wikipedia.org/wiki/ABC_Software_Metric
|
2111
2139
|
Enabled: true
|
2112
2140
|
VersionAdded: '0.27'
|
2113
|
-
VersionChanged: '
|
2141
|
+
VersionChanged: '1.5'
|
2114
2142
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
2115
2143
|
# a Float.
|
2116
2144
|
IgnoredMethods: []
|
2145
|
+
CountRepeatedAttributes: true
|
2117
2146
|
Max: 17
|
2118
2147
|
|
2119
2148
|
Metrics/BlockLength:
|
2120
2149
|
Description: 'Avoid long blocks with many lines.'
|
2121
2150
|
Enabled: true
|
2122
2151
|
VersionAdded: '0.44'
|
2123
|
-
VersionChanged: '
|
2152
|
+
VersionChanged: '1.5'
|
2124
2153
|
CountComments: false # count full line comments?
|
2125
2154
|
Max: 25
|
2126
2155
|
CountAsOne: []
|
2127
|
-
ExcludedMethods:
|
2156
|
+
ExcludedMethods: [] # deprecated, retained for backwards compatibility
|
2157
|
+
IgnoredMethods:
|
2128
2158
|
# By default, exclude the `#refine` method, as it tends to have larger
|
2129
2159
|
# associated blocks.
|
2130
2160
|
- refine
|
@@ -2165,11 +2195,12 @@ Metrics/MethodLength:
|
|
2165
2195
|
StyleGuide: '#short-methods'
|
2166
2196
|
Enabled: true
|
2167
2197
|
VersionAdded: '0.25'
|
2168
|
-
VersionChanged: '
|
2198
|
+
VersionChanged: '1.5'
|
2169
2199
|
CountComments: false # count full line comments?
|
2170
2200
|
Max: 10
|
2171
2201
|
CountAsOne: []
|
2172
|
-
ExcludedMethods: []
|
2202
|
+
ExcludedMethods: [] # deprecated, retained for backwards compatibility
|
2203
|
+
IgnoredMethods: []
|
2173
2204
|
|
2174
2205
|
Metrics/ModuleLength:
|
2175
2206
|
Description: 'Avoid modules longer than 100 lines of code.'
|
@@ -2185,8 +2216,10 @@ Metrics/ParameterLists:
|
|
2185
2216
|
StyleGuide: '#too-many-params'
|
2186
2217
|
Enabled: true
|
2187
2218
|
VersionAdded: '0.25'
|
2219
|
+
VersionChanged: '1.5'
|
2188
2220
|
Max: 5
|
2189
2221
|
CountKeywordArgs: true
|
2222
|
+
MaxOptionalParameters: 3
|
2190
2223
|
|
2191
2224
|
Metrics/PerceivedComplexity:
|
2192
2225
|
Description: >-
|
@@ -2456,7 +2489,7 @@ Naming/VariableNumber:
|
|
2456
2489
|
StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
|
2457
2490
|
Enabled: true
|
2458
2491
|
VersionAdded: '0.50'
|
2459
|
-
VersionChanged: '1.
|
2492
|
+
VersionChanged: '1.4'
|
2460
2493
|
EnforcedStyle: normalcase
|
2461
2494
|
SupportedStyles:
|
2462
2495
|
- snake_case
|
@@ -2464,7 +2497,13 @@ Naming/VariableNumber:
|
|
2464
2497
|
- non_integer
|
2465
2498
|
CheckMethodNames: true
|
2466
2499
|
CheckSymbols: true
|
2467
|
-
AllowedIdentifiers:
|
2500
|
+
AllowedIdentifiers:
|
2501
|
+
- capture3 # Open3.capture3
|
2502
|
+
- iso8601 # Time#iso8601
|
2503
|
+
- rfc1123_date # CGI.rfc1123_date
|
2504
|
+
- rfc822 # Time#rfc822
|
2505
|
+
- rfc2822 # Time#rfc2822
|
2506
|
+
- rfc3339 # DateTime.rfc3339
|
2468
2507
|
|
2469
2508
|
#################### Security ##############################
|
2470
2509
|
|
@@ -4262,6 +4301,7 @@ Style/SoleNestedConditional:
|
|
4262
4301
|
which can be merged into outer conditional node.
|
4263
4302
|
Enabled: true
|
4264
4303
|
VersionAdded: '0.89'
|
4304
|
+
VersionChanged: '1.5'
|
4265
4305
|
AllowModifier: false
|
4266
4306
|
|
4267
4307
|
Style/SpecialGlobalVars:
|
@@ -4394,7 +4434,7 @@ Style/SymbolProc:
|
|
4394
4434
|
Enabled: true
|
4395
4435
|
Safe: false
|
4396
4436
|
VersionAdded: '0.26'
|
4397
|
-
VersionChanged: '
|
4437
|
+
VersionChanged: '1.5'
|
4398
4438
|
# A list of method names to be ignored by the check.
|
4399
4439
|
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
4400
4440
|
IgnoredMethods:
|
data/lib/rubocop.rb
CHANGED
@@ -18,6 +18,7 @@ require_relative 'rubocop/ext/regexp_node'
|
|
18
18
|
require_relative 'rubocop/ext/regexp_parser'
|
19
19
|
|
20
20
|
require_relative 'rubocop/core_ext/string'
|
21
|
+
require_relative 'rubocop/core_ext/hash'
|
21
22
|
require_relative 'rubocop/ext/processed_source'
|
22
23
|
|
23
24
|
require_relative 'rubocop/path_util'
|
@@ -88,6 +89,7 @@ require_relative 'rubocop/cop/mixin/interpolation'
|
|
88
89
|
require_relative 'rubocop/cop/mixin/line_length_help'
|
89
90
|
require_relative 'rubocop/cop/mixin/match_range'
|
90
91
|
require_relative 'rubocop/cop/metrics/utils/repeated_csend_discount'
|
92
|
+
require_relative 'rubocop/cop/metrics/utils/repeated_attribute_discount'
|
91
93
|
require_relative 'rubocop/cop/mixin/method_complexity'
|
92
94
|
require_relative 'rubocop/cop/mixin/method_preference'
|
93
95
|
require_relative 'rubocop/cop/mixin/min_body_length'
|
@@ -341,6 +343,7 @@ require_relative 'rubocop/cop/lint/to_json'
|
|
341
343
|
require_relative 'rubocop/cop/lint/top_level_return_with_argument'
|
342
344
|
require_relative 'rubocop/cop/lint/trailing_comma_in_attribute_declaration'
|
343
345
|
require_relative 'rubocop/cop/lint/underscore_prefixed_variable_name'
|
346
|
+
require_relative 'rubocop/cop/lint/unexpected_block_arity'
|
344
347
|
require_relative 'rubocop/cop/lint/unified_integer'
|
345
348
|
require_relative 'rubocop/cop/lint/unmodified_reduce_accumulator'
|
346
349
|
require_relative 'rubocop/cop/lint/unreachable_code'
|
@@ -646,6 +649,7 @@ require_relative 'rubocop/cli/command/auto_genenerate_config'
|
|
646
649
|
require_relative 'rubocop/cli/command/execute_runner'
|
647
650
|
require_relative 'rubocop/cli/command/init_dotfile'
|
648
651
|
require_relative 'rubocop/cli/command/show_cops'
|
652
|
+
require_relative 'rubocop/cli/command/suggest_extensions'
|
649
653
|
require_relative 'rubocop/cli/command/version'
|
650
654
|
require_relative 'rubocop/config_regeneration'
|
651
655
|
require_relative 'rubocop/options'
|