rubocop 0.32.1 → 0.33.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +58 -0
- data/README.md +22 -4
- data/config/default.yml +29 -10
- data/config/disabled.yml +8 -4
- data/config/enabled.yml +40 -1
- data/lib/rubocop.rb +8 -0
- data/lib/rubocop/cli.rb +1 -0
- data/lib/rubocop/config_loader.rb +23 -2
- data/lib/rubocop/cop/lint/block_alignment.rb +1 -1
- data/lib/rubocop/cop/lint/circular_argument_reference.rb +38 -0
- data/lib/rubocop/cop/lint/def_end_alignment.rb +8 -4
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +38 -21
- data/lib/rubocop/cop/lint/duplicate_methods.rb +1 -1
- data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +95 -0
- data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +1 -1
- data/lib/rubocop/cop/mixin/on_method_def.rb +4 -5
- data/lib/rubocop/cop/mixin/string_literals_help.rb +1 -1
- data/lib/rubocop/cop/performance/count.rb +2 -0
- data/lib/rubocop/cop/performance/detect.rb +11 -2
- data/lib/rubocop/cop/performance/flat_map.rb +3 -3
- data/lib/rubocop/cop/performance/string_replacement.rb +161 -0
- data/lib/rubocop/cop/rails/date.rb +8 -8
- data/lib/rubocop/cop/rails/time_zone.rb +22 -13
- data/lib/rubocop/cop/style/block_delimiters.rb +6 -1
- data/lib/rubocop/cop/style/documentation.rb +1 -1
- data/lib/rubocop/cop/style/extra_spacing.rb +84 -5
- data/lib/rubocop/cop/style/first_parameter_indentation.rb +2 -0
- data/lib/rubocop/cop/style/indentation_width.rb +28 -4
- data/lib/rubocop/cop/style/initial_indentation.rb +32 -0
- data/lib/rubocop/cop/style/method_call_parentheses.rb +20 -1
- data/lib/rubocop/cop/style/one_line_conditional.rb +8 -4
- data/lib/rubocop/cop/style/option_hash.rb +56 -0
- data/lib/rubocop/cop/style/optional_arguments.rb +49 -0
- data/lib/rubocop/cop/style/parallel_assignment.rb +3 -0
- data/lib/rubocop/cop/style/percent_literal_delimiters.rb +3 -66
- data/lib/rubocop/cop/style/redundant_return.rb +20 -3
- data/lib/rubocop/cop/style/rescue_ensure_alignment.rb +77 -0
- data/lib/rubocop/cop/style/rescue_modifier.rb +4 -28
- data/lib/rubocop/cop/style/send.rb +18 -0
- data/lib/rubocop/cop/style/space_inside_string_interpolation.rb +32 -13
- data/lib/rubocop/cop/style/symbol_literal.rb +1 -1
- data/lib/rubocop/cop/style/trivial_accessors.rb +10 -1
- data/lib/rubocop/cop/style/while_until_do.rb +1 -1
- data/lib/rubocop/cop/style/word_array.rb +13 -1
- data/lib/rubocop/formatter/disabled_config_formatter.rb +54 -5
- data/lib/rubocop/options.rb +81 -55
- data/lib/rubocop/version.rb +1 -1
- data/relnotes/v0.33.0.md +157 -0
- metadata +11 -2
@@ -9,11 +9,13 @@ module RuboCop
|
|
9
9
|
MSG = 'Use `attr_%s` to define trivial %s methods.'
|
10
10
|
|
11
11
|
def on_def(node)
|
12
|
+
return if in_module?(node)
|
12
13
|
method_name, args, body = *node
|
13
14
|
on_method_def(node, method_name, args, body)
|
14
15
|
end
|
15
16
|
|
16
17
|
def on_defs(node)
|
18
|
+
return if in_module?(node)
|
17
19
|
return if ignore_class_methods?
|
18
20
|
_scope, method_name, args, body = *node
|
19
21
|
on_method_def(node, method_name, args, body)
|
@@ -21,6 +23,12 @@ module RuboCop
|
|
21
23
|
|
22
24
|
private
|
23
25
|
|
26
|
+
def in_module?(node)
|
27
|
+
pnode = node.parent
|
28
|
+
pnode = pnode.parent if pnode && pnode.type == :begin
|
29
|
+
!pnode.nil? && pnode.type == :module
|
30
|
+
end
|
31
|
+
|
24
32
|
def on_method_def(node, method_name, args, body)
|
25
33
|
kind = if trivial_reader?(method_name, args, body)
|
26
34
|
'reader'
|
@@ -100,7 +108,7 @@ module RuboCop
|
|
100
108
|
def names_match?(method_name, body)
|
101
109
|
ivar_name, = *body
|
102
110
|
|
103
|
-
method_name.to_s.
|
111
|
+
method_name.to_s.sub(/[=?]$/, '') == ivar_name[1..-1]
|
104
112
|
end
|
105
113
|
|
106
114
|
def trivial_accessor_kind(method_name, args, body)
|
@@ -127,6 +135,7 @@ module RuboCop
|
|
127
135
|
def autocorrect_instance(node)
|
128
136
|
method_name, args, body = *node
|
129
137
|
unless names_match?(method_name, body) &&
|
138
|
+
!predicate?(method_name) &&
|
130
139
|
(kind = trivial_accessor_kind(method_name, args, body))
|
131
140
|
return
|
132
141
|
end
|
@@ -16,7 +16,7 @@ module RuboCop
|
|
16
16
|
def handle(node)
|
17
17
|
length = node.loc.expression.source.lines.to_a.size
|
18
18
|
return unless length > 1
|
19
|
-
return unless
|
19
|
+
return unless node.loc.begin && node.loc.begin.is?('do')
|
20
20
|
|
21
21
|
add_offense(node, :begin, error_message(node.type))
|
22
22
|
end
|
@@ -61,7 +61,8 @@ module RuboCop
|
|
61
61
|
|
62
62
|
def autocorrect(node)
|
63
63
|
@interpolated = false
|
64
|
-
contents = node.children
|
64
|
+
contents = autocorrect_words(node.children, node.loc.line)
|
65
|
+
|
65
66
|
char = @interpolated ? 'W' : 'w'
|
66
67
|
|
67
68
|
lambda do |corrector|
|
@@ -69,6 +70,17 @@ module RuboCop
|
|
69
70
|
end
|
70
71
|
end
|
71
72
|
|
73
|
+
def autocorrect_words(word_nodes, base_line_number)
|
74
|
+
previous_node_line_number = base_line_number
|
75
|
+
word_nodes.map do |node|
|
76
|
+
number_of_line_breaks = node.loc.line - previous_node_line_number
|
77
|
+
line_breaks = "\n" * number_of_line_breaks
|
78
|
+
previous_node_line_number = node.loc.line
|
79
|
+
|
80
|
+
line_breaks + source_for(node)
|
81
|
+
end.join(' ')
|
82
|
+
end
|
83
|
+
|
72
84
|
def source_for(str_node)
|
73
85
|
if character_literal?(str_node)
|
74
86
|
@interpolated = true
|
@@ -6,7 +6,8 @@ module RuboCop
|
|
6
6
|
# detected any offenses are configured to not detect the offense.
|
7
7
|
class DisabledConfigFormatter < BaseFormatter
|
8
8
|
HEADING =
|
9
|
-
['# This configuration was generated by
|
9
|
+
['# This configuration was generated by',
|
10
|
+
'# `%s`',
|
10
11
|
"# on #{Time.now} using RuboCop version #{Version.version}.",
|
11
12
|
'# The point is for the user to remove these configuration records',
|
12
13
|
'# one by one as the offenses are removed from the code base.',
|
@@ -22,13 +23,30 @@ module RuboCop
|
|
22
23
|
attr_accessor :config_to_allow_offenses
|
23
24
|
end
|
24
25
|
|
25
|
-
def
|
26
|
+
def file_started(_file, file_info)
|
27
|
+
@exclude_limit_option =
|
28
|
+
file_info.fetch(:cli_options, {})[:exclude_limit]
|
29
|
+
@exclude_limit = (
|
30
|
+
@exclude_limit_option ||
|
31
|
+
RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS).to_i
|
32
|
+
end
|
33
|
+
|
34
|
+
def file_finished(file, offenses)
|
26
35
|
@cops_with_offenses ||= Hash.new(0)
|
27
|
-
|
36
|
+
@files_with_offences ||= {}
|
37
|
+
offenses.each do |o|
|
38
|
+
@cops_with_offenses[o.cop_name] += 1
|
39
|
+
@files_with_offences[o.cop_name] ||= []
|
40
|
+
@files_with_offences[o.cop_name] << file
|
41
|
+
end
|
28
42
|
end
|
29
43
|
|
30
44
|
def finished(_inspected_files)
|
31
|
-
|
45
|
+
command = 'rubocop --auto-gen-config'
|
46
|
+
if @exclude_limit_option
|
47
|
+
command += format(' --exclude-limit %d', @exclude_limit_option.to_i)
|
48
|
+
end
|
49
|
+
output.puts HEADING % command
|
32
50
|
|
33
51
|
# Syntax isn't a real cop and it can't be disabled.
|
34
52
|
@cops_with_offenses.delete('Syntax')
|
@@ -36,10 +54,11 @@ module RuboCop
|
|
36
54
|
@cops_with_offenses.sort.each do |cop_name, offense_count|
|
37
55
|
output.puts
|
38
56
|
cfg = self.class.config_to_allow_offenses[cop_name]
|
39
|
-
cfg ||= {
|
57
|
+
cfg ||= {}
|
40
58
|
output_cop_comments(output, cfg, cop_name, offense_count)
|
41
59
|
output.puts "#{cop_name}:"
|
42
60
|
cfg.each { |key, value| output.puts " #{key}: #{value}" }
|
61
|
+
output_offending_files(output, cfg, cop_name)
|
43
62
|
end
|
44
63
|
puts "Created #{output.path}."
|
45
64
|
puts "Run `rubocop --config #{output.path}`, or"
|
@@ -62,6 +81,36 @@ module RuboCop
|
|
62
81
|
|
63
82
|
output.puts "# Configuration parameters: #{params.join(', ')}."
|
64
83
|
end
|
84
|
+
|
85
|
+
def output_offending_files(output, cfg, cop_name)
|
86
|
+
return unless cfg.empty?
|
87
|
+
|
88
|
+
offending_files = @files_with_offences[cop_name].uniq.sort
|
89
|
+
if offending_files.count > @exclude_limit
|
90
|
+
output.puts ' Enabled: false'
|
91
|
+
else
|
92
|
+
output_exclude_list(output, offending_files)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def output_exclude_list(output, offending_files)
|
97
|
+
require 'pathname'
|
98
|
+
parent = Pathname.new(Dir.pwd)
|
99
|
+
|
100
|
+
output.puts ' Exclude:'
|
101
|
+
offending_files.each do |file|
|
102
|
+
file_path = Pathname.new(file)
|
103
|
+
begin
|
104
|
+
relative = file_path.relative_path_from(parent)
|
105
|
+
output.puts " - '#{relative}'"
|
106
|
+
rescue ArgumentError
|
107
|
+
output.puts " - '#{file}'"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
rescue LoadError
|
111
|
+
# Fallback to Enabled: false for Ruby < 1.9.3
|
112
|
+
output.puts ' Enabled: false'
|
113
|
+
end
|
65
114
|
end
|
66
115
|
end
|
67
116
|
end
|
data/lib/rubocop/options.rb
CHANGED
@@ -3,62 +3,11 @@
|
|
3
3
|
require 'optparse'
|
4
4
|
|
5
5
|
module RuboCop
|
6
|
-
# This module contains help texts for command line options.
|
7
|
-
module OptionsHelp
|
8
|
-
TEXT = {
|
9
|
-
only: 'Run only the given cop(s).',
|
10
|
-
only_guide_cops: ['Run only cops for rules that link to a',
|
11
|
-
'style guide.'],
|
12
|
-
except: 'Disable the given cop(s).',
|
13
|
-
require: 'Require Ruby file.',
|
14
|
-
config: 'Specify configuration file.',
|
15
|
-
auto_gen_config: ['Generate a configuration file acting as a',
|
16
|
-
'TODO list.'],
|
17
|
-
force_exclusion: ['Force excluding files specified in the',
|
18
|
-
'configuration `Exclude` even if they are',
|
19
|
-
'explicitly passed as arguments.'],
|
20
|
-
format: ['Choose an output formatter. This option',
|
21
|
-
'can be specified multiple times to enable',
|
22
|
-
'multiple formatters at the same time.',
|
23
|
-
' [p]rogress (default)',
|
24
|
-
' [s]imple',
|
25
|
-
' [c]lang',
|
26
|
-
' [d]isabled cops via inline comments',
|
27
|
-
' [fu]ubar',
|
28
|
-
' [e]macs',
|
29
|
-
' [j]son',
|
30
|
-
' [h]tml',
|
31
|
-
' [fi]les',
|
32
|
-
' [o]ffenses',
|
33
|
-
' custom formatter class name'],
|
34
|
-
out: ['Write output to a file instead of STDOUT.',
|
35
|
-
'This option applies to the previously',
|
36
|
-
'specified --format, or the default format',
|
37
|
-
'if no format is specified.'],
|
38
|
-
fail_level: ['Minimum severity (A/R/C/W/E/F) for exit',
|
39
|
-
'with error code.'],
|
40
|
-
show_cops: ['Shows the given cops, or all cops by',
|
41
|
-
'default, and their configurations for the',
|
42
|
-
'current directory.'],
|
43
|
-
fail_fast: ['Inspect files in order of modification',
|
44
|
-
'time and stop after the first file',
|
45
|
-
'containing offenses.'],
|
46
|
-
debug: 'Display debug info.',
|
47
|
-
display_cop_names: 'Display cop names in offense messages.',
|
48
|
-
display_style_guide: 'Display style guide URLs in offense messages.',
|
49
|
-
rails: 'Run extra Rails cops.',
|
50
|
-
lint: 'Run only lint cops.',
|
51
|
-
auto_correct: 'Auto-correct offenses.',
|
52
|
-
no_color: 'Disable color output.',
|
53
|
-
version: 'Display version.',
|
54
|
-
verbose_version: 'Display verbose version.'
|
55
|
-
}
|
56
|
-
end
|
57
|
-
|
58
6
|
# This class handles command line options.
|
59
7
|
class Options
|
60
8
|
DEFAULT_FORMATTER = 'progress'
|
61
9
|
EXITING_OPTIONS = [:version, :verbose_version, :show_cops]
|
10
|
+
DEFAULT_MAXIMUM_EXCLUSION_ITEMS = 15
|
62
11
|
|
63
12
|
def initialize
|
64
13
|
@options = {}
|
@@ -136,6 +85,10 @@ module RuboCop
|
|
136
85
|
ConfigLoader::AUTO_GENERATED_FILE]]
|
137
86
|
end
|
138
87
|
|
88
|
+
option(opts, '--exclude-limit COUNT') do
|
89
|
+
validate_exclude_limit_option(args)
|
90
|
+
end
|
91
|
+
|
139
92
|
option(opts, '--force-exclusion')
|
140
93
|
end
|
141
94
|
|
@@ -197,14 +150,87 @@ module RuboCop
|
|
197
150
|
# e.g. [..., '--auto-correct', ...] to :auto_correct.
|
198
151
|
def long_opt_symbol(args)
|
199
152
|
long_opt = args.find { |arg| arg.start_with?('--') }
|
200
|
-
long_opt[2..-1].sub(/ .*/, '').
|
153
|
+
long_opt[2..-1].sub(/ .*/, '').tr('-', '_').to_sym
|
201
154
|
end
|
202
155
|
|
203
156
|
def validate_auto_gen_config_option(args)
|
204
|
-
return
|
157
|
+
return if args.empty?
|
158
|
+
return if args.size <= 2 && args.first == '--exclude-limit'
|
205
159
|
|
206
|
-
warn '--auto-gen-config can
|
160
|
+
warn '--auto-gen-config can only be combined with --exclude-limit.'
|
207
161
|
exit(1)
|
208
162
|
end
|
163
|
+
|
164
|
+
def validate_exclude_limit_option(args)
|
165
|
+
if @options[:exclude_limit] !~ /^\d+$/
|
166
|
+
# Emulate OptionParser's behavior to make failures consistent regardless
|
167
|
+
# of option order.
|
168
|
+
fail OptionParser::MissingArgument
|
169
|
+
end
|
170
|
+
|
171
|
+
# --exclude-limit is valid if there's a parsed or yet unparsed
|
172
|
+
# --auto-gen-config.
|
173
|
+
return if @options[:auto_gen_config] || args.include?('--auto-gen-config')
|
174
|
+
|
175
|
+
fail ArgumentError,
|
176
|
+
'--exclude-limit can only be used with --auto-gen-config.'
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# This module contains help texts for command line options.
|
181
|
+
module OptionsHelp
|
182
|
+
MAX_EXCL = RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS.to_s
|
183
|
+
# rubocop:disable Style/ExtraSpacing
|
184
|
+
TEXT = {
|
185
|
+
only: 'Run only the given cop(s).',
|
186
|
+
only_guide_cops: ['Run only cops for rules that link to a',
|
187
|
+
'style guide.'],
|
188
|
+
except: 'Disable the given cop(s).',
|
189
|
+
require: 'Require Ruby file.',
|
190
|
+
config: 'Specify configuration file.',
|
191
|
+
auto_gen_config: ['Generate a configuration file acting as a',
|
192
|
+
'TODO list.'],
|
193
|
+
exclude_limit: ['Used together with --auto-gen-config to',
|
194
|
+
'set the limit for how many Exclude',
|
195
|
+
"properties to generate. Default is #{MAX_EXCL}."],
|
196
|
+
force_exclusion: ['Force excluding files specified in the',
|
197
|
+
'configuration `Exclude` even if they are',
|
198
|
+
'explicitly passed as arguments.'],
|
199
|
+
format: ['Choose an output formatter. This option',
|
200
|
+
'can be specified multiple times to enable',
|
201
|
+
'multiple formatters at the same time.',
|
202
|
+
' [p]rogress (default)',
|
203
|
+
' [s]imple',
|
204
|
+
' [c]lang',
|
205
|
+
' [d]isabled cops via inline comments',
|
206
|
+
' [fu]ubar',
|
207
|
+
' [e]macs',
|
208
|
+
' [j]son',
|
209
|
+
' [h]tml',
|
210
|
+
' [fi]les',
|
211
|
+
' [o]ffenses',
|
212
|
+
' custom formatter class name'],
|
213
|
+
out: ['Write output to a file instead of STDOUT.',
|
214
|
+
'This option applies to the previously',
|
215
|
+
'specified --format, or the default format',
|
216
|
+
'if no format is specified.'],
|
217
|
+
fail_level: ['Minimum severity (A/R/C/W/E/F) for exit',
|
218
|
+
'with error code.'],
|
219
|
+
show_cops: ['Shows the given cops, or all cops by',
|
220
|
+
'default, and their configurations for the',
|
221
|
+
'current directory.'],
|
222
|
+
fail_fast: ['Inspect files in order of modification',
|
223
|
+
'time and stop after the first file',
|
224
|
+
'containing offenses.'],
|
225
|
+
debug: 'Display debug info.',
|
226
|
+
display_cop_names: 'Display cop names in offense messages.',
|
227
|
+
display_style_guide: 'Display style guide URLs in offense messages.',
|
228
|
+
rails: 'Run extra Rails cops.',
|
229
|
+
lint: 'Run only lint cops.',
|
230
|
+
auto_correct: 'Auto-correct offenses.',
|
231
|
+
no_color: 'Disable color output.',
|
232
|
+
version: 'Display version.',
|
233
|
+
verbose_version: 'Display verbose version.'
|
234
|
+
}
|
209
235
|
end
|
210
236
|
end
|
data/lib/rubocop/version.rb
CHANGED
data/relnotes/v0.33.0.md
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
### New features
|
2
|
+
|
3
|
+
* [#2081](https://github.com/bbatsov/rubocop/pull/2081): New cop `Style/Send` checks for the use of `send` and instead encourages changing it to `BasicObject#__send__` or `Object#public_send` (disabled by default). ([@syndbg][])
|
4
|
+
* [#2057](https://github.com/bbatsov/rubocop/pull/2057): New cop `Lint/FormatParameterMismatch` checks for a mismatch between the number of fields expected in format/sprintf/% and what was pased to it. ([@edmz][])
|
5
|
+
* [#2010](https://github.com/bbatsov/rubocop/pull/2010): Add `space` style for SpaceInsideStringInterpolation. ([@gotrevor][])
|
6
|
+
* [#2007](https://github.com/bbatsov/rubocop/pull/2007): Allow any modifier before `def`, not only visibility modifiers. ([@fphilipe][])
|
7
|
+
* [#1980](https://github.com/bbatsov/rubocop/pull/1980): `--auto-gen-config` now outputs an excluded files list for failed cops (up to a maxiumum of 15 files). ([@bmorrall][])
|
8
|
+
* [#2004](https://github.com/bbatsov/rubocop/pull/2004): Introduced `--exclude-limit COUNT` to configure how many files `--auto-gen-config` will exclude. ([@awwaiid][], [@jonas054][])
|
9
|
+
* [#1918](https://github.com/bbatsov/rubocop/issues/1918): New configuration parameter `AllCops:DisabledByDefault` when set to `true` makes only cops found in user configuration enabled, which makes cop selection *opt-in*. ([@jonas054][])
|
10
|
+
* New cop `Performance/StringReplacement` checks for usages of `gsub` that can be replaced with `tr` or `delete`. ([@rrosenblum][])
|
11
|
+
* [#2001](https://github.com/bbatsov/rubocop/issues/2001): New cop `Style/InitialIndentation` checks for indentation of the first non-blank non-comment line in a file. ([@jonas054][])
|
12
|
+
* [#2060](https://github.com/bbatsov/rubocop/issues/2060): New cop `Style/RescueEnsureAlignment` checks for bad alignment of `rescue` and `ensure` keywords. ([@lumeet][])
|
13
|
+
* New cop `Style/OptionalArguments` checks for optional arguments that do not appear at the end of an argument list. ([@rrosenblum][])
|
14
|
+
* New cop `Lint/CircularArgumentReference` checks for "circular argument references" in keyword arguments, which Ruby 2.2 warns against. ([@maxjacobson][], [@sliuu][])
|
15
|
+
* [#2030](https://github.com/bbatsov/rubocop/issues/2030): New cop `Lint/OptionHash` checks for option hashes and encourages changing them to keyword arguments (disabled by default). ([@maxjacobson][])
|
16
|
+
|
17
|
+
### Changes
|
18
|
+
|
19
|
+
* [#2052](https://github.com/bbatsov/rubocop/pull/2052): `Style/RescueModifier` uses token stream to identify offenses. ([@urbanautomaton][])
|
20
|
+
* Rename `Rails/Date` and `Rails/TimeZone` style names to "strict" and "flexible" and make "flexible" to be default. ([@palkan][])
|
21
|
+
* [#2035](https://github.com/bbatsov/rubocop/issues/2035): `Style/ExtraSpacing` is now enabled by default and has a configuration parameter `AllowForAlignment` that is `true` by default, making it allow extra spacing if it's used for alignment purposes. ([@jonas054][])
|
22
|
+
|
23
|
+
### Bugs fixed
|
24
|
+
|
25
|
+
* [#2014](https://github.com/bbatsov/rubocop/pull/2014): Fix `Style/TrivialAccessors` to support AllowPredicates: false. ([@gotrevor][])
|
26
|
+
* [#1988](https://github.com/bbatsov/rubocop/issues/1988): Fix bug in `Style/ParallelAssignment` when assigning from `Module::CONSTANT`. ([@rrosenblum][])
|
27
|
+
* [#1995](https://github.com/bbatsov/rubocop/pull/1995): Improve message for `Rails/TimeZone`. ([@palkan][])
|
28
|
+
* [#1977](https://github.com/bbatsov/rubocop/issues/1977): Fix bugs in `Rails/Date` and `Rails/TimeZone` when using namespaced Time/Date. ([@palkan][])
|
29
|
+
* [#1973](https://github.com/bbatsov/rubocop/issues/1973): Do not register an offense in `Performance/Detect` when `select` is called on `Enumerable::Lazy`. ([@palkan][])
|
30
|
+
* [#2015](https://github.com/bbatsov/rubocop/issues/2015): Fix bug occurring for auto-correction of a misaligned `end` in a file with only one method. ([@jonas054][])
|
31
|
+
* Allow string interpolation segments inside single quoted string literals when double quotes are preferred. ([@segiddins][])
|
32
|
+
* [#2026](https://github.com/bbatsov/rubocop/issues/2026): Allow `Time.current` when style is "acceptable".([@palkan][])
|
33
|
+
* [#2029](https://github.com/bbatsov/rubocop/issues/2029): Fix bug where `Style/RedundantReturn` auto-corrects returning implicit hashes to invalid syntax. ([@rrosenblum][])
|
34
|
+
* [#2021](https://github.com/bbatsov/rubocop/issues/2021): Fix bug in `Style/BlockDelimiters` when a `semantic` expression is used in an array or a range. ([@lumeet][])
|
35
|
+
* [#1992](https://github.com/bbatsov/rubocop/issues/1992): Allow parentheses in assignment to a variable with the same name as the method's in `Style/MethodCallParentheses`. ([@lumeet][])
|
36
|
+
* [#2045](https://github.com/bbatsov/rubocop/issues/2045): Fix crash in `Style/IndentationWidth` when using `private_class_method def self.foo` syntax. ([@unmanbearpig][])
|
37
|
+
* [#2006](https://github.com/bbatsov/rubocop/issues/2006): Fix crash in `Style/FirstParameterIndentation` in case of nested offenses. ([@unmanbearpig][])
|
38
|
+
* [#2059](https://github.com/bbatsov/rubocop/issues/2059): Don't check for trivial accessors in modules. ([@bbatsov][])
|
39
|
+
* Add proper punctuation to the end of offense messages, where it is missing. ([@lumeet][])
|
40
|
+
* [#2071](https://github.com/bbatsov/rubocop/pull/2071): Keep line breaks in place on WordArray autocorrect.([@unmanbearpig][])
|
41
|
+
* [#2075](https://github.com/bbatsov/rubocop/pull/2075): Properly correct `Style/PercentLiteralDelimiters` with escape characters in them. ([@rrosenblum][])
|
42
|
+
* [#2023](https://github.com/bbatsov/rubocop/issues/2023): Avoid auto-correction corruption in `IndentationWidth`. ([@jonas054][])
|
43
|
+
* [#2080](https://github.com/bbatsov/rubocop/issues/2080): Properly parse code in `Performance/Count` when calling `select..count` in a class that extends an enumerable. ([@rrosenblum][])
|
44
|
+
* [#2093](https://github.com/bbatsov/rubocop/issues/2093): Fix bug in `Style/OneLineConditional` which should not raise an offense with an 'if/then/end' statement. ([@sliuu][])
|
45
|
+
|
46
|
+
[@bbatsov]: https://github.com/bbatsov
|
47
|
+
[@jonas054]: https://github.com/jonas054
|
48
|
+
[@yujinakayama]: https://github.com/yujinakayama
|
49
|
+
[@dblock]: https://github.com/dblock
|
50
|
+
[@nevir]: https://github.com/nevir
|
51
|
+
[@daviddavis]: https://github.com/daviddavis
|
52
|
+
[@sds]: https://github.com/sds
|
53
|
+
[@fancyremarker]: https://github.com/fancyremarker
|
54
|
+
[@sinisterchipmunk]: https://github.com/sinisterchipmunk
|
55
|
+
[@vonTronje]: https://github.com/vonTronje
|
56
|
+
[@agrimm]: https://github.com/agrimm
|
57
|
+
[@pmenglund]: https://github.com/pmenglund
|
58
|
+
[@chulkilee]: https://github.com/chulkilee
|
59
|
+
[@codez]: https://github.com/codez
|
60
|
+
[@emou]: https://github.com/emou
|
61
|
+
[@skanev]: http://github.com/skanev
|
62
|
+
[@claco]: http://github.com/claco
|
63
|
+
[@rifraf]: http://github.com/rifraf
|
64
|
+
[@scottmatthewman]: https://github.com/scottmatthewman
|
65
|
+
[@ma2gedev]: http://github.com/ma2gedev
|
66
|
+
[@jeremyolliver]: https://github.com/jeremyolliver
|
67
|
+
[@hannestyden]: https://github.com/hannestyden
|
68
|
+
[@geniou]: https://github.com/geniou
|
69
|
+
[@jkogara]: https://github.com/jkogara
|
70
|
+
[@tmorris-fiksu]: https://github.com/tmorris-fiksu
|
71
|
+
[@mockdeep]: https://github.com/mockdeep
|
72
|
+
[@hiroponz]: https://github.com/hiroponz
|
73
|
+
[@tamird]: https://github.com/tamird
|
74
|
+
[@fshowalter]: https://github.com/fshowalter
|
75
|
+
[@cschramm]: https://github.com/cschramm
|
76
|
+
[@bquorning]: https://github.com/bquorning
|
77
|
+
[@bcobb]: https://github.com/bcobb
|
78
|
+
[@irrationalfab]: https://github.com/irrationalfab
|
79
|
+
[@tommeier]: https://github.com/tommeier
|
80
|
+
[@sfeldon]: https://github.com/sfeldon
|
81
|
+
[@biinari]: https://github.com/biinari
|
82
|
+
[@barunio]: https://github.com/barunio
|
83
|
+
[@molawson]: https://github.com/molawson
|
84
|
+
[@wndhydrnt]: https://github.com/wndhydrnt
|
85
|
+
[@ggilder]: https://github.com/ggilder
|
86
|
+
[@salbertson]: https://github.com/salbertson
|
87
|
+
[@camilleldn]: https://github.com/camilleldn
|
88
|
+
[@mcls]: https://github.com/mcls
|
89
|
+
[@yous]: https://github.com/yous
|
90
|
+
[@vrthra]: https://github.com/vrthra
|
91
|
+
[@SkuliOskarsson]: https://github.com/SkuliOskarsson
|
92
|
+
[@jspanjers]: https://github.com/jspanjers
|
93
|
+
[@sch1zo]: https://github.com/sch1zo
|
94
|
+
[@smangelsdorf]: https://github.com/smangelsdorf
|
95
|
+
[@mvz]: https://github.com/mvz
|
96
|
+
[@jfelchner]: https://github.com/jfelchner
|
97
|
+
[@janraasch]: https://github.com/janraasch
|
98
|
+
[@jcarbo]: https://github.com/jcarbo
|
99
|
+
[@oneamtu]: https://github.com/oneamtu
|
100
|
+
[@toy]: https://github.com/toy
|
101
|
+
[@Koronen]: https://github.com/Koronen
|
102
|
+
[@blainesch]: https://github.com/blainesch
|
103
|
+
[@marxarelli]: https://github.com/marxarelli
|
104
|
+
[@katieschilling]: https://github.com/katieschilling
|
105
|
+
[@kakutani]: https://github.com/kakutani
|
106
|
+
[@rrosenblum]: https://github.com/rrosenblum
|
107
|
+
[@mattjmcnaughton]: https://github.com/mattjmcnaughton
|
108
|
+
[@huerlisi]: https://github.com/huerlisi
|
109
|
+
[@volkert]: https://github.com/volkert
|
110
|
+
[@lumeet]: https://github.com/lumeet
|
111
|
+
[@mmozuras]: https://github.com/mmozuras
|
112
|
+
[@d4rk5eed]: https://github.com/d4rk5eed
|
113
|
+
[@cshaffer]: https://github.com/cshaffer
|
114
|
+
[@eitoball]: https://github.com/eitoball
|
115
|
+
[@iainbeeston]: https://github.com/iainbeeston
|
116
|
+
[@pimterry]: https://github.com/pimterry
|
117
|
+
[@palkan]: https://github.com/palkan
|
118
|
+
[@jdoconnor]: https://github.com/jdoconnor
|
119
|
+
[@meganemura]: https://github.com/meganemura
|
120
|
+
[@zvkemp]: https://github.com/zvkemp
|
121
|
+
[@vassilevsky]: https://github.com/vassilevsky
|
122
|
+
[@gerry3]: https://github.com/gerry3
|
123
|
+
[@ypresto]: https://github.com/ypresto
|
124
|
+
[@clowder]: https://github.com/clowder
|
125
|
+
[@mudge]: https://github.com/mudge
|
126
|
+
[@mzp]: https://github.com/mzp
|
127
|
+
[@bankair]: https://github.com/bankair
|
128
|
+
[@crimsonknave]: https://github.com/crimsonknave
|
129
|
+
[@renuo]: https://github.com/renuo
|
130
|
+
[@sdeframond]: https://github.com/sdeframond
|
131
|
+
[@til]: https://github.com/til
|
132
|
+
[@carhartl]: https://github.com/carhartl
|
133
|
+
[@dylandavidson]: https://github.com/dylandavidson
|
134
|
+
[@tmr08c]: https://github.com/tmr08c
|
135
|
+
[@hbd225]: https://github.com/hbd225
|
136
|
+
[@l8nite]: https://github.com/l8nite
|
137
|
+
[@sumeet]: https://github.com/sumeet
|
138
|
+
[@ojab]: https://github.com/ojab
|
139
|
+
[@chastell]: https://github.com/chastell
|
140
|
+
[@glasnt]: https://github.com/glasnt
|
141
|
+
[@crazydog115]: https://github.com/crazydog115
|
142
|
+
[@RGBD]: https://github.com/RGBD
|
143
|
+
[@panthomakos]: https://github.com/panthomakos
|
144
|
+
[@matugm]: https://github.com/matugm
|
145
|
+
[@m1foley]: https://github.com/m1foley
|
146
|
+
[@tejasbubane]: https://github.com/tejasbubane
|
147
|
+
[@bmorrall]: https://github.com/bmorrall
|
148
|
+
[@fphilipe]: https://github.com/fphilipe
|
149
|
+
[@gotrevor]: https://github.com/gotrevor
|
150
|
+
[@awwaiid]: https://github.com/awwaiid
|
151
|
+
[@segiddins]: https://github.com/segiddins
|
152
|
+
[@urbanautomaton]: https://github.com/urbanautomaton.com
|
153
|
+
[@unmanbearpig]: https://github.com/unmanbearpig
|
154
|
+
[@maxjacobson]: https://github.com/maxjacobson
|
155
|
+
[@sliuu]: https://github.com/sliuu
|
156
|
+
[@edmz]: https://github.com/edmz
|
157
|
+
[@syndbg]: https://github.com/syndbg
|