rubocop 0.65.0 → 0.66.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/config/default.yml +53 -4
- data/lib/rubocop.rb +4 -5
- data/lib/rubocop/cli.rb +1 -1
- data/lib/rubocop/config.rb +1 -1
- data/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +3 -5
- data/lib/rubocop/cop/layout/class_structure.rb +59 -28
- data/lib/rubocop/cop/layout/extra_spacing.rb +18 -0
- data/lib/rubocop/cop/layout/indentation_width.rb +25 -5
- data/lib/rubocop/cop/layout/space_around_block_parameters.rb +33 -17
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +30 -11
- data/lib/rubocop/cop/lint/else_layout.rb +1 -0
- data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +1 -1
- data/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +38 -0
- data/lib/rubocop/cop/lint/shadowed_exception.rb +14 -1
- data/lib/rubocop/cop/lint/to_json.rb +38 -0
- data/lib/rubocop/cop/lint/void.rb +1 -1
- data/lib/rubocop/cop/message_annotator.rb +4 -4
- data/lib/rubocop/cop/metrics/abc_size.rb +1 -0
- data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +31 -9
- data/lib/rubocop/cop/mixin/frozen_string_literal.rb +1 -1
- data/lib/rubocop/cop/mixin/integer_node.rb +1 -1
- data/lib/rubocop/cop/mixin/method_preference.rb +2 -1
- data/lib/rubocop/cop/naming/constant_name.rb +6 -1
- data/lib/rubocop/cop/naming/predicate_name.rb +6 -0
- data/lib/rubocop/cop/rails/link_to_blank.rb +1 -1
- data/lib/rubocop/cop/rails/output.rb +18 -1
- data/lib/rubocop/cop/rails/reflection_class_name.rb +1 -1
- data/lib/rubocop/cop/rails/time_zone.rb +10 -0
- data/lib/rubocop/cop/rails/validation.rb +3 -2
- data/lib/rubocop/cop/style/block_delimiters.rb +30 -1
- data/lib/rubocop/cop/style/conditional_assignment.rb +3 -1
- data/lib/rubocop/cop/style/constant_visibility.rb +66 -0
- data/lib/rubocop/cop/style/identical_conditional_branches.rb +8 -12
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +16 -4
- data/lib/rubocop/cop/style/numeric_literals.rb +16 -7
- data/lib/rubocop/cop/style/option_hash.rb +5 -0
- data/lib/rubocop/cop/style/redundant_freeze.rb +13 -1
- data/lib/rubocop/cop/style/redundant_self.rb +3 -1
- data/lib/rubocop/cop/style/stderr_puts.rb +1 -1
- data/lib/rubocop/cop/style/symbol_array.rb +9 -1
- data/lib/rubocop/cop/style/trivial_accessors.rb +5 -0
- data/lib/rubocop/cop/style/word_array.rb +0 -4
- data/lib/rubocop/cop/util.rb +4 -0
- data/lib/rubocop/core_ext/string.rb +47 -0
- data/lib/rubocop/node_pattern.rb +76 -55
- data/lib/rubocop/processed_source.rb +2 -2
- data/lib/rubocop/result_cache.rb +4 -4
- data/lib/rubocop/rspec/cop_helper.rb +5 -0
- data/lib/rubocop/rspec/expect_offense.rb +5 -5
- data/lib/rubocop/runner.rb +6 -13
- data/lib/rubocop/version.rb +1 -1
- metadata +15 -19
data/lib/rubocop/cop/util.rb
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Extensions to the core String class
|
4
|
+
class String
|
5
|
+
unless method_defined? :blank?
|
6
|
+
# Checks whether a string is blank. A string is considered blank if it
|
7
|
+
# is either empty or contains only whitespace characters.
|
8
|
+
#
|
9
|
+
# @return [Boolean] true is the string is blank, false otherwise
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# ''.blank? #=> true
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# ' '.blank? #=> true
|
16
|
+
#
|
17
|
+
# @example
|
18
|
+
# ' test'.blank? #=> false
|
19
|
+
def blank?
|
20
|
+
empty? || strip.empty?
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
unless method_defined? :strip_indent
|
25
|
+
# The method strips the whitespace preceding the base indentation.
|
26
|
+
# Useful for HEREDOCs and other multi-line strings.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
#
|
30
|
+
# code = <<-END.strip_indent
|
31
|
+
# def test
|
32
|
+
# some_method
|
33
|
+
# other_method
|
34
|
+
# end
|
35
|
+
# END
|
36
|
+
#
|
37
|
+
# #=> "def\n some_method\n \nother_method\nend"
|
38
|
+
#
|
39
|
+
# @todo Replace call sites with squiggly heredocs when required Ruby
|
40
|
+
# version is >= 2.3.0
|
41
|
+
def strip_indent
|
42
|
+
leading_space = scan(/^[ \t]*(?=\S)/).min
|
43
|
+
indent = leading_space ? leading_space.size : 0
|
44
|
+
gsub(/^[ \t]{#{indent}}/, '')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/lib/rubocop/node_pattern.rb
CHANGED
@@ -37,8 +37,7 @@ module RuboCop
|
|
37
37
|
# '(send !const ...)' # ! negates the next part of the pattern
|
38
38
|
# '$(send const ...)' # arbitrary matching can be performed on a capture
|
39
39
|
# '(send _recv _msg)' # wildcards can be named (for readability)
|
40
|
-
# '(send ... :new)' # you can
|
41
|
-
# # (this only works for the very last)
|
40
|
+
# '(send ... :new)' # you can match against the last children
|
42
41
|
# '(send $...)' # capture all the children as an array
|
43
42
|
# '(send $... int)' # capture all children but the last as an array
|
44
43
|
# '(send _x :+ _x)' # unification is performed on named wildcards
|
@@ -118,8 +117,13 @@ module RuboCop
|
|
118
117
|
PARAM = /\A#{PARAM_NUMBER}\Z/.freeze
|
119
118
|
CLOSING = /\A(?:\)|\}|\])\Z/.freeze
|
120
119
|
|
120
|
+
REST = '...'.freeze
|
121
|
+
CAPTURED_REST = '$...'.freeze
|
122
|
+
|
121
123
|
attr_reader :match_code
|
122
124
|
|
125
|
+
SEQ_HEAD_INDEX = -1
|
126
|
+
|
123
127
|
def initialize(str, node_var = 'node0')
|
124
128
|
@string = str
|
125
129
|
@root = node_var
|
@@ -133,8 +137,7 @@ module RuboCop
|
|
133
137
|
end
|
134
138
|
|
135
139
|
def run(node_var)
|
136
|
-
tokens =
|
137
|
-
@string.scan(TOKEN).reject { |token| token =~ /\A#{SEPARATORS}\Z/ }
|
140
|
+
tokens = Compiler.tokens(@string)
|
138
141
|
|
139
142
|
@match_code = compile_expr(tokens, node_var, false)
|
140
143
|
|
@@ -180,83 +183,76 @@ module RuboCop
|
|
180
183
|
# temp variable as 'cur_node'
|
181
184
|
with_temp_node(cur_node) do |init, temp_node|
|
182
185
|
terms = compile_seq_terms(tokens, temp_node)
|
186
|
+
terms.unshift(compile_guard_clause(temp_node))
|
183
187
|
|
184
|
-
join_terms(init, terms,
|
188
|
+
join_terms(init, terms, " &&\n")
|
185
189
|
end
|
186
190
|
end
|
187
191
|
|
192
|
+
def compile_guard_clause(cur_node)
|
193
|
+
"#{cur_node}.is_a?(RuboCop::AST::Node)"
|
194
|
+
end
|
195
|
+
|
188
196
|
def compile_seq_terms(tokens, cur_node)
|
189
|
-
ret
|
197
|
+
ret =
|
190
198
|
compile_seq_terms_with_size(tokens, cur_node) do |token, terms, index|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
return compile_capt_ellip(tokens, cur_node, terms, index)
|
199
|
+
capture = next_capture if token == CAPTURED_REST
|
200
|
+
if capture || token == REST
|
201
|
+
index = 0 if index == SEQ_HEAD_INDEX # Consider ($...) as (_ $...)
|
202
|
+
return compile_ellipsis(tokens, cur_node, terms, index, capture)
|
196
203
|
end
|
197
204
|
end
|
198
|
-
|
199
|
-
ret << "(#{cur_node}.children.size == #{size})"
|
205
|
+
ret << "(#{cur_node}.children.size == #{ret.size - 1})"
|
200
206
|
end
|
201
207
|
|
202
208
|
def compile_seq_terms_with_size(tokens, cur_node)
|
203
|
-
index =
|
209
|
+
index = SEQ_HEAD_INDEX
|
204
210
|
terms = []
|
205
211
|
until tokens.first == ')'
|
206
|
-
yield tokens.first, terms, index
|
207
|
-
term
|
212
|
+
yield tokens.first, terms, index
|
213
|
+
term = compile_expr_with_index(tokens, cur_node, index)
|
214
|
+
index += 1
|
208
215
|
terms << term
|
209
216
|
end
|
210
217
|
|
211
218
|
tokens.shift # drop concluding )
|
212
|
-
|
219
|
+
terms
|
213
220
|
end
|
214
221
|
|
215
222
|
def compile_expr_with_index(tokens, cur_node, index)
|
216
|
-
if index
|
223
|
+
if index == SEQ_HEAD_INDEX
|
217
224
|
# in 'sequence head' position; some expressions are compiled
|
218
225
|
# differently at 'sequence head' (notably 'node type' expressions)
|
219
226
|
# grep for seq_head to see where it makes a difference
|
220
|
-
|
227
|
+
compile_expr(tokens, cur_node, true)
|
221
228
|
else
|
222
229
|
child_node = "#{cur_node}.children[#{index}]"
|
223
|
-
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
|
-
def compile_ellipsis(tokens, cur_node, terms, index)
|
228
|
-
if (term = compile_seq_tail(tokens, "#{cur_node}.children.last"))
|
229
|
-
terms << "(#{cur_node}.children.size > #{index})"
|
230
|
-
terms << term
|
231
|
-
elsif index > 0
|
232
|
-
terms << "(#{cur_node}.children.size >= #{index})"
|
230
|
+
compile_expr(tokens, child_node, false)
|
233
231
|
end
|
234
|
-
terms
|
235
232
|
end
|
236
233
|
|
237
|
-
def
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
terms << "(#{cur_node}.children
|
245
|
-
terms << "(#{capture} = #{cur_node}.children[#{index}..-1])"
|
234
|
+
def compile_ellipsis(tokens, cur_node, terms, index, capture = nil)
|
235
|
+
tokens.shift # drop ellipsis
|
236
|
+
tail = compile_seq_tail(tokens, cur_node)
|
237
|
+
terms << "(#{cur_node}.children.size >= #{index + tail.size})"
|
238
|
+
terms.concat tail
|
239
|
+
if capture
|
240
|
+
range = index..-tail.size - 1
|
241
|
+
terms << "(#{capture} = #{cur_node}.children[#{range}])"
|
246
242
|
end
|
247
243
|
terms
|
248
244
|
end
|
249
245
|
|
250
246
|
def compile_seq_tail(tokens, cur_node)
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
else
|
256
|
-
expr = compile_expr(tokens, cur_node, false)
|
257
|
-
fail_due_to('missing )') unless tokens.shift == ')'
|
258
|
-
expr
|
247
|
+
child_node = "#{cur_node}.children[%<revindex>i]"
|
248
|
+
terms = []
|
249
|
+
until tokens.first == ')'
|
250
|
+
terms << compile_expr(tokens, child_node, false)
|
259
251
|
end
|
252
|
+
tokens.shift # drop ')'
|
253
|
+
# E.g. for terms.size == 3, we want to replace the three [%<revindex>i]
|
254
|
+
# with [-3], [-2] and [-1]
|
255
|
+
terms.map.with_index { |term, i| format term, revindex: i - terms.size }
|
260
256
|
end
|
261
257
|
|
262
258
|
def compile_union(tokens, cur_node, seq_head)
|
@@ -444,12 +440,6 @@ module RuboCop
|
|
444
440
|
params.empty? ? '' : ",#{params}"
|
445
441
|
end
|
446
442
|
|
447
|
-
def emit_guard_clause
|
448
|
-
<<-RUBY
|
449
|
-
return unless node.is_a?(RuboCop::AST::Node)
|
450
|
-
RUBY
|
451
|
-
end
|
452
|
-
|
453
443
|
def emit_method_code
|
454
444
|
<<-RUBY
|
455
445
|
return unless #{@match_code}
|
@@ -475,6 +465,10 @@ module RuboCop
|
|
475
465
|
def next_temp_value
|
476
466
|
@temps += 1
|
477
467
|
end
|
468
|
+
|
469
|
+
def self.tokens(pattern)
|
470
|
+
pattern.scan(TOKEN).reject { |token| token =~ /\A#{SEPARATORS}\Z/ }
|
471
|
+
end
|
478
472
|
end
|
479
473
|
private_constant :Compiler
|
480
474
|
|
@@ -491,7 +485,6 @@ module RuboCop
|
|
491
485
|
compiler = Compiler.new(pattern_str, 'node')
|
492
486
|
src = "def #{method_name}(node = self" \
|
493
487
|
"#{compiler.emit_trailing_params});" \
|
494
|
-
"#{compiler.emit_guard_clause}" \
|
495
488
|
"#{compiler.emit_method_code};end"
|
496
489
|
|
497
490
|
location = caller_locations(1, 1).first
|
@@ -552,11 +545,39 @@ module RuboCop
|
|
552
545
|
end
|
553
546
|
end
|
554
547
|
|
548
|
+
attr_reader :pattern
|
549
|
+
|
555
550
|
def initialize(str)
|
551
|
+
@pattern = str
|
556
552
|
compiler = Compiler.new(str)
|
557
553
|
src = "def match(node0#{compiler.emit_trailing_params});" \
|
558
554
|
"#{compiler.emit_method_code}end"
|
559
|
-
instance_eval(src)
|
555
|
+
instance_eval(src, __FILE__, __LINE__ + 1)
|
556
|
+
end
|
557
|
+
|
558
|
+
def match(*args)
|
559
|
+
# If we're here, it's because the singleton method has not been defined,
|
560
|
+
# either because we've been dup'ed or serialized through YAML
|
561
|
+
initialize(pattern)
|
562
|
+
match(*args)
|
563
|
+
end
|
564
|
+
|
565
|
+
def marshal_load(pattern)
|
566
|
+
initialize pattern
|
567
|
+
end
|
568
|
+
|
569
|
+
def marshal_dump
|
570
|
+
pattern
|
571
|
+
end
|
572
|
+
|
573
|
+
def ==(other)
|
574
|
+
other.is_a?(NodePattern) &&
|
575
|
+
Compiler.tokens(other.pattern) == Compiler.tokens(pattern)
|
576
|
+
end
|
577
|
+
alias eql? ==
|
578
|
+
|
579
|
+
def to_s
|
580
|
+
"#<#{self.class} #{pattern}>"
|
560
581
|
end
|
561
582
|
end
|
562
583
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'digest/
|
3
|
+
require 'digest/sha1'
|
4
4
|
|
5
5
|
module RuboCop
|
6
6
|
# ProcessedSource contains objects which are generated by Parser
|
@@ -78,7 +78,7 @@ module RuboCop
|
|
78
78
|
|
79
79
|
# Raw source checksum for tracking infinite loops.
|
80
80
|
def checksum
|
81
|
-
Digest::
|
81
|
+
Digest::SHA1.hexdigest(@raw_source)
|
82
82
|
end
|
83
83
|
|
84
84
|
def each_comment
|
data/lib/rubocop/result_cache.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'digest/
|
3
|
+
require 'digest/sha1'
|
4
4
|
require 'find'
|
5
5
|
require 'etc'
|
6
6
|
|
@@ -141,7 +141,7 @@ module RuboCop
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def file_checksum(file, config_store)
|
144
|
-
digester = Digest::
|
144
|
+
digester = Digest::SHA1.new
|
145
145
|
mode = File.stat(file).mode
|
146
146
|
digester.update(
|
147
147
|
"#{file}#{mode}#{config_store.for(file).signature}"
|
@@ -173,7 +173,7 @@ module RuboCop
|
|
173
173
|
.select { |path| File.file?(path) }
|
174
174
|
.sort
|
175
175
|
.map { |path| IO.read(path, encoding: Encoding::UTF_8) }
|
176
|
-
Digest::
|
176
|
+
Digest::SHA1.hexdigest(sources.join)
|
177
177
|
end
|
178
178
|
end
|
179
179
|
|
@@ -185,7 +185,7 @@ module RuboCop
|
|
185
185
|
options = options.to_s.gsub(/[^a-z]+/i, '_')
|
186
186
|
# We must avoid making file names too long for some filesystems to handle
|
187
187
|
# If they are short, we can leave them human-readable
|
188
|
-
options.length <= 32 ? options : Digest::
|
188
|
+
options.length <= 32 ? options : Digest::SHA1.hexdigest(options)
|
189
189
|
end
|
190
190
|
end
|
191
191
|
end
|
@@ -50,12 +50,17 @@ module CopHelper
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def autocorrect_source_with_loop(source, file = nil)
|
53
|
+
cnt = 0
|
53
54
|
loop do
|
54
55
|
cop.instance_variable_set(:@corrections, [])
|
55
56
|
new_source = autocorrect_source(source, file)
|
56
57
|
return new_source if new_source == source
|
57
58
|
|
58
59
|
source = new_source
|
60
|
+
cnt += 1
|
61
|
+
if cnt > RuboCop::Runner::MAX_ITERATIONS
|
62
|
+
raise RuboCop::Runner::InfiniteCorrectionLoop.new(file, [])
|
63
|
+
end
|
59
64
|
end
|
60
65
|
end
|
61
66
|
|
@@ -64,11 +64,11 @@ module RuboCop
|
|
64
64
|
# @example `expect_offense` and `expect_no_corrections`
|
65
65
|
#
|
66
66
|
# expect_offense(<<-RUBY.strip_indent)
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
67
|
+
# a do
|
68
|
+
# b
|
69
|
+
# end.c
|
70
|
+
# ^^^^^ Avoid chaining a method call on a do...end block.
|
71
|
+
# RUBY
|
72
72
|
#
|
73
73
|
# expect_no_corrections
|
74
74
|
module ExpectOffense
|
data/lib/rubocop/runner.rb
CHANGED
@@ -30,15 +30,6 @@ module RuboCop
|
|
30
30
|
@aborting = false
|
31
31
|
end
|
32
32
|
|
33
|
-
def trap_interrupt
|
34
|
-
Signal.trap('INT') do
|
35
|
-
exit!(1) if aborting?
|
36
|
-
self.aborting = true
|
37
|
-
warn ''
|
38
|
-
warn 'Exiting... Interrupt again to exit immediately.'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
33
|
def run(paths)
|
43
34
|
target_files = find_target_files(paths)
|
44
35
|
if @options[:list_target_files]
|
@@ -47,6 +38,12 @@ module RuboCop
|
|
47
38
|
warm_cache(target_files) if @options[:parallel]
|
48
39
|
inspect_files(target_files)
|
49
40
|
end
|
41
|
+
rescue Interrupt
|
42
|
+
self.aborting = true
|
43
|
+
warn ''
|
44
|
+
warn 'Exiting...'
|
45
|
+
|
46
|
+
false
|
50
47
|
end
|
51
48
|
|
52
49
|
def aborting?
|
@@ -81,11 +78,7 @@ module RuboCop
|
|
81
78
|
end
|
82
79
|
|
83
80
|
def each_inspected_file(files)
|
84
|
-
trap_interrupt
|
85
|
-
|
86
81
|
files.reduce(true) do |all_passed, file|
|
87
|
-
break false if aborting?
|
88
|
-
|
89
82
|
offenses = process_file(file)
|
90
83
|
yield file
|
91
84
|
|
data/lib/rubocop/version.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module RuboCop
|
4
4
|
# This module holds the RuboCop version information.
|
5
5
|
module Version
|
6
|
-
STRING = '0.
|
6
|
+
STRING = '0.66.0'.freeze
|
7
7
|
|
8
8
|
MSG = '%<version>s (using Parser %<parser_version>s, running on ' \
|
9
9
|
'%<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'.freeze
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.66.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-03-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jaro_winkler
|
@@ -60,20 +60,6 @@ dependencies:
|
|
60
60
|
- - "!="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 2.5.1.1
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: powerpack
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0.1'
|
70
|
-
type: :runtime
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - "~>"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0.1'
|
77
63
|
- !ruby/object:Gem::Dependency
|
78
64
|
name: psych
|
79
65
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,16 +112,22 @@ dependencies:
|
|
126
112
|
name: unicode-display_width
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
|
-
- - "
|
115
|
+
- - ">="
|
130
116
|
- !ruby/object:Gem::Version
|
131
117
|
version: 1.4.0
|
118
|
+
- - "<"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '1.6'
|
132
121
|
type: :runtime
|
133
122
|
prerelease: false
|
134
123
|
version_requirements: !ruby/object:Gem::Requirement
|
135
124
|
requirements:
|
136
|
-
- - "
|
125
|
+
- - ">="
|
137
126
|
- !ruby/object:Gem::Version
|
138
127
|
version: 1.4.0
|
128
|
+
- - "<"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '1.6'
|
139
131
|
- !ruby/object:Gem::Dependency
|
140
132
|
name: bundler
|
141
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -412,12 +404,14 @@ files:
|
|
412
404
|
- lib/rubocop/cop/lint/return_in_void_context.rb
|
413
405
|
- lib/rubocop/cop/lint/safe_navigation_chain.rb
|
414
406
|
- lib/rubocop/cop/lint/safe_navigation_consistency.rb
|
407
|
+
- lib/rubocop/cop/lint/safe_navigation_with_empty.rb
|
415
408
|
- lib/rubocop/cop/lint/script_permission.rb
|
416
409
|
- lib/rubocop/cop/lint/shadowed_argument.rb
|
417
410
|
- lib/rubocop/cop/lint/shadowed_exception.rb
|
418
411
|
- lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
|
419
412
|
- lib/rubocop/cop/lint/string_conversion_in_interpolation.rb
|
420
413
|
- lib/rubocop/cop/lint/syntax.rb
|
414
|
+
- lib/rubocop/cop/lint/to_json.rb
|
421
415
|
- lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
|
422
416
|
- lib/rubocop/cop/lint/unified_integer.rb
|
423
417
|
- lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb
|
@@ -633,6 +627,7 @@ files:
|
|
633
627
|
- lib/rubocop/cop/style/comment_annotation.rb
|
634
628
|
- lib/rubocop/cop/style/commented_keyword.rb
|
635
629
|
- lib/rubocop/cop/style/conditional_assignment.rb
|
630
|
+
- lib/rubocop/cop/style/constant_visibility.rb
|
636
631
|
- lib/rubocop/cop/style/copyright.rb
|
637
632
|
- lib/rubocop/cop/style/date_time.rb
|
638
633
|
- lib/rubocop/cop/style/def_with_parentheses.rb
|
@@ -779,6 +774,7 @@ files:
|
|
779
774
|
- lib/rubocop/cop/variable_force/scope.rb
|
780
775
|
- lib/rubocop/cop/variable_force/variable.rb
|
781
776
|
- lib/rubocop/cop/variable_force/variable_table.rb
|
777
|
+
- lib/rubocop/core_ext/string.rb
|
782
778
|
- lib/rubocop/error.rb
|
783
779
|
- lib/rubocop/file_finder.rb
|
784
780
|
- lib/rubocop/formatter/auto_gen_config_formatter.rb
|
@@ -848,7 +844,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
848
844
|
- !ruby/object:Gem::Version
|
849
845
|
version: '0'
|
850
846
|
requirements: []
|
851
|
-
rubygems_version: 3.0.
|
847
|
+
rubygems_version: 3.0.3
|
852
848
|
signing_key:
|
853
849
|
specification_version: 4
|
854
850
|
summary: Automatic Ruby code style checking tool.
|