rubocop 1.22.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/config/default.yml +88 -8
- data/lib/rubocop/cli/command/auto_genenerate_config.rb +1 -1
- data/lib/rubocop/cli/command/init_dotfile.rb +1 -1
- data/lib/rubocop/cli/command/show_docs_url.rb +48 -0
- data/lib/rubocop/cli/command/suggest_extensions.rb +1 -1
- data/lib/rubocop/cli.rb +1 -0
- data/lib/rubocop/config_loader_resolver.rb +1 -1
- data/lib/rubocop/cop/bundler/duplicated_gem.rb +1 -1
- data/lib/rubocop/cop/bundler/gem_comment.rb +3 -3
- data/lib/rubocop/cop/correctors/each_to_for_corrector.rb +1 -1
- data/lib/rubocop/cop/correctors/if_then_corrector.rb +55 -0
- data/lib/rubocop/cop/documentation.rb +19 -2
- data/lib/rubocop/cop/gemspec/date_assignment.rb +2 -10
- data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +1 -10
- data/lib/rubocop/cop/gemspec/require_mfa.rb +146 -0
- data/lib/rubocop/cop/gemspec/required_ruby_version.rb +30 -23
- data/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +3 -10
- data/lib/rubocop/cop/generator.rb +1 -1
- data/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb +60 -0
- data/lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb +46 -0
- data/lib/rubocop/cop/internal_affairs/undefined_config.rb +3 -1
- data/lib/rubocop/cop/internal_affairs.rb +2 -0
- data/lib/rubocop/cop/layout/assignment_indentation.rb +1 -1
- data/lib/rubocop/cop/layout/block_alignment.rb +3 -3
- data/lib/rubocop/cop/layout/comment_indentation.rb +31 -2
- data/lib/rubocop/cop/layout/dot_position.rb +13 -7
- data/lib/rubocop/cop/layout/empty_comment.rb +1 -1
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +22 -1
- data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +7 -4
- data/lib/rubocop/cop/layout/end_alignment.rb +1 -2
- data/lib/rubocop/cop/layout/first_array_element_indentation.rb +1 -1
- data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +1 -1
- data/lib/rubocop/cop/layout/first_parameter_indentation.rb +1 -1
- data/lib/rubocop/cop/layout/hash_alignment.rb +2 -2
- data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +1 -1
- data/lib/rubocop/cop/layout/indentation_width.rb +1 -1
- data/lib/rubocop/cop/layout/line_length.rb +1 -1
- data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +1 -1
- data/lib/rubocop/cop/layout/multiline_block_layout.rb +2 -2
- data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +1 -1
- data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +1 -1
- data/lib/rubocop/cop/layout/space_after_colon.rb +1 -1
- data/lib/rubocop/cop/layout/space_before_comment.rb +1 -1
- data/lib/rubocop/cop/layout/space_before_first_arg.rb +4 -0
- data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +11 -5
- data/lib/rubocop/cop/layout/space_inside_parens.rb +0 -4
- data/lib/rubocop/cop/lint/ambiguous_range.rb +3 -3
- data/lib/rubocop/cop/lint/constant_definition_in_block.rb +1 -1
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +16 -4
- data/lib/rubocop/cop/lint/deprecated_constants.rb +3 -2
- data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +6 -0
- data/lib/rubocop/cop/lint/else_layout.rb +1 -1
- data/lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb +4 -0
- data/lib/rubocop/cop/lint/number_conversion.rb +5 -2
- data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +117 -0
- data/lib/rubocop/cop/metrics/block_length.rb +1 -0
- data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +0 -9
- data/lib/rubocop/cop/metrics/method_length.rb +1 -0
- data/lib/rubocop/cop/metrics/module_length.rb +1 -1
- data/lib/rubocop/cop/metrics/parameter_lists.rb +5 -2
- data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +1 -1
- data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +1 -2
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +5 -0
- data/lib/rubocop/cop/mixin/gemspec_help.rb +30 -0
- data/lib/rubocop/cop/mixin/hash_alignment_styles.rb +4 -3
- data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +56 -0
- data/lib/rubocop/cop/mixin/hash_transform_method.rb +3 -3
- data/lib/rubocop/cop/mixin/multiline_element_indentation.rb +1 -1
- data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +1 -1
- data/lib/rubocop/cop/mixin/space_after_punctuation.rb +1 -1
- data/lib/rubocop/cop/mixin/space_before_punctuation.rb +1 -1
- data/lib/rubocop/cop/mixin/statement_modifier.rb +1 -1
- data/lib/rubocop/cop/mixin/string_literals_help.rb +1 -5
- data/lib/rubocop/cop/mixin/trailing_body.rb +1 -1
- data/lib/rubocop/cop/naming/block_forwarding.rb +102 -0
- data/lib/rubocop/cop/naming/file_name.rb +37 -4
- data/lib/rubocop/cop/security/json_load.rb +1 -1
- data/lib/rubocop/cop/security/open.rb +11 -1
- data/lib/rubocop/cop/style/character_literal.rb +8 -1
- data/lib/rubocop/cop/style/collection_compact.rb +31 -13
- data/lib/rubocop/cop/style/combinable_loops.rb +2 -2
- data/lib/rubocop/cop/style/commented_keyword.rb +5 -3
- data/lib/rubocop/cop/style/documentation.rb +1 -1
- data/lib/rubocop/cop/style/empty_case_condition.rb +10 -0
- data/lib/rubocop/cop/style/empty_method.rb +1 -1
- data/lib/rubocop/cop/style/file_read.rb +112 -0
- data/lib/rubocop/cop/style/file_write.rb +98 -0
- data/lib/rubocop/cop/style/format_string_token.rb +2 -1
- data/lib/rubocop/cop/style/hash_conversion.rb +2 -1
- data/lib/rubocop/cop/style/hash_syntax.rb +22 -0
- data/lib/rubocop/cop/style/if_inside_else.rb +15 -0
- data/lib/rubocop/cop/style/line_end_concatenation.rb +1 -1
- data/lib/rubocop/cop/style/map_to_hash.rb +68 -0
- data/lib/rubocop/cop/style/multiline_in_pattern_then.rb +1 -1
- data/lib/rubocop/cop/style/multiline_when_then.rb +1 -1
- data/lib/rubocop/cop/style/numeric_literals.rb +10 -1
- data/lib/rubocop/cop/style/one_line_conditional.rb +18 -39
- data/lib/rubocop/cop/style/open_struct_use.rb +69 -0
- data/lib/rubocop/cop/style/parentheses_around_condition.rb +12 -2
- data/lib/rubocop/cop/style/quoted_symbols.rb +11 -1
- data/lib/rubocop/cop/style/redundant_interpolation.rb +17 -3
- data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +5 -1
- data/lib/rubocop/cop/style/redundant_self.rb +1 -1
- data/lib/rubocop/cop/style/safe_navigation.rb +1 -5
- data/lib/rubocop/cop/style/select_by_regexp.rb +9 -3
- data/lib/rubocop/cop/style/single_line_block_params.rb +2 -2
- data/lib/rubocop/cop/style/sole_nested_conditional.rb +3 -1
- data/lib/rubocop/cop/team.rb +1 -1
- data/lib/rubocop/cop/util.rb +11 -1
- data/lib/rubocop/formatter/html_formatter.rb +5 -2
- data/lib/rubocop/formatter/json_formatter.rb +4 -1
- data/lib/rubocop/options.rb +6 -1
- data/lib/rubocop/remote_config.rb +2 -4
- data/lib/rubocop/result_cache.rb +1 -1
- data/lib/rubocop/rspec/parallel_formatter.rb +90 -0
- data/lib/rubocop/rspec/support.rb +1 -0
- data/lib/rubocop/target_finder.rb +1 -1
- data/lib/rubocop/version.rb +1 -1
- data/lib/rubocop/yaml_duplication_checker.rb +1 -1
- data/lib/rubocop.rb +11 -0
- metadata +24 -9
data/lib/rubocop/options.rb
CHANGED
@@ -15,7 +15,7 @@ module RuboCop
|
|
15
15
|
'root of the project. RuboCop will use this path to determine which ' \
|
16
16
|
'cops are enabled (via eg. Include/Exclude), and so that certain cops ' \
|
17
17
|
'like Naming/FileName can be checked.'
|
18
|
-
EXITING_OPTIONS = %i[version verbose_version show_cops].freeze
|
18
|
+
EXITING_OPTIONS = %i[version verbose_version show_cops show_docs_url].freeze
|
19
19
|
DEFAULT_MAXIMUM_EXCLUSION_ITEMS = 15
|
20
20
|
|
21
21
|
def initialize
|
@@ -188,6 +188,9 @@ module RuboCop
|
|
188
188
|
option(opts, '--show-cops [COP1,COP2,...]') do |list|
|
189
189
|
@options[:show_cops] = list.nil? ? [] : list.split(',')
|
190
190
|
end
|
191
|
+
option(opts, '--show-docs-url [COP1,COP2,...]') do |list|
|
192
|
+
@options[:show_docs_url] = list.nil? ? [] : list.split(',')
|
193
|
+
end
|
191
194
|
end
|
192
195
|
end
|
193
196
|
|
@@ -475,6 +478,8 @@ module RuboCop
|
|
475
478
|
show_cops: ['Shows the given cops, or all cops by',
|
476
479
|
'default, and their configurations for the',
|
477
480
|
'current directory.'],
|
481
|
+
show_docs_url: ['Display url to documentation for the given',
|
482
|
+
'cops, or base url by default.'],
|
478
483
|
fail_fast: ['Inspect files in order of modification',
|
479
484
|
'time and stop after the first file',
|
480
485
|
'containing offenses.'],
|
@@ -23,9 +23,7 @@ module RuboCop
|
|
23
23
|
next if response.is_a?(Net::HTTPNotModified)
|
24
24
|
next if response.is_a?(SocketError)
|
25
25
|
|
26
|
-
File.
|
27
|
-
io.write response.body
|
28
|
-
end
|
26
|
+
File.write(cache_path, response.body)
|
29
27
|
end
|
30
28
|
|
31
29
|
cache_path
|
@@ -33,7 +31,7 @@ module RuboCop
|
|
33
31
|
|
34
32
|
def inherit_from_remote(file, path)
|
35
33
|
new_uri = @uri.dup
|
36
|
-
new_uri.path.gsub!(%r{/[^/]*$}, "/#{file}")
|
34
|
+
new_uri.path.gsub!(%r{/[^/]*$}, "/#{file.delete_prefix('./')}")
|
37
35
|
RemoteConfig.new(new_uri.to_s, File.dirname(path))
|
38
36
|
end
|
39
37
|
|
data/lib/rubocop/result_cache.rb
CHANGED
@@ -179,7 +179,7 @@ module RuboCop
|
|
179
179
|
.select { |path| File.file?(path) }
|
180
180
|
.sort!
|
181
181
|
.each do |path|
|
182
|
-
content = File.
|
182
|
+
content = File.binread(path)
|
183
183
|
digest << Zlib.crc32(content).to_s # mtime not reliable
|
184
184
|
end
|
185
185
|
digest << RuboCop::Version::STRING << RuboCop::AST::Version::STRING
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec::Support.require_rspec_core 'formatters/base_text_formatter'
|
4
|
+
RSpec::Support.require_rspec_core 'formatters/console_codes'
|
5
|
+
|
6
|
+
module RuboCop
|
7
|
+
module RSpec
|
8
|
+
# RSpec formatter for use with running `rake spec` in parallel. This formatter
|
9
|
+
# removes much of the noise from RSpec so that only the important information
|
10
|
+
# will be surfaced by test-queue.
|
11
|
+
# It also adds metadata to the output in order to more easily find the text
|
12
|
+
# needed for outputting after the parallel run completes.
|
13
|
+
class ParallelFormatter < ::RSpec::Core::Formatters::BaseTextFormatter
|
14
|
+
::RSpec::Core::Formatters.register self, :dump_pending, :dump_failures, :dump_summary
|
15
|
+
|
16
|
+
# Don't show pending tests
|
17
|
+
def dump_pending(*); end
|
18
|
+
|
19
|
+
# The BEGIN/END comments are used by `spec_runner.rake` to determine what
|
20
|
+
# output goes where in the final parallelized output, and should not be
|
21
|
+
# removed!
|
22
|
+
def dump_failures(notification)
|
23
|
+
return if notification.failure_notifications.empty?
|
24
|
+
|
25
|
+
output.puts '# FAILURES BEGIN'
|
26
|
+
notification.failure_notifications.each do |failure|
|
27
|
+
output.puts failure.fully_formatted('*', colorizer)
|
28
|
+
end
|
29
|
+
output.puts
|
30
|
+
output.puts '# FAILURES END'
|
31
|
+
end
|
32
|
+
|
33
|
+
def dump_summary(summary)
|
34
|
+
output_summary(summary)
|
35
|
+
output_rerun_commands(summary)
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def colorizer
|
41
|
+
@colorizer ||= ::RSpec::Core::Formatters::ConsoleCodes
|
42
|
+
end
|
43
|
+
|
44
|
+
# The BEGIN/END comments are used by `spec_runner.rake` to determine what
|
45
|
+
# output goes where in the final parallelized output, and should not be
|
46
|
+
# removed!
|
47
|
+
def output_summary(summary)
|
48
|
+
output.puts '# SUMMARY BEGIN'
|
49
|
+
output.puts colorize_summary(summary)
|
50
|
+
output.puts '# SUMMARY END'
|
51
|
+
end
|
52
|
+
|
53
|
+
def colorize_summary(summary)
|
54
|
+
totals = totals(summary)
|
55
|
+
|
56
|
+
if summary.failure_count.positive? || summary.errors_outside_of_examples_count.positive?
|
57
|
+
colorizer.wrap(totals, ::RSpec.configuration.failure_color)
|
58
|
+
else
|
59
|
+
colorizer.wrap(totals, ::RSpec.configuration.success_color)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# The BEGIN/END comments are used by `spec_runner.rake` to determine what
|
64
|
+
# output goes where in the final parallelized output, and should not be
|
65
|
+
# removed!
|
66
|
+
def output_rerun_commands(summary)
|
67
|
+
output.puts '# RERUN BEGIN'
|
68
|
+
output.puts summary.colorized_rerun_commands.lines[3..-1].join
|
69
|
+
output.puts '# RERUN END'
|
70
|
+
end
|
71
|
+
|
72
|
+
def totals(summary)
|
73
|
+
output = pluralize(summary.example_count, 'example')
|
74
|
+
output += ", #{summary.pending_count} pending" if summary.pending_count.positive?
|
75
|
+
output += ", #{pluralize(summary.failure_count, 'failure')}"
|
76
|
+
|
77
|
+
if summary.errors_outside_of_examples_count.positive?
|
78
|
+
error_count = pluralize(summary.errors_outside_of_examples_count, 'error')
|
79
|
+
output += ", #{error_count} occurred outside of examples"
|
80
|
+
end
|
81
|
+
|
82
|
+
output
|
83
|
+
end
|
84
|
+
|
85
|
+
def pluralize(*args)
|
86
|
+
::RSpec::Core::Formatters::Helpers.pluralize(*args)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -95,7 +95,7 @@ module RuboCop
|
|
95
95
|
|
96
96
|
def wanted_dir_patterns(base_dir, exclude_pattern, flags)
|
97
97
|
base_dir = base_dir.gsub('/{}/', '/\{}/')
|
98
|
-
dirs = Dir.glob(File.join(base_dir.gsub('/**/', '/\**/'), '*/'), flags)
|
98
|
+
dirs = Dir.glob(File.join(base_dir.gsub('/*/', '/\*/').gsub('/**/', '/\**/'), '*/'), flags)
|
99
99
|
.reject do |dir|
|
100
100
|
next true if dir.end_with?('/./', '/../')
|
101
101
|
next true if File.fnmatch?(exclude_pattern, dir, flags)
|
data/lib/rubocop/version.rb
CHANGED
@@ -23,7 +23,7 @@ module RuboCop
|
|
23
23
|
when Psych::Nodes::Mapping
|
24
24
|
tree.children.each_slice(2).with_object([]) do |(key, value), keys|
|
25
25
|
exist = keys.find { |key2| key2.value == key.value }
|
26
|
-
|
26
|
+
yield(exist, key) if exist
|
27
27
|
keys << key
|
28
28
|
traverse(value, &on_duplicated)
|
29
29
|
end
|
data/lib/rubocop.rb
CHANGED
@@ -83,6 +83,7 @@ require_relative 'rubocop/cop/mixin/enforce_superclass'
|
|
83
83
|
require_relative 'rubocop/cop/mixin/first_element_line_break'
|
84
84
|
require_relative 'rubocop/cop/mixin/frozen_string_literal'
|
85
85
|
require_relative 'rubocop/cop/mixin/gem_declaration'
|
86
|
+
require_relative 'rubocop/cop/mixin/gemspec_help'
|
86
87
|
require_relative 'rubocop/cop/mixin/hash_alignment_styles'
|
87
88
|
require_relative 'rubocop/cop/mixin/hash_transform_method'
|
88
89
|
require_relative 'rubocop/cop/mixin/ignored_pattern'
|
@@ -93,6 +94,7 @@ require_relative 'rubocop/cop/mixin/line_length_help'
|
|
93
94
|
require_relative 'rubocop/cop/mixin/match_range'
|
94
95
|
require_relative 'rubocop/cop/metrics/utils/repeated_csend_discount'
|
95
96
|
require_relative 'rubocop/cop/metrics/utils/repeated_attribute_discount'
|
97
|
+
require_relative 'rubocop/cop/mixin/hash_shorthand_syntax'
|
96
98
|
require_relative 'rubocop/cop/mixin/method_complexity'
|
97
99
|
require_relative 'rubocop/cop/mixin/method_preference'
|
98
100
|
require_relative 'rubocop/cop/mixin/min_body_length'
|
@@ -138,6 +140,7 @@ require_relative 'rubocop/cop/correctors/condition_corrector'
|
|
138
140
|
require_relative 'rubocop/cop/correctors/each_to_for_corrector'
|
139
141
|
require_relative 'rubocop/cop/correctors/empty_line_corrector'
|
140
142
|
require_relative 'rubocop/cop/correctors/for_to_each_corrector'
|
143
|
+
require_relative 'rubocop/cop/correctors/if_then_corrector'
|
141
144
|
require_relative 'rubocop/cop/correctors/lambda_literal_to_method_corrector'
|
142
145
|
require_relative 'rubocop/cop/correctors/line_break_corrector'
|
143
146
|
require_relative 'rubocop/cop/correctors/multiline_literal_brace_corrector'
|
@@ -160,6 +163,7 @@ require_relative 'rubocop/cop/bundler/ordered_gems'
|
|
160
163
|
require_relative 'rubocop/cop/gemspec/date_assignment'
|
161
164
|
require_relative 'rubocop/cop/gemspec/duplicated_assignment'
|
162
165
|
require_relative 'rubocop/cop/gemspec/ordered_dependencies'
|
166
|
+
require_relative 'rubocop/cop/gemspec/require_mfa'
|
163
167
|
require_relative 'rubocop/cop/gemspec/required_ruby_version'
|
164
168
|
require_relative 'rubocop/cop/gemspec/ruby_version_globals_usage'
|
165
169
|
|
@@ -382,6 +386,7 @@ require_relative 'rubocop/cop/lint/useless_access_modifier'
|
|
382
386
|
require_relative 'rubocop/cop/lint/useless_assignment'
|
383
387
|
require_relative 'rubocop/cop/lint/useless_else_without_rescue'
|
384
388
|
require_relative 'rubocop/cop/lint/useless_method_definition'
|
389
|
+
require_relative 'rubocop/cop/lint/useless_ruby2_keywords'
|
385
390
|
require_relative 'rubocop/cop/lint/useless_setter_call'
|
386
391
|
require_relative 'rubocop/cop/lint/useless_times'
|
387
392
|
require_relative 'rubocop/cop/lint/void'
|
@@ -402,6 +407,7 @@ require_relative 'rubocop/cop/metrics/perceived_complexity'
|
|
402
407
|
|
403
408
|
require_relative 'rubocop/cop/naming/accessor_method_name'
|
404
409
|
require_relative 'rubocop/cop/naming/ascii_identifiers'
|
410
|
+
require_relative 'rubocop/cop/naming/block_forwarding'
|
405
411
|
require_relative 'rubocop/cop/naming/block_parameter_name'
|
406
412
|
require_relative 'rubocop/cop/naming/class_and_module_camel_case'
|
407
413
|
require_relative 'rubocop/cop/naming/constant_name'
|
@@ -478,6 +484,8 @@ require_relative 'rubocop/cop/style/even_odd'
|
|
478
484
|
require_relative 'rubocop/cop/style/expand_path_arguments'
|
479
485
|
require_relative 'rubocop/cop/style/explicit_block_argument'
|
480
486
|
require_relative 'rubocop/cop/style/exponential_notation'
|
487
|
+
require_relative 'rubocop/cop/style/file_read'
|
488
|
+
require_relative 'rubocop/cop/style/file_write'
|
481
489
|
require_relative 'rubocop/cop/style/float_division'
|
482
490
|
require_relative 'rubocop/cop/style/for'
|
483
491
|
require_relative 'rubocop/cop/style/format_string'
|
@@ -510,10 +518,12 @@ require_relative 'rubocop/cop/style/keyword_parameters_order'
|
|
510
518
|
require_relative 'rubocop/cop/style/lambda'
|
511
519
|
require_relative 'rubocop/cop/style/lambda_call'
|
512
520
|
require_relative 'rubocop/cop/style/line_end_concatenation'
|
521
|
+
require_relative 'rubocop/cop/style/map_to_hash'
|
513
522
|
require_relative 'rubocop/cop/style/method_call_without_args_parentheses'
|
514
523
|
require_relative 'rubocop/cop/style/method_call_with_args_parentheses'
|
515
524
|
require_relative 'rubocop/cop/style/multiline_in_pattern_then'
|
516
525
|
require_relative 'rubocop/cop/style/numbered_parameters'
|
526
|
+
require_relative 'rubocop/cop/style/open_struct_use'
|
517
527
|
require_relative 'rubocop/cop/style/redundant_assignment'
|
518
528
|
require_relative 'rubocop/cop/style/redundant_fetch_block'
|
519
529
|
require_relative 'rubocop/cop/style/redundant_file_extension_in_require'
|
@@ -701,6 +711,7 @@ require_relative 'rubocop/cli/command/auto_genenerate_config'
|
|
701
711
|
require_relative 'rubocop/cli/command/execute_runner'
|
702
712
|
require_relative 'rubocop/cli/command/init_dotfile'
|
703
713
|
require_relative 'rubocop/cli/command/show_cops'
|
714
|
+
require_relative 'rubocop/cli/command/show_docs_url'
|
704
715
|
require_relative 'rubocop/cli/command/suggest_extensions'
|
705
716
|
require_relative 'rubocop/cli/command/version'
|
706
717
|
require_relative 'rubocop/config_regeneration'
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
- Jonas Arvidsson
|
9
9
|
- Yuji Nakayama
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parallel
|
@@ -100,7 +100,7 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.15.0
|
104
104
|
- - "<"
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '2.0'
|
@@ -110,7 +110,7 @@ dependencies:
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: 1.
|
113
|
+
version: 1.15.0
|
114
114
|
- - "<"
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '2.0'
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/rubocop/cli/command/execute_runner.rb
|
197
197
|
- lib/rubocop/cli/command/init_dotfile.rb
|
198
198
|
- lib/rubocop/cli/command/show_cops.rb
|
199
|
+
- lib/rubocop/cli/command/show_docs_url.rb
|
199
200
|
- lib/rubocop/cli/command/suggest_extensions.rb
|
200
201
|
- lib/rubocop/cli/command/version.rb
|
201
202
|
- lib/rubocop/cli/environment.rb
|
@@ -233,6 +234,7 @@ files:
|
|
233
234
|
- lib/rubocop/cop/correctors/each_to_for_corrector.rb
|
234
235
|
- lib/rubocop/cop/correctors/empty_line_corrector.rb
|
235
236
|
- lib/rubocop/cop/correctors/for_to_each_corrector.rb
|
237
|
+
- lib/rubocop/cop/correctors/if_then_corrector.rb
|
236
238
|
- lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb
|
237
239
|
- lib/rubocop/cop/correctors/line_break_corrector.rb
|
238
240
|
- lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb
|
@@ -250,6 +252,7 @@ files:
|
|
250
252
|
- lib/rubocop/cop/gemspec/date_assignment.rb
|
251
253
|
- lib/rubocop/cop/gemspec/duplicated_assignment.rb
|
252
254
|
- lib/rubocop/cop/gemspec/ordered_dependencies.rb
|
255
|
+
- lib/rubocop/cop/gemspec/require_mfa.rb
|
253
256
|
- lib/rubocop/cop/gemspec/required_ruby_version.rb
|
254
257
|
- lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb
|
255
258
|
- lib/rubocop/cop/generator.rb
|
@@ -260,6 +263,7 @@ files:
|
|
260
263
|
- lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb
|
261
264
|
- lib/rubocop/cop/internal_affairs/example_description.rb
|
262
265
|
- lib/rubocop/cop/internal_affairs/inherit_deprecated_cop_class.rb
|
266
|
+
- lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb
|
263
267
|
- lib/rubocop/cop/internal_affairs/method_name_equal.rb
|
264
268
|
- lib/rubocop/cop/internal_affairs/node_destructuring.rb
|
265
269
|
- lib/rubocop/cop/internal_affairs/node_matcher_directive.rb
|
@@ -269,6 +273,7 @@ files:
|
|
269
273
|
- lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb
|
270
274
|
- lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
|
271
275
|
- lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
|
276
|
+
- lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb
|
272
277
|
- lib/rubocop/cop/internal_affairs/style_detected_api_use.rb
|
273
278
|
- lib/rubocop/cop/internal_affairs/undefined_config.rb
|
274
279
|
- lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
|
@@ -492,6 +497,7 @@ files:
|
|
492
497
|
- lib/rubocop/cop/lint/useless_assignment.rb
|
493
498
|
- lib/rubocop/cop/lint/useless_else_without_rescue.rb
|
494
499
|
- lib/rubocop/cop/lint/useless_method_definition.rb
|
500
|
+
- lib/rubocop/cop/lint/useless_ruby2_keywords.rb
|
495
501
|
- lib/rubocop/cop/lint/useless_setter_call.rb
|
496
502
|
- lib/rubocop/cop/lint/useless_times.rb
|
497
503
|
- lib/rubocop/cop/lint/void.rb
|
@@ -537,7 +543,9 @@ files:
|
|
537
543
|
- lib/rubocop/cop/mixin/first_element_line_break.rb
|
538
544
|
- lib/rubocop/cop/mixin/frozen_string_literal.rb
|
539
545
|
- lib/rubocop/cop/mixin/gem_declaration.rb
|
546
|
+
- lib/rubocop/cop/mixin/gemspec_help.rb
|
540
547
|
- lib/rubocop/cop/mixin/hash_alignment_styles.rb
|
548
|
+
- lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
|
541
549
|
- lib/rubocop/cop/mixin/hash_transform_method.rb
|
542
550
|
- lib/rubocop/cop/mixin/heredoc.rb
|
543
551
|
- lib/rubocop/cop/mixin/ignored_methods.rb
|
@@ -583,6 +591,7 @@ files:
|
|
583
591
|
- lib/rubocop/cop/naming/accessor_method_name.rb
|
584
592
|
- lib/rubocop/cop/naming/ascii_identifiers.rb
|
585
593
|
- lib/rubocop/cop/naming/binary_operator_parameter_name.rb
|
594
|
+
- lib/rubocop/cop/naming/block_forwarding.rb
|
586
595
|
- lib/rubocop/cop/naming/block_parameter_name.rb
|
587
596
|
- lib/rubocop/cop/naming/class_and_module_camel_case.rb
|
588
597
|
- lib/rubocop/cop/naming/constant_name.rb
|
@@ -667,6 +676,8 @@ files:
|
|
667
676
|
- lib/rubocop/cop/style/expand_path_arguments.rb
|
668
677
|
- lib/rubocop/cop/style/explicit_block_argument.rb
|
669
678
|
- lib/rubocop/cop/style/exponential_notation.rb
|
679
|
+
- lib/rubocop/cop/style/file_read.rb
|
680
|
+
- lib/rubocop/cop/style/file_write.rb
|
670
681
|
- lib/rubocop/cop/style/float_division.rb
|
671
682
|
- lib/rubocop/cop/style/for.rb
|
672
683
|
- lib/rubocop/cop/style/format_string.rb
|
@@ -699,6 +710,7 @@ files:
|
|
699
710
|
- lib/rubocop/cop/style/lambda.rb
|
700
711
|
- lib/rubocop/cop/style/lambda_call.rb
|
701
712
|
- lib/rubocop/cop/style/line_end_concatenation.rb
|
713
|
+
- lib/rubocop/cop/style/map_to_hash.rb
|
702
714
|
- lib/rubocop/cop/style/method_call_with_args_parentheses.rb
|
703
715
|
- lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb
|
704
716
|
- lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb
|
@@ -739,6 +751,7 @@ files:
|
|
739
751
|
- lib/rubocop/cop/style/numeric_literals.rb
|
740
752
|
- lib/rubocop/cop/style/numeric_predicate.rb
|
741
753
|
- lib/rubocop/cop/style/one_line_conditional.rb
|
754
|
+
- lib/rubocop/cop/style/open_struct_use.rb
|
742
755
|
- lib/rubocop/cop/style/option_hash.rb
|
743
756
|
- lib/rubocop/cop/style/optional_arguments.rb
|
744
757
|
- lib/rubocop/cop/style/optional_boolean_parameter.rb
|
@@ -880,6 +893,7 @@ files:
|
|
880
893
|
- lib/rubocop/rspec/cop_helper.rb
|
881
894
|
- lib/rubocop/rspec/expect_offense.rb
|
882
895
|
- lib/rubocop/rspec/host_environment_simulation_helper.rb
|
896
|
+
- lib/rubocop/rspec/parallel_formatter.rb
|
883
897
|
- lib/rubocop/rspec/shared_contexts.rb
|
884
898
|
- lib/rubocop/rspec/support.rb
|
885
899
|
- lib/rubocop/runner.rb
|
@@ -897,9 +911,10 @@ metadata:
|
|
897
911
|
homepage_uri: https://rubocop.org/
|
898
912
|
changelog_uri: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
|
899
913
|
source_code_uri: https://github.com/rubocop/rubocop/
|
900
|
-
documentation_uri: https://docs.rubocop.org/rubocop/1.
|
914
|
+
documentation_uri: https://docs.rubocop.org/rubocop/1.24/
|
901
915
|
bug_tracker_uri: https://github.com/rubocop/rubocop/issues
|
902
|
-
|
916
|
+
rubygems_mfa_required: 'true'
|
917
|
+
post_install_message:
|
903
918
|
rdoc_options: []
|
904
919
|
require_paths:
|
905
920
|
- lib
|
@@ -914,8 +929,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
914
929
|
- !ruby/object:Gem::Version
|
915
930
|
version: '0'
|
916
931
|
requirements: []
|
917
|
-
rubygems_version: 3.2
|
918
|
-
signing_key:
|
932
|
+
rubygems_version: 3.1.2
|
933
|
+
signing_key:
|
919
934
|
specification_version: 4
|
920
935
|
summary: Automatic Ruby code style checking tool.
|
921
936
|
test_files: []
|