rubocop 0.76.0 → 0.80.1
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/LICENSE.txt +1 -1
- data/README.md +4 -4
- data/config/default.yml +325 -283
- data/lib/rubocop.rb +43 -23
- data/lib/rubocop/ast/builder.rb +43 -42
- data/lib/rubocop/ast/node.rb +1 -13
- data/lib/rubocop/ast/node/block_node.rb +2 -0
- data/lib/rubocop/ast/node/def_node.rb +11 -0
- data/lib/rubocop/ast/node/forward_args_node.rb +18 -0
- data/lib/rubocop/ast/node/regexp_node.rb +2 -4
- data/lib/rubocop/ast/traversal.rb +20 -3
- data/lib/rubocop/cli.rb +11 -230
- data/lib/rubocop/cli/command.rb +21 -0
- data/lib/rubocop/cli/command/auto_genenerate_config.rb +105 -0
- data/lib/rubocop/cli/command/base.rb +33 -0
- data/lib/rubocop/cli/command/execute_runner.rb +76 -0
- data/lib/rubocop/cli/command/init_dotfile.rb +45 -0
- data/lib/rubocop/cli/command/show_cops.rb +80 -0
- data/lib/rubocop/cli/command/version.rb +17 -0
- data/lib/rubocop/cli/environment.rb +21 -0
- data/lib/rubocop/comment_config.rb +6 -1
- data/lib/rubocop/config.rb +28 -10
- data/lib/rubocop/config_loader.rb +19 -19
- data/lib/rubocop/config_obsoletion.rb +65 -11
- data/lib/rubocop/config_validator.rb +56 -98
- data/lib/rubocop/cop/autocorrect_logic.rb +7 -4
- data/lib/rubocop/cop/bundler/gem_comment.rb +4 -4
- data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +2 -2
- data/lib/rubocop/cop/cop.rb +21 -0
- data/lib/rubocop/cop/correctors/space_corrector.rb +1 -2
- data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -1
- data/lib/rubocop/cop/generator.rb +3 -4
- data/lib/rubocop/cop/generator/configuration_injector.rb +1 -1
- data/lib/rubocop/cop/internal_affairs.rb +1 -0
- data/lib/rubocop/cop/internal_affairs/method_name_equal.rb +59 -0
- data/lib/rubocop/cop/layout/{align_arguments.rb → argument_alignment.rb} +1 -1
- data/lib/rubocop/cop/layout/{align_array.rb → array_alignment.rb} +1 -1
- data/lib/rubocop/cop/layout/{indent_assignment.rb → assignment_indentation.rb} +1 -1
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +2 -1
- data/lib/rubocop/cop/layout/extra_spacing.rb +1 -1
- data/lib/rubocop/cop/layout/{indent_first_argument.rb → first_argument_indentation.rb} +5 -5
- data/lib/rubocop/cop/layout/{indent_first_array_element.rb → first_array_element_indentation.rb} +4 -4
- data/lib/rubocop/cop/layout/{indent_first_hash_element.rb → first_hash_element_indentation.rb} +3 -3
- data/lib/rubocop/cop/layout/{indent_first_parameter.rb → first_parameter_indentation.rb} +3 -3
- data/lib/rubocop/cop/layout/{align_hash.rb → hash_alignment.rb} +10 -6
- data/lib/rubocop/cop/layout/{indent_heredoc.rb → heredoc_indentation.rb} +5 -5
- data/lib/rubocop/cop/layout/leading_comment_space.rb +33 -2
- data/lib/rubocop/cop/layout/{leading_blank_lines.rb → leading_empty_lines.rb} +1 -1
- data/lib/rubocop/cop/{metrics → layout}/line_length.rb +67 -108
- data/lib/rubocop/cop/layout/multiline_block_layout.rb +14 -5
- data/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +0 -4
- data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +1 -1
- data/lib/rubocop/cop/layout/{align_parameters.rb → parameter_alignment.rb} +1 -1
- data/lib/rubocop/cop/layout/space_around_keyword.rb +12 -0
- data/lib/rubocop/cop/layout/space_around_operators.rb +50 -7
- data/lib/rubocop/cop/layout/space_before_block_braces.rb +17 -0
- data/lib/rubocop/cop/layout/space_before_first_arg.rb +8 -0
- data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +2 -9
- data/lib/rubocop/cop/layout/{trailing_blank_lines.rb → trailing_empty_lines.rb} +1 -1
- data/lib/rubocop/cop/lint/debugger.rb +1 -1
- data/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +1 -1
- data/lib/rubocop/cop/lint/{duplicated_key.rb → duplicate_hash_key.rb} +1 -1
- data/lib/rubocop/cop/lint/each_with_object_argument.rb +1 -1
- data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +1 -1
- data/lib/rubocop/cop/lint/{multiple_compare.rb → multiple_comparison.rb} +1 -1
- data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +89 -0
- data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +3 -3
- data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +13 -8
- data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +1 -1
- data/lib/rubocop/cop/lint/{string_conversion_in_interpolation.rb → redundant_string_coercion.rb} +1 -1
- data/lib/rubocop/cop/lint/redundant_with_index.rb +2 -2
- data/lib/rubocop/cop/lint/redundant_with_object.rb +2 -2
- data/lib/rubocop/cop/lint/{handle_exceptions.rb → suppressed_exception.rb} +1 -1
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +57 -23
- data/lib/rubocop/cop/lint/useless_setter_call.rb +5 -1
- data/lib/rubocop/cop/metrics/method_length.rb +1 -1
- data/lib/rubocop/cop/migration/department_name.rb +30 -2
- data/lib/rubocop/cop/mixin/alignment.rb +1 -1
- data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +4 -0
- data/lib/rubocop/cop/mixin/frozen_string_literal.rb +7 -7
- data/lib/rubocop/cop/mixin/{hash_alignment.rb → hash_alignment_styles.rb} +1 -1
- data/lib/rubocop/cop/mixin/hash_transform_method.rb +171 -0
- data/lib/rubocop/cop/mixin/line_length_help.rb +88 -0
- data/lib/rubocop/cop/mixin/nil_methods.rb +4 -4
- data/lib/rubocop/cop/mixin/rational_literal.rb +18 -0
- data/lib/rubocop/cop/mixin/statement_modifier.rb +2 -2
- data/lib/rubocop/cop/mixin/trailing_comma.rb +8 -12
- data/lib/rubocop/cop/naming/{uncommunicative_block_param_name.rb → block_parameter_name.rb} +3 -3
- data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +5 -5
- data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +1 -1
- data/lib/rubocop/cop/naming/{uncommunicative_method_param_name.rb → method_parameter_name.rb} +4 -4
- data/lib/rubocop/cop/naming/predicate_name.rb +6 -6
- data/lib/rubocop/cop/offense.rb +11 -0
- data/lib/rubocop/cop/registry.rb +7 -2
- data/lib/rubocop/cop/style/alias.rb +1 -1
- data/lib/rubocop/cop/style/array_join.rb +1 -1
- data/lib/rubocop/cop/style/attr.rb +8 -0
- data/lib/rubocop/cop/style/block_delimiters.rb +60 -1
- data/lib/rubocop/cop/style/conditional_assignment.rb +2 -2
- data/lib/rubocop/cop/style/eval_with_location.rb +1 -1
- data/lib/rubocop/cop/style/even_odd.rb +1 -1
- data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +89 -11
- data/lib/rubocop/cop/style/guard_clause.rb +3 -2
- data/lib/rubocop/cop/style/hash_each_methods.rb +87 -0
- data/lib/rubocop/cop/style/hash_transform_keys.rb +79 -0
- data/lib/rubocop/cop/style/hash_transform_values.rb +79 -0
- data/lib/rubocop/cop/style/if_unless_modifier.rb +38 -3
- data/lib/rubocop/cop/style/infinite_loop.rb +1 -1
- data/lib/rubocop/cop/style/inverse_methods.rb +8 -4
- data/lib/rubocop/cop/style/ip_addresses.rb +4 -4
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +7 -205
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +169 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +54 -0
- data/lib/rubocop/cop/style/mixin_grouping.rb +1 -1
- data/lib/rubocop/cop/style/multiline_method_signature.rb +1 -1
- data/lib/rubocop/cop/style/multiline_when_then.rb +5 -1
- data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +7 -7
- data/lib/rubocop/cop/style/next.rb +5 -5
- data/lib/rubocop/cop/style/numeric_literals.rb +7 -3
- data/lib/rubocop/cop/style/numeric_predicate.rb +4 -3
- data/lib/rubocop/cop/style/option_hash.rb +3 -3
- data/lib/rubocop/cop/style/or_assignment.rb +3 -2
- data/lib/rubocop/cop/style/percent_literal_delimiters.rb +7 -7
- data/lib/rubocop/cop/style/redundant_condition.rb +17 -4
- data/lib/rubocop/cop/style/redundant_parentheses.rb +3 -3
- data/lib/rubocop/cop/style/redundant_return.rb +2 -8
- data/lib/rubocop/cop/style/redundant_sort.rb +1 -1
- data/lib/rubocop/cop/style/symbol_array.rb +2 -2
- data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -1
- data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +0 -22
- data/lib/rubocop/cop/style/trailing_underscore_variable.rb +7 -1
- data/lib/rubocop/cop/style/trivial_accessors.rb +5 -5
- data/lib/rubocop/cop/style/while_until_modifier.rb +1 -1
- data/lib/rubocop/cop/style/yoda_condition.rb +16 -1
- data/lib/rubocop/cop/team.rb +5 -0
- data/lib/rubocop/cop/variable_force.rb +4 -1
- data/lib/rubocop/formatter/base_formatter.rb +2 -2
- data/lib/rubocop/formatter/clang_style_formatter.rb +1 -3
- data/lib/rubocop/formatter/formatter_set.rb +1 -0
- data/lib/rubocop/formatter/json_formatter.rb +6 -5
- data/lib/rubocop/formatter/junit_formatter.rb +63 -0
- data/lib/rubocop/formatter/tap_formatter.rb +1 -3
- data/lib/rubocop/node_pattern.rb +97 -11
- data/lib/rubocop/options.rb +8 -8
- data/lib/rubocop/processed_source.rb +1 -1
- data/lib/rubocop/rake_task.rb +1 -0
- data/lib/rubocop/result_cache.rb +23 -7
- data/lib/rubocop/rspec/shared_contexts.rb +5 -0
- data/lib/rubocop/runner.rb +18 -2
- data/lib/rubocop/target_ruby.rb +151 -0
- data/lib/rubocop/version.rb +1 -1
- metadata +60 -27
- data/lib/rubocop/cop/mixin/safe_mode.rb +0 -24
- data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +0 -209
data/lib/rubocop/rake_task.rb
CHANGED
data/lib/rubocop/result_cache.rb
CHANGED
@@ -77,12 +77,13 @@ module RuboCop
|
|
77
77
|
config_store.for('.').for_all_cops['AllowSymlinksInCacheRootDirectory']
|
78
78
|
end
|
79
79
|
|
80
|
-
def initialize(file, options, config_store, cache_root = nil)
|
80
|
+
def initialize(file, team, options, config_store, cache_root = nil)
|
81
81
|
cache_root ||= ResultCache.cache_root(config_store)
|
82
82
|
@allow_symlinks_in_cache_location =
|
83
83
|
ResultCache.allow_symlinks_in_cache_location?(config_store)
|
84
|
-
@path = File.join(cache_root,
|
85
|
-
|
84
|
+
@path = File.join(cache_root,
|
85
|
+
rubocop_checksum,
|
86
|
+
context_checksum(team, options),
|
86
87
|
file_checksum(file, config_store))
|
87
88
|
@cached_data = CachedData.new(file)
|
88
89
|
end
|
@@ -182,10 +183,25 @@ module RuboCop
|
|
182
183
|
# don't affect caching.
|
183
184
|
def relevant_options_digest(options)
|
184
185
|
options = options.reject { |key, _| NON_CHANGING.include?(key) }
|
185
|
-
options
|
186
|
-
|
187
|
-
|
188
|
-
|
186
|
+
options.to_s.gsub(/[^a-z]+/i, '_')
|
187
|
+
end
|
188
|
+
|
189
|
+
# The external dependency checksums are cached per RuboCop team so that
|
190
|
+
# the checksums don't need to be recomputed for each file.
|
191
|
+
def team_checksum(team)
|
192
|
+
@checksum_by_team ||= {}
|
193
|
+
@checksum_by_team[team.object_id] ||= team.external_dependency_checksum
|
194
|
+
end
|
195
|
+
|
196
|
+
# We combine team and options into a single "context" checksum to avoid
|
197
|
+
# making file names that are too long for some filesystems to handle.
|
198
|
+
# This context is for anything that's not (1) the RuboCop executable
|
199
|
+
# checksum or (2) the inspected file checksum.
|
200
|
+
def context_checksum(team, options)
|
201
|
+
Digest::SHA1.hexdigest([
|
202
|
+
team_checksum(team),
|
203
|
+
relevant_options_digest(options)
|
204
|
+
].join)
|
189
205
|
end
|
190
206
|
end
|
191
207
|
end
|
@@ -52,6 +52,7 @@ RSpec.shared_context 'config', :config do
|
|
52
52
|
cop_name = described_class.cop_name
|
53
53
|
hash[cop_name] = RuboCop::ConfigLoader
|
54
54
|
.default_configuration[cop_name]
|
55
|
+
.merge('Enabled' => true) # in case it is 'pending'
|
55
56
|
.merge(cop_config)
|
56
57
|
end
|
57
58
|
|
@@ -88,3 +89,7 @@ end
|
|
88
89
|
RSpec.shared_context 'ruby 2.6', :ruby26 do
|
89
90
|
let(:ruby_version) { 2.6 }
|
90
91
|
end
|
92
|
+
|
93
|
+
RSpec.shared_context 'ruby 2.7', :ruby27 do
|
94
|
+
let(:ruby_version) { 2.7 }
|
95
|
+
end
|
data/lib/rubocop/runner.rb
CHANGED
@@ -121,8 +121,14 @@ module RuboCop
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
def cached_result(file, team)
|
125
|
+
ResultCache.new(file, team, @options, @config_store)
|
126
|
+
end
|
127
|
+
|
124
128
|
def file_offense_cache(file)
|
125
|
-
|
129
|
+
config = @config_store.for(file)
|
130
|
+
cache = cached_result(file, standby_team(config)) if cached_run?
|
131
|
+
|
126
132
|
if cache&.valid?
|
127
133
|
offenses = cache.load
|
128
134
|
# If we're running --auto-correct and the cache says there are
|
@@ -208,7 +214,7 @@ module RuboCop
|
|
208
214
|
@config_store.for(Dir.pwd).for_all_cops['UseCache']) &&
|
209
215
|
# When running --auto-gen-config, there's some processing done in the
|
210
216
|
# cops related to calculating the Max parameters for Metrics cops. We
|
211
|
-
# need to do that processing and
|
217
|
+
# need to do that processing and cannot use caching.
|
212
218
|
!@options[:auto_gen_config] &&
|
213
219
|
# We can't cache results from code which is piped in to stdin
|
214
220
|
!@options[:stdin]
|
@@ -359,5 +365,15 @@ module RuboCop
|
|
359
365
|
ProcessedSource.from_file(file, ruby_version)
|
360
366
|
end
|
361
367
|
end
|
368
|
+
|
369
|
+
# A Cop::Team instance is stateful and may change when inspecting.
|
370
|
+
# The "standby" team for a given config is an initialized but
|
371
|
+
# otherwise dormant team that can be used for config- and option-
|
372
|
+
# level caching in ResultCache.
|
373
|
+
def standby_team(config)
|
374
|
+
@team_by_config ||= {}
|
375
|
+
@team_by_config[config.object_id] ||=
|
376
|
+
Cop::Team.new(mobilized_cop_classes(config), config, @options)
|
377
|
+
end
|
362
378
|
end
|
363
379
|
end
|
@@ -0,0 +1,151 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# The kind of Ruby that code inspected by RuboCop is written in.
|
5
|
+
class TargetRuby
|
6
|
+
KNOWN_RUBIES = [2.3, 2.4, 2.5, 2.6, 2.7].freeze
|
7
|
+
DEFAULT_VERSION = KNOWN_RUBIES.first
|
8
|
+
|
9
|
+
OBSOLETE_RUBIES = {
|
10
|
+
1.9 => '0.50', 2.0 => '0.50', 2.1 => '0.58', 2.2 => '0.69'
|
11
|
+
}.freeze
|
12
|
+
private_constant :KNOWN_RUBIES, :OBSOLETE_RUBIES
|
13
|
+
|
14
|
+
# A place where information about a target ruby version is found.
|
15
|
+
class Source
|
16
|
+
attr_reader :version, :name
|
17
|
+
|
18
|
+
def initialize(config)
|
19
|
+
@config = config
|
20
|
+
@version = find_version
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_s
|
24
|
+
name
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# The target ruby version may be configured in RuboCop's config.
|
29
|
+
class RuboCopConfig < Source
|
30
|
+
def name
|
31
|
+
"`TargetRubyVersion` parameter (in #{@config.smart_loaded_path})"
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def find_version
|
37
|
+
@config.for_all_cops['TargetRubyVersion']&.to_f
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# The target ruby version may be found in a .ruby-version file.
|
42
|
+
class RubyVersionFile < Source
|
43
|
+
FILENAME = '.ruby-version'
|
44
|
+
|
45
|
+
def name
|
46
|
+
"`#{FILENAME}`"
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def find_version
|
52
|
+
file = ruby_version_file
|
53
|
+
return unless file && File.file?(file)
|
54
|
+
|
55
|
+
File.read(file).match(/\A(ruby-)?(?<version>\d+\.\d+)/) do |md|
|
56
|
+
md[:version].to_f
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def ruby_version_file
|
61
|
+
@ruby_version_file ||=
|
62
|
+
@config.find_file_upwards(FILENAME,
|
63
|
+
@config.base_dir_for_path_parameters)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# The lock file of Bundler may identify the target ruby version.
|
68
|
+
class BundlerLockFile < Source
|
69
|
+
def name
|
70
|
+
"`#{bundler_lock_file_path}`"
|
71
|
+
end
|
72
|
+
|
73
|
+
private
|
74
|
+
|
75
|
+
def find_version
|
76
|
+
lock_file_path = bundler_lock_file_path
|
77
|
+
return nil unless lock_file_path
|
78
|
+
|
79
|
+
in_ruby_section = false
|
80
|
+
File.foreach(lock_file_path) do |line|
|
81
|
+
# If ruby is in Gemfile.lock or gems.lock, there should be two lines
|
82
|
+
# towards the bottom of the file that look like:
|
83
|
+
# RUBY VERSION
|
84
|
+
# ruby W.X.YpZ
|
85
|
+
# We ultimately want to match the "ruby W.X.Y.pZ" line, but there's
|
86
|
+
# extra logic to make sure we only start looking once we've seen the
|
87
|
+
# "RUBY VERSION" line.
|
88
|
+
in_ruby_section ||= line.match(/^\s*RUBY\s*VERSION\s*$/)
|
89
|
+
next unless in_ruby_section
|
90
|
+
|
91
|
+
# We currently only allow this feature to work with MRI ruby. If
|
92
|
+
# jruby (or something else) is used by the project, it's lock file
|
93
|
+
# will have a line that looks like:
|
94
|
+
# RUBY VERSION
|
95
|
+
# ruby W.X.YpZ (jruby x.x.x.x)
|
96
|
+
# The regex won't match in this situation.
|
97
|
+
result = line.match(/^\s*ruby\s+(\d+\.\d+)[p.\d]*\s*$/)
|
98
|
+
return result.captures.first.to_f if result
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def bundler_lock_file_path
|
103
|
+
@config.bundler_lock_file_path
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# If all else fails, a default version will be picked.
|
108
|
+
class Default < Source
|
109
|
+
def name
|
110
|
+
'default'
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
def find_version
|
116
|
+
DEFAULT_VERSION
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.supported_versions
|
121
|
+
KNOWN_RUBIES
|
122
|
+
end
|
123
|
+
|
124
|
+
SOURCES = [RuboCopConfig, RubyVersionFile, BundlerLockFile, Default].freeze
|
125
|
+
private_constant :SOURCES
|
126
|
+
|
127
|
+
def initialize(config)
|
128
|
+
@config = config
|
129
|
+
end
|
130
|
+
|
131
|
+
def source
|
132
|
+
@source ||= SOURCES.each.lazy.map { |c| c.new(@config) }.detect(&:version)
|
133
|
+
end
|
134
|
+
|
135
|
+
def version
|
136
|
+
source.version
|
137
|
+
end
|
138
|
+
|
139
|
+
def supported?
|
140
|
+
KNOWN_RUBIES.include?(version)
|
141
|
+
end
|
142
|
+
|
143
|
+
def rubocop_version_with_support
|
144
|
+
if supported?
|
145
|
+
RuboCop::Version.version
|
146
|
+
else
|
147
|
+
OBSOLETE_RUBIES[version]
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
data/lib/rubocop/version.rb
CHANGED
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.80.1
|
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:
|
13
|
+
date: 2020-02-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jaro_winkler
|
@@ -46,14 +46,14 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 2.7.0.1
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
56
|
+
version: 2.7.0.1
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: rainbow
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +74,20 @@ dependencies:
|
|
74
74
|
- - "<"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '4.0'
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: rexml
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
type: :runtime
|
85
|
+
prerelease: false
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
77
91
|
- !ruby/object:Gem::Dependency
|
78
92
|
name: ruby-progressbar
|
79
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,6 +177,7 @@ files:
|
|
163
177
|
- lib/rubocop/ast/node/ensure_node.rb
|
164
178
|
- lib/rubocop/ast/node/float_node.rb
|
165
179
|
- lib/rubocop/ast/node/for_node.rb
|
180
|
+
- lib/rubocop/ast/node/forward_args_node.rb
|
166
181
|
- lib/rubocop/ast/node/hash_node.rb
|
167
182
|
- lib/rubocop/ast/node/if_node.rb
|
168
183
|
- lib/rubocop/ast/node/int_node.rb
|
@@ -199,6 +214,14 @@ files:
|
|
199
214
|
- lib/rubocop/ast/traversal.rb
|
200
215
|
- lib/rubocop/cached_data.rb
|
201
216
|
- lib/rubocop/cli.rb
|
217
|
+
- lib/rubocop/cli/command.rb
|
218
|
+
- lib/rubocop/cli/command/auto_genenerate_config.rb
|
219
|
+
- lib/rubocop/cli/command/base.rb
|
220
|
+
- lib/rubocop/cli/command/execute_runner.rb
|
221
|
+
- lib/rubocop/cli/command/init_dotfile.rb
|
222
|
+
- lib/rubocop/cli/command/show_cops.rb
|
223
|
+
- lib/rubocop/cli/command/version.rb
|
224
|
+
- lib/rubocop/cli/environment.rb
|
202
225
|
- lib/rubocop/comment_config.rb
|
203
226
|
- lib/rubocop/config.rb
|
204
227
|
- lib/rubocop/config_loader.rb
|
@@ -240,6 +263,7 @@ files:
|
|
240
263
|
- lib/rubocop/cop/generator/require_file_injector.rb
|
241
264
|
- lib/rubocop/cop/ignored_node.rb
|
242
265
|
- lib/rubocop/cop/internal_affairs.rb
|
266
|
+
- lib/rubocop/cop/internal_affairs/method_name_equal.rb
|
243
267
|
- lib/rubocop/cop/internal_affairs/node_destructuring.rb
|
244
268
|
- lib/rubocop/cop/internal_affairs/node_type_predicate.rb
|
245
269
|
- lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
|
@@ -247,10 +271,9 @@ files:
|
|
247
271
|
- lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
|
248
272
|
- lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
|
249
273
|
- lib/rubocop/cop/layout/access_modifier_indentation.rb
|
250
|
-
- lib/rubocop/cop/layout/
|
251
|
-
- lib/rubocop/cop/layout/
|
252
|
-
- lib/rubocop/cop/layout/
|
253
|
-
- lib/rubocop/cop/layout/align_parameters.rb
|
274
|
+
- lib/rubocop/cop/layout/argument_alignment.rb
|
275
|
+
- lib/rubocop/cop/layout/array_alignment.rb
|
276
|
+
- lib/rubocop/cop/layout/assignment_indentation.rb
|
254
277
|
- lib/rubocop/cop/layout/block_alignment.rb
|
255
278
|
- lib/rubocop/cop/layout/block_end_newline.rb
|
256
279
|
- lib/rubocop/cop/layout/case_indentation.rb
|
@@ -278,22 +301,23 @@ files:
|
|
278
301
|
- lib/rubocop/cop/layout/end_alignment.rb
|
279
302
|
- lib/rubocop/cop/layout/end_of_line.rb
|
280
303
|
- lib/rubocop/cop/layout/extra_spacing.rb
|
304
|
+
- lib/rubocop/cop/layout/first_argument_indentation.rb
|
305
|
+
- lib/rubocop/cop/layout/first_array_element_indentation.rb
|
281
306
|
- lib/rubocop/cop/layout/first_array_element_line_break.rb
|
307
|
+
- lib/rubocop/cop/layout/first_hash_element_indentation.rb
|
282
308
|
- lib/rubocop/cop/layout/first_hash_element_line_break.rb
|
283
309
|
- lib/rubocop/cop/layout/first_method_argument_line_break.rb
|
284
310
|
- lib/rubocop/cop/layout/first_method_parameter_line_break.rb
|
311
|
+
- lib/rubocop/cop/layout/first_parameter_indentation.rb
|
312
|
+
- lib/rubocop/cop/layout/hash_alignment.rb
|
285
313
|
- lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb
|
286
|
-
- lib/rubocop/cop/layout/
|
287
|
-
- lib/rubocop/cop/layout/indent_first_argument.rb
|
288
|
-
- lib/rubocop/cop/layout/indent_first_array_element.rb
|
289
|
-
- lib/rubocop/cop/layout/indent_first_hash_element.rb
|
290
|
-
- lib/rubocop/cop/layout/indent_first_parameter.rb
|
291
|
-
- lib/rubocop/cop/layout/indent_heredoc.rb
|
314
|
+
- lib/rubocop/cop/layout/heredoc_indentation.rb
|
292
315
|
- lib/rubocop/cop/layout/indentation_consistency.rb
|
293
316
|
- lib/rubocop/cop/layout/indentation_width.rb
|
294
317
|
- lib/rubocop/cop/layout/initial_indentation.rb
|
295
|
-
- lib/rubocop/cop/layout/leading_blank_lines.rb
|
296
318
|
- lib/rubocop/cop/layout/leading_comment_space.rb
|
319
|
+
- lib/rubocop/cop/layout/leading_empty_lines.rb
|
320
|
+
- lib/rubocop/cop/layout/line_length.rb
|
297
321
|
- lib/rubocop/cop/layout/multiline_array_brace_layout.rb
|
298
322
|
- lib/rubocop/cop/layout/multiline_array_line_breaks.rb
|
299
323
|
- lib/rubocop/cop/layout/multiline_assignment_layout.rb
|
@@ -305,6 +329,7 @@ files:
|
|
305
329
|
- lib/rubocop/cop/layout/multiline_method_call_indentation.rb
|
306
330
|
- lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb
|
307
331
|
- lib/rubocop/cop/layout/multiline_operation_indentation.rb
|
332
|
+
- lib/rubocop/cop/layout/parameter_alignment.rb
|
308
333
|
- lib/rubocop/cop/layout/rescue_ensure_alignment.rb
|
309
334
|
- lib/rubocop/cop/layout/space_after_colon.rb
|
310
335
|
- lib/rubocop/cop/layout/space_after_comma.rb
|
@@ -331,7 +356,7 @@ files:
|
|
331
356
|
- lib/rubocop/cop/layout/space_inside_reference_brackets.rb
|
332
357
|
- lib/rubocop/cop/layout/space_inside_string_interpolation.rb
|
333
358
|
- lib/rubocop/cop/layout/tab.rb
|
334
|
-
- lib/rubocop/cop/layout/
|
359
|
+
- lib/rubocop/cop/layout/trailing_empty_lines.rb
|
335
360
|
- lib/rubocop/cop/layout/trailing_whitespace.rb
|
336
361
|
- lib/rubocop/cop/lint/ambiguous_block_association.rb
|
337
362
|
- lib/rubocop/cop/lint/ambiguous_operator.rb
|
@@ -344,8 +369,8 @@ files:
|
|
344
369
|
- lib/rubocop/cop/lint/deprecated_class_methods.rb
|
345
370
|
- lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
|
346
371
|
- lib/rubocop/cop/lint/duplicate_case_condition.rb
|
372
|
+
- lib/rubocop/cop/lint/duplicate_hash_key.rb
|
347
373
|
- lib/rubocop/cop/lint/duplicate_methods.rb
|
348
|
-
- lib/rubocop/cop/lint/duplicated_key.rb
|
349
374
|
- lib/rubocop/cop/lint/each_with_object_argument.rb
|
350
375
|
- lib/rubocop/cop/lint/else_layout.rb
|
351
376
|
- lib/rubocop/cop/lint/empty_ensure.rb
|
@@ -358,7 +383,6 @@ files:
|
|
358
383
|
- lib/rubocop/cop/lint/flip_flop.rb
|
359
384
|
- lib/rubocop/cop/lint/float_out_of_range.rb
|
360
385
|
- lib/rubocop/cop/lint/format_parameter_mismatch.rb
|
361
|
-
- lib/rubocop/cop/lint/handle_exceptions.rb
|
362
386
|
- lib/rubocop/cop/lint/heredoc_method_call_position.rb
|
363
387
|
- lib/rubocop/cop/lint/implicit_string_concatenation.rb
|
364
388
|
- lib/rubocop/cop/lint/ineffective_access_modifier.rb
|
@@ -368,10 +392,11 @@ files:
|
|
368
392
|
- lib/rubocop/cop/lint/literal_in_interpolation.rb
|
369
393
|
- lib/rubocop/cop/lint/loop.rb
|
370
394
|
- lib/rubocop/cop/lint/missing_cop_enable_directive.rb
|
371
|
-
- lib/rubocop/cop/lint/
|
395
|
+
- lib/rubocop/cop/lint/multiple_comparison.rb
|
372
396
|
- lib/rubocop/cop/lint/nested_method_definition.rb
|
373
397
|
- lib/rubocop/cop/lint/nested_percent_literal.rb
|
374
398
|
- lib/rubocop/cop/lint/next_without_accumulator.rb
|
399
|
+
- lib/rubocop/cop/lint/non_deterministic_require_order.rb
|
375
400
|
- lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
|
376
401
|
- lib/rubocop/cop/lint/number_conversion.rb
|
377
402
|
- lib/rubocop/cop/lint/ordered_magic_comments.rb
|
@@ -383,6 +408,7 @@ files:
|
|
383
408
|
- lib/rubocop/cop/lint/redundant_cop_enable_directive.rb
|
384
409
|
- lib/rubocop/cop/lint/redundant_require_statement.rb
|
385
410
|
- lib/rubocop/cop/lint/redundant_splat_expansion.rb
|
411
|
+
- lib/rubocop/cop/lint/redundant_string_coercion.rb
|
386
412
|
- lib/rubocop/cop/lint/redundant_with_index.rb
|
387
413
|
- lib/rubocop/cop/lint/redundant_with_object.rb
|
388
414
|
- lib/rubocop/cop/lint/regexp_as_condition.rb
|
@@ -398,7 +424,7 @@ files:
|
|
398
424
|
- lib/rubocop/cop/lint/shadowed_argument.rb
|
399
425
|
- lib/rubocop/cop/lint/shadowed_exception.rb
|
400
426
|
- lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
|
401
|
-
- lib/rubocop/cop/lint/
|
427
|
+
- lib/rubocop/cop/lint/suppressed_exception.rb
|
402
428
|
- lib/rubocop/cop/lint/syntax.rb
|
403
429
|
- lib/rubocop/cop/lint/to_json.rb
|
404
430
|
- lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
|
@@ -420,7 +446,6 @@ files:
|
|
420
446
|
- lib/rubocop/cop/metrics/block_nesting.rb
|
421
447
|
- lib/rubocop/cop/metrics/class_length.rb
|
422
448
|
- lib/rubocop/cop/metrics/cyclomatic_complexity.rb
|
423
|
-
- lib/rubocop/cop/metrics/line_length.rb
|
424
449
|
- lib/rubocop/cop/metrics/method_length.rb
|
425
450
|
- lib/rubocop/cop/metrics/module_length.rb
|
426
451
|
- lib/rubocop/cop/metrics/parameter_lists.rb
|
@@ -449,12 +474,14 @@ files:
|
|
449
474
|
- lib/rubocop/cop/mixin/enforce_superclass.rb
|
450
475
|
- lib/rubocop/cop/mixin/first_element_line_break.rb
|
451
476
|
- lib/rubocop/cop/mixin/frozen_string_literal.rb
|
452
|
-
- lib/rubocop/cop/mixin/
|
477
|
+
- lib/rubocop/cop/mixin/hash_alignment_styles.rb
|
478
|
+
- lib/rubocop/cop/mixin/hash_transform_method.rb
|
453
479
|
- lib/rubocop/cop/mixin/heredoc.rb
|
454
480
|
- lib/rubocop/cop/mixin/ignored_methods.rb
|
455
481
|
- lib/rubocop/cop/mixin/ignored_pattern.rb
|
456
482
|
- lib/rubocop/cop/mixin/integer_node.rb
|
457
483
|
- lib/rubocop/cop/mixin/interpolation.rb
|
484
|
+
- lib/rubocop/cop/mixin/line_length_help.rb
|
458
485
|
- lib/rubocop/cop/mixin/match_range.rb
|
459
486
|
- lib/rubocop/cop/mixin/method_complexity.rb
|
460
487
|
- lib/rubocop/cop/mixin/method_preference.rb
|
@@ -474,9 +501,9 @@ files:
|
|
474
501
|
- lib/rubocop/cop/mixin/preceding_following_alignment.rb
|
475
502
|
- lib/rubocop/cop/mixin/preferred_delimiters.rb
|
476
503
|
- lib/rubocop/cop/mixin/range_help.rb
|
504
|
+
- lib/rubocop/cop/mixin/rational_literal.rb
|
477
505
|
- lib/rubocop/cop/mixin/rescue_node.rb
|
478
506
|
- lib/rubocop/cop/mixin/safe_assignment.rb
|
479
|
-
- lib/rubocop/cop/mixin/safe_mode.rb
|
480
507
|
- lib/rubocop/cop/mixin/space_after_punctuation.rb
|
481
508
|
- lib/rubocop/cop/mixin/space_before_punctuation.rb
|
482
509
|
- lib/rubocop/cop/mixin/statement_modifier.rb
|
@@ -492,6 +519,7 @@ files:
|
|
492
519
|
- lib/rubocop/cop/naming/accessor_method_name.rb
|
493
520
|
- lib/rubocop/cop/naming/ascii_identifiers.rb
|
494
521
|
- lib/rubocop/cop/naming/binary_operator_parameter_name.rb
|
522
|
+
- lib/rubocop/cop/naming/block_parameter_name.rb
|
495
523
|
- lib/rubocop/cop/naming/class_and_module_camel_case.rb
|
496
524
|
- lib/rubocop/cop/naming/constant_name.rb
|
497
525
|
- lib/rubocop/cop/naming/file_name.rb
|
@@ -499,10 +527,9 @@ files:
|
|
499
527
|
- lib/rubocop/cop/naming/heredoc_delimiter_naming.rb
|
500
528
|
- lib/rubocop/cop/naming/memoized_instance_variable_name.rb
|
501
529
|
- lib/rubocop/cop/naming/method_name.rb
|
530
|
+
- lib/rubocop/cop/naming/method_parameter_name.rb
|
502
531
|
- lib/rubocop/cop/naming/predicate_name.rb
|
503
532
|
- lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb
|
504
|
-
- lib/rubocop/cop/naming/uncommunicative_block_param_name.rb
|
505
|
-
- lib/rubocop/cop/naming/uncommunicative_method_param_name.rb
|
506
533
|
- lib/rubocop/cop/naming/variable_name.rb
|
507
534
|
- lib/rubocop/cop/naming/variable_number.rb
|
508
535
|
- lib/rubocop/cop/offense.rb
|
@@ -524,7 +551,6 @@ files:
|
|
524
551
|
- lib/rubocop/cop/style/begin_block.rb
|
525
552
|
- lib/rubocop/cop/style/block_comments.rb
|
526
553
|
- lib/rubocop/cop/style/block_delimiters.rb
|
527
|
-
- lib/rubocop/cop/style/braces_around_hash_parameters.rb
|
528
554
|
- lib/rubocop/cop/style/case_equality.rb
|
529
555
|
- lib/rubocop/cop/style/character_literal.rb
|
530
556
|
- lib/rubocop/cop/style/class_and_module_children.rb
|
@@ -567,7 +593,10 @@ files:
|
|
567
593
|
- lib/rubocop/cop/style/frozen_string_literal_comment.rb
|
568
594
|
- lib/rubocop/cop/style/global_vars.rb
|
569
595
|
- lib/rubocop/cop/style/guard_clause.rb
|
596
|
+
- lib/rubocop/cop/style/hash_each_methods.rb
|
570
597
|
- lib/rubocop/cop/style/hash_syntax.rb
|
598
|
+
- lib/rubocop/cop/style/hash_transform_keys.rb
|
599
|
+
- lib/rubocop/cop/style/hash_transform_values.rb
|
571
600
|
- lib/rubocop/cop/style/identical_conditional_branches.rb
|
572
601
|
- lib/rubocop/cop/style/if_inside_else.rb
|
573
602
|
- lib/rubocop/cop/style/if_unless_modifier.rb
|
@@ -582,6 +611,8 @@ files:
|
|
582
611
|
- lib/rubocop/cop/style/lambda_call.rb
|
583
612
|
- lib/rubocop/cop/style/line_end_concatenation.rb
|
584
613
|
- lib/rubocop/cop/style/method_call_with_args_parentheses.rb
|
614
|
+
- lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb
|
615
|
+
- lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb
|
585
616
|
- lib/rubocop/cop/style/method_call_without_args_parentheses.rb
|
586
617
|
- lib/rubocop/cop/style/method_called_on_do_end_block.rb
|
587
618
|
- lib/rubocop/cop/style/method_def_parentheses.rb
|
@@ -709,6 +740,7 @@ files:
|
|
709
740
|
- lib/rubocop/formatter/fuubar_style_formatter.rb
|
710
741
|
- lib/rubocop/formatter/html_formatter.rb
|
711
742
|
- lib/rubocop/formatter/json_formatter.rb
|
743
|
+
- lib/rubocop/formatter/junit_formatter.rb
|
712
744
|
- lib/rubocop/formatter/offense_count_formatter.rb
|
713
745
|
- lib/rubocop/formatter/pacman_formatter.rb
|
714
746
|
- lib/rubocop/formatter/progress_formatter.rb
|
@@ -736,6 +768,7 @@ files:
|
|
736
768
|
- lib/rubocop/string_interpreter.rb
|
737
769
|
- lib/rubocop/string_util.rb
|
738
770
|
- lib/rubocop/target_finder.rb
|
771
|
+
- lib/rubocop/target_ruby.rb
|
739
772
|
- lib/rubocop/token.rb
|
740
773
|
- lib/rubocop/version.rb
|
741
774
|
- lib/rubocop/warning.rb
|
@@ -764,7 +797,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
764
797
|
- !ruby/object:Gem::Version
|
765
798
|
version: '0'
|
766
799
|
requirements: []
|
767
|
-
rubygems_version: 3.
|
800
|
+
rubygems_version: 3.1.2
|
768
801
|
signing_key:
|
769
802
|
specification_version: 4
|
770
803
|
summary: Automatic Ruby code style checking tool.
|