rubocop 1.5.2 → 1.8.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 +3 -2
- data/config/default.yml +112 -16
- data/config/obsoletion.yml +196 -0
- data/lib/rubocop.rb +20 -1
- data/lib/rubocop/cli/command/suggest_extensions.rb +16 -44
- data/lib/rubocop/comment_config.rb +6 -6
- data/lib/rubocop/config.rb +8 -5
- data/lib/rubocop/config_loader.rb +11 -7
- data/lib/rubocop/config_loader_resolver.rb +21 -4
- data/lib/rubocop/config_obsoletion.rb +64 -262
- data/lib/rubocop/config_obsoletion/changed_enforced_styles.rb +33 -0
- data/lib/rubocop/config_obsoletion/changed_parameter.rb +21 -0
- data/lib/rubocop/config_obsoletion/cop_rule.rb +34 -0
- data/lib/rubocop/config_obsoletion/extracted_cop.rb +44 -0
- data/lib/rubocop/config_obsoletion/parameter_rule.rb +44 -0
- data/lib/rubocop/config_obsoletion/removed_cop.rb +41 -0
- data/lib/rubocop/config_obsoletion/renamed_cop.rb +34 -0
- data/lib/rubocop/config_obsoletion/rule.rb +41 -0
- data/lib/rubocop/config_obsoletion/split_cop.rb +27 -0
- data/lib/rubocop/config_validator.rb +11 -4
- data/lib/rubocop/cop/base.rb +17 -15
- data/lib/rubocop/cop/cop.rb +2 -2
- data/lib/rubocop/cop/correctors/string_literal_corrector.rb +6 -8
- data/lib/rubocop/cop/gemspec/required_ruby_version.rb +3 -2
- data/lib/rubocop/cop/internal_affairs.rb +1 -0
- data/lib/rubocop/cop/internal_affairs/style_detected_api_use.rb +145 -0
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +19 -3
- data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +1 -1
- data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +14 -0
- data/lib/rubocop/cop/layout/line_length.rb +6 -16
- data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +2 -2
- data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +3 -10
- data/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +1 -0
- data/lib/rubocop/cop/layout/space_before_block_braces.rb +2 -0
- data/lib/rubocop/cop/layout/space_before_brackets.rb +62 -0
- data/lib/rubocop/cop/layout/space_inside_block_braces.rb +13 -10
- data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +2 -2
- data/lib/rubocop/cop/lint/ambiguous_assignment.rb +59 -0
- data/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +7 -2
- data/lib/rubocop/cop/lint/deprecated_constants.rb +75 -0
- data/lib/rubocop/cop/lint/duplicate_branch.rb +64 -2
- data/lib/rubocop/cop/lint/lambda_without_literal_block.rb +44 -0
- data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +10 -6
- data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +2 -1
- data/lib/rubocop/cop/lint/redundant_dir_glob_sort.rb +50 -0
- data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +50 -17
- data/lib/rubocop/cop/lint/shadowed_exception.rb +1 -11
- data/lib/rubocop/cop/lint/unreachable_loop.rb +17 -0
- data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +1 -1
- data/lib/rubocop/cop/migration/department_name.rb +1 -1
- data/lib/rubocop/cop/mixin/allowed_identifiers.rb +18 -0
- data/lib/rubocop/cop/mixin/comments_help.rb +1 -10
- data/lib/rubocop/cop/mixin/first_element_line_break.rb +1 -1
- data/lib/rubocop/cop/mixin/string_help.rb +4 -1
- data/lib/rubocop/cop/mixin/uncommunicative_name.rb +5 -1
- data/lib/rubocop/cop/naming/accessor_method_name.rb +15 -1
- data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +59 -5
- data/lib/rubocop/cop/naming/variable_name.rb +2 -0
- data/lib/rubocop/cop/naming/variable_number.rb +1 -8
- data/lib/rubocop/cop/registry.rb +10 -0
- data/lib/rubocop/cop/style/access_modifier_declarations.rb +3 -1
- data/lib/rubocop/cop/style/character_literal.rb +10 -11
- data/lib/rubocop/cop/style/collection_methods.rb +14 -1
- data/lib/rubocop/cop/style/commented_keyword.rb +22 -5
- data/lib/rubocop/cop/style/empty_literal.rb +6 -2
- data/lib/rubocop/cop/style/endless_method.rb +102 -0
- data/lib/rubocop/cop/style/explicit_block_argument.rb +10 -0
- data/lib/rubocop/cop/style/float_division.rb +44 -1
- data/lib/rubocop/cop/style/for.rb +2 -0
- data/lib/rubocop/cop/style/hash_except.rb +95 -0
- data/lib/rubocop/cop/style/hash_like_case.rb +2 -1
- data/lib/rubocop/cop/style/if_inside_else.rb +8 -3
- data/lib/rubocop/cop/style/if_unless_modifier.rb +4 -0
- data/lib/rubocop/cop/style/ip_addresses.rb +1 -1
- data/lib/rubocop/cop/style/keyword_parameters_order.rb +12 -2
- data/lib/rubocop/cop/style/lambda_call.rb +2 -1
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +7 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +16 -6
- data/lib/rubocop/cop/style/method_def_parentheses.rb +7 -0
- data/lib/rubocop/cop/style/multiline_method_signature.rb +26 -1
- data/lib/rubocop/cop/style/multiline_when_then.rb +3 -1
- data/lib/rubocop/cop/style/mutable_constant.rb +13 -3
- data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +4 -0
- data/lib/rubocop/cop/style/perl_backrefs.rb +86 -9
- data/lib/rubocop/cop/style/raise_args.rb +5 -2
- data/lib/rubocop/cop/style/redundant_argument.rb +21 -2
- data/lib/rubocop/cop/style/redundant_freeze.rb +8 -4
- data/lib/rubocop/cop/style/redundant_return.rb +1 -1
- data/lib/rubocop/cop/style/single_line_block_params.rb +30 -7
- data/lib/rubocop/cop/style/single_line_methods.rb +34 -2
- data/lib/rubocop/cop/style/sole_nested_conditional.rb +15 -9
- data/lib/rubocop/cop/style/special_global_vars.rb +1 -13
- data/lib/rubocop/cop/style/string_concatenation.rb +20 -1
- data/lib/rubocop/cop/style/string_literals.rb +14 -8
- data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +4 -3
- data/lib/rubocop/cop/style/symbol_proc.rb +5 -4
- data/lib/rubocop/cop/style/while_until_modifier.rb +2 -4
- data/lib/rubocop/cop/util.rb +3 -1
- data/lib/rubocop/formatter/emacs_style_formatter.rb +2 -0
- data/lib/rubocop/formatter/simple_text_formatter.rb +2 -0
- data/lib/rubocop/formatter/tap_formatter.rb +2 -0
- data/lib/rubocop/lockfile.rb +40 -0
- data/lib/rubocop/options.rb +9 -9
- data/lib/rubocop/rspec/cop_helper.rb +0 -4
- data/lib/rubocop/rspec/expect_offense.rb +34 -22
- data/lib/rubocop/runner.rb +16 -1
- data/lib/rubocop/target_finder.rb +4 -2
- data/lib/rubocop/target_ruby.rb +47 -11
- data/lib/rubocop/util.rb +16 -0
- data/lib/rubocop/version.rb +8 -2
- metadata +28 -7
data/lib/rubocop/options.rb
CHANGED
@@ -66,7 +66,7 @@ module RuboCop
|
|
66
66
|
add_configuration_options(opts)
|
67
67
|
add_formatting_options(opts)
|
68
68
|
|
69
|
-
option(opts, '-r', '--require FILE') { |f|
|
69
|
+
option(opts, '-r', '--require FILE') { |f| require_feature(f) }
|
70
70
|
|
71
71
|
add_severity_option(opts)
|
72
72
|
add_flags_with_optional_args(opts)
|
@@ -92,14 +92,7 @@ module RuboCop
|
|
92
92
|
raise OptionArgumentError, message
|
93
93
|
end
|
94
94
|
|
95
|
-
@options[:"#{option}"] =
|
96
|
-
if list.empty?
|
97
|
-
['']
|
98
|
-
else
|
99
|
-
list.split(',').map do |c|
|
100
|
-
Cop::Registry.qualified_cop_name(c, "--#{option} option")
|
101
|
-
end
|
102
|
-
end
|
95
|
+
@options[:"#{option}"] = list.empty? ? [''] : list.split(',')
|
103
96
|
end
|
104
97
|
end
|
105
98
|
|
@@ -239,6 +232,13 @@ module RuboCop
|
|
239
232
|
long_opt[2..-1].sub('[no-]', '').sub(/ .*/, '')
|
240
233
|
.tr('-', '_').gsub(/[\[\]]/, '').to_sym
|
241
234
|
end
|
235
|
+
|
236
|
+
def require_feature(file)
|
237
|
+
# If any features were added on the CLI from `--require`,
|
238
|
+
# add them to the config.
|
239
|
+
ConfigLoader.add_loaded_features(file)
|
240
|
+
require file
|
241
|
+
end
|
242
242
|
end
|
243
243
|
|
244
244
|
# Validates option arguments and the options' compatibility with each other.
|
@@ -9,10 +9,6 @@ module CopHelper
|
|
9
9
|
let(:ruby_version) { 2.4 }
|
10
10
|
let(:rails_version) { false }
|
11
11
|
|
12
|
-
def inspect_source_file(source)
|
13
|
-
Tempfile.open('tmp') { |f| inspect_source(source, f) }
|
14
|
-
end
|
15
|
-
|
16
12
|
def inspect_source(source, file = nil)
|
17
13
|
RuboCop::Formatter::DisabledConfigFormatter.config_to_allow_offenses = {}
|
18
14
|
RuboCop::Formatter::DisabledConfigFormatter.detected_styles = {}
|
@@ -111,28 +111,9 @@ module RuboCop
|
|
111
111
|
source
|
112
112
|
end
|
113
113
|
|
114
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
115
114
|
def expect_offense(source, file = nil, severity: nil, **replacements)
|
116
|
-
|
117
|
-
|
118
|
-
.config_to_allow_offenses = {}
|
119
|
-
RuboCop::Formatter::DisabledConfigFormatter.detected_styles = {}
|
120
|
-
cop.instance_variable_get(:@options)[:auto_correct] = true
|
121
|
-
|
122
|
-
expected_annotations = AnnotatedSource.parse(source)
|
123
|
-
|
124
|
-
if expected_annotations.plain_source == source
|
125
|
-
raise 'Use `expect_no_offenses` to assert that no offenses are found'
|
126
|
-
end
|
127
|
-
|
128
|
-
@processed_source = parse_source(expected_annotations.plain_source,
|
129
|
-
file)
|
130
|
-
|
131
|
-
unless @processed_source.valid_syntax?
|
132
|
-
raise 'Error parsing example code: ' \
|
133
|
-
"#{@processed_source.diagnostics.map(&:render).join("\n")}"
|
134
|
-
end
|
135
|
-
|
115
|
+
expected_annotations = parse_annotations(source, **replacements)
|
116
|
+
@processed_source = parse_processed_source(expected_annotations.plain_source, file)
|
136
117
|
@offenses = _investigate(cop, @processed_source)
|
137
118
|
actual_annotations =
|
138
119
|
expected_annotations.with_offense_annotations(@offenses)
|
@@ -143,7 +124,14 @@ module RuboCop
|
|
143
124
|
@offenses
|
144
125
|
end
|
145
126
|
|
146
|
-
|
127
|
+
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
128
|
+
def expect_correction(correction, loop: true, source: nil)
|
129
|
+
if source
|
130
|
+
expected_annotations = parse_annotations(source, raise_error: false)
|
131
|
+
@processed_source = parse_processed_source(expected_annotations.plain_source)
|
132
|
+
_investigate(cop, @processed_source)
|
133
|
+
end
|
134
|
+
|
147
135
|
raise '`expect_correction` must follow `expect_offense`' unless @processed_source
|
148
136
|
|
149
137
|
iteration = 0
|
@@ -192,6 +180,30 @@ module RuboCop
|
|
192
180
|
expect(actual_annotations.to_s).to eq(source)
|
193
181
|
end
|
194
182
|
|
183
|
+
def parse_annotations(source, raise_error: true, **replacements)
|
184
|
+
set_formatter_options
|
185
|
+
|
186
|
+
source = format_offense(source, **replacements)
|
187
|
+
annotations = AnnotatedSource.parse(source)
|
188
|
+
return annotations unless raise_error && annotations.plain_source == source
|
189
|
+
|
190
|
+
raise 'Use `expect_no_offenses` to assert that no offenses are found'
|
191
|
+
end
|
192
|
+
|
193
|
+
def parse_processed_source(source, file = nil)
|
194
|
+
processed_source = parse_source(source, file)
|
195
|
+
return processed_source if processed_source.valid_syntax?
|
196
|
+
|
197
|
+
raise 'Error parsing example code: ' \
|
198
|
+
"#{processed_source.diagnostics.map(&:render).join("\n")}"
|
199
|
+
end
|
200
|
+
|
201
|
+
def set_formatter_options
|
202
|
+
RuboCop::Formatter::DisabledConfigFormatter.config_to_allow_offenses = {}
|
203
|
+
RuboCop::Formatter::DisabledConfigFormatter.detected_styles = {}
|
204
|
+
cop.instance_variable_get(:@options)[:auto_correct] = true
|
205
|
+
end
|
206
|
+
|
195
207
|
# Parsed representation of code annotated with the `^^^ Message` style
|
196
208
|
class AnnotatedSource
|
197
209
|
ANNOTATION_PATTERN = /\A\s*(\^+|\^{}) /.freeze
|
data/lib/rubocop/runner.rb
CHANGED
@@ -323,11 +323,16 @@ module RuboCop
|
|
323
323
|
Cop::Team.mobilize(mobilized_cop_classes(config), config, @options)
|
324
324
|
end
|
325
325
|
|
326
|
-
def mobilized_cop_classes(config)
|
326
|
+
def mobilized_cop_classes(config) # rubocop:disable Metrics/AbcSize
|
327
327
|
@mobilized_cop_classes ||= {}.compare_by_identity
|
328
328
|
@mobilized_cop_classes[config] ||= begin
|
329
329
|
cop_classes = Cop::Registry.all
|
330
330
|
|
331
|
+
# `@options[:only]` and `@options[:except]` are not qualified until
|
332
|
+
# needed so that the Registry can be fully loaded, including any
|
333
|
+
# cops added by `require`s.
|
334
|
+
qualify_option_cop_names
|
335
|
+
|
331
336
|
OptionsValidator.new(@options).validate_cop_options
|
332
337
|
|
333
338
|
if @options[:only]
|
@@ -342,6 +347,16 @@ module RuboCop
|
|
342
347
|
end
|
343
348
|
end
|
344
349
|
|
350
|
+
def qualify_option_cop_names
|
351
|
+
%i[only except].each do |option|
|
352
|
+
next unless @options[option]
|
353
|
+
|
354
|
+
@options[option].map! do |cop_name|
|
355
|
+
Cop::Registry.qualified_cop_name(cop_name, "--#{option} option")
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
|
345
360
|
def filter_cop_classes(cop_classes, config)
|
346
361
|
# use only cops that link to a style guide if requested
|
347
362
|
return unless style_guide_cops_only?(config)
|
@@ -58,7 +58,7 @@ module RuboCop
|
|
58
58
|
base_dir = base_dir.gsub(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
59
59
|
all_files = find_files(base_dir, File::FNM_DOTMATCH)
|
60
60
|
# use file.include? for performance optimization
|
61
|
-
hidden_files = all_files.select { |file| file.include?(HIDDEN_PATH_SUBSTRING) }
|
61
|
+
hidden_files = all_files.select { |file| file.include?(HIDDEN_PATH_SUBSTRING) }.sort
|
62
62
|
base_dir_config = @config_store.for(base_dir)
|
63
63
|
|
64
64
|
target_files = all_files.select do |file|
|
@@ -70,7 +70,9 @@ module RuboCop
|
|
70
70
|
|
71
71
|
def to_inspect?(file, hidden_files, base_dir_config)
|
72
72
|
return false if base_dir_config.file_to_exclude?(file)
|
73
|
-
return true if !hidden_files.
|
73
|
+
return true if !hidden_files.bsearch do |hidden_file|
|
74
|
+
file <=> hidden_file
|
75
|
+
end && ruby_file?(file)
|
74
76
|
|
75
77
|
base_dir_config.file_to_include?(file)
|
76
78
|
end
|
data/lib/rubocop/target_ruby.rb
CHANGED
@@ -44,33 +44,61 @@ module RuboCop
|
|
44
44
|
# The target ruby version may be found in a .ruby-version file.
|
45
45
|
# @api private
|
46
46
|
class RubyVersionFile < Source
|
47
|
-
|
47
|
+
RUBY_VERSION_FILENAME = '.ruby-version'
|
48
|
+
RUBY_VERSION_PATTERN = /\A(?:ruby-)?(?<version>\d+\.\d+)/.freeze
|
48
49
|
|
49
50
|
def name
|
50
|
-
"`#{
|
51
|
+
"`#{RUBY_VERSION_FILENAME}`"
|
51
52
|
end
|
52
53
|
|
53
54
|
private
|
54
55
|
|
56
|
+
def filename
|
57
|
+
RUBY_VERSION_FILENAME
|
58
|
+
end
|
59
|
+
|
60
|
+
def pattern
|
61
|
+
RUBY_VERSION_PATTERN
|
62
|
+
end
|
63
|
+
|
55
64
|
def find_version
|
56
|
-
file =
|
65
|
+
file = version_file
|
57
66
|
return unless file && File.file?(file)
|
58
67
|
|
59
|
-
|
60
|
-
# `(ruby-)` is not a capture type.
|
61
|
-
File.read(file).match(/\A(ruby-)?(?<version>\d+\.\d+)/) do |md|
|
62
|
-
# rubocop:enable Lint/MixedRegexpCaptureTypes
|
68
|
+
File.read(file).match(pattern) do |md|
|
63
69
|
md[:version].to_f
|
64
70
|
end
|
65
71
|
end
|
66
72
|
|
67
|
-
def
|
68
|
-
@
|
69
|
-
@config.find_file_upwards(
|
73
|
+
def version_file
|
74
|
+
@version_file ||=
|
75
|
+
@config.find_file_upwards(filename,
|
70
76
|
@config.base_dir_for_path_parameters)
|
71
77
|
end
|
72
78
|
end
|
73
79
|
|
80
|
+
# The target ruby version may be found in a .tool-versions file, in a line
|
81
|
+
# starting with `ruby`.
|
82
|
+
# @api private
|
83
|
+
class ToolVersionsFile < RubyVersionFile
|
84
|
+
TOOL_VERSIONS_FILENAME = '.tool-versions'
|
85
|
+
TOOL_VERSIONS_PATTERN = /\Aruby (?:ruby-)?(?<version>\d+\.\d+)/.freeze
|
86
|
+
|
87
|
+
def name
|
88
|
+
"`#{TOOL_VERSIONS_FILENAME}`"
|
89
|
+
end
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def filename
|
94
|
+
TOOL_VERSIONS_FILENAME
|
95
|
+
end
|
96
|
+
|
97
|
+
def pattern
|
98
|
+
TOOL_VERSIONS_PATTERN
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
74
102
|
# The lock file of Bundler may identify the target ruby version.
|
75
103
|
# @api private
|
76
104
|
class BundlerLockFile < Source
|
@@ -194,7 +222,15 @@ module RuboCop
|
|
194
222
|
KNOWN_RUBIES
|
195
223
|
end
|
196
224
|
|
197
|
-
SOURCES = [
|
225
|
+
SOURCES = [
|
226
|
+
RuboCopConfig,
|
227
|
+
RubyVersionFile,
|
228
|
+
ToolVersionsFile,
|
229
|
+
BundlerLockFile,
|
230
|
+
GemspecFile,
|
231
|
+
Default
|
232
|
+
].freeze
|
233
|
+
|
198
234
|
private_constant :SOURCES
|
199
235
|
|
200
236
|
def initialize(config)
|
data/lib/rubocop/util.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# This module contains a collection of useful utility methods.
|
5
|
+
module Util
|
6
|
+
def self.silence_warnings
|
7
|
+
# Replaces Kernel::silence_warnings since it hides any warnings,
|
8
|
+
# including the RuboCop ones
|
9
|
+
old_verbose = $VERBOSE
|
10
|
+
$VERBOSE = nil
|
11
|
+
yield
|
12
|
+
ensure
|
13
|
+
$VERBOSE = old_verbose
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
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 = '1.
|
6
|
+
STRING = '1.8.1'
|
7
7
|
|
8
8
|
MSG = '%<version>s (using Parser %<parser_version>s, '\
|
9
9
|
'rubocop-ast %<rubocop_ast_version>s, ' \
|
@@ -34,7 +34,13 @@ module RuboCop
|
|
34
34
|
|
35
35
|
# @api private
|
36
36
|
def self.extension_versions(env)
|
37
|
-
|
37
|
+
features = Util.silence_warnings do
|
38
|
+
# Suppress any config issues when loading the config (ie. deprecations,
|
39
|
+
# pending cops, etc.).
|
40
|
+
env.config_store.for_pwd.loaded_features.sort
|
41
|
+
end
|
42
|
+
|
43
|
+
features.map do |loaded_feature|
|
38
44
|
next unless (match = loaded_feature.match(/rubocop-(?<feature>.*)/))
|
39
45
|
|
40
46
|
feature = match[:feature]
|
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: 1.
|
4
|
+
version: 1.8.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: 2021-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parallel
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
35
|
+
version: 3.0.0.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
42
|
+
version: 3.0.0.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rainbow
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
version: 1.4.0
|
138
138
|
- - "<"
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
140
|
+
version: '3.0'
|
141
141
|
type: :runtime
|
142
142
|
prerelease: false
|
143
143
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -147,7 +147,7 @@ dependencies:
|
|
147
147
|
version: 1.4.0
|
148
148
|
- - "<"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
150
|
+
version: '3.0'
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
152
|
name: bundler
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,6 +184,7 @@ files:
|
|
184
184
|
- assets/logo.png
|
185
185
|
- assets/output.html.erb
|
186
186
|
- config/default.yml
|
187
|
+
- config/obsoletion.yml
|
187
188
|
- exe/rubocop
|
188
189
|
- lib/rubocop.rb
|
189
190
|
- lib/rubocop/ast_aliases.rb
|
@@ -203,6 +204,15 @@ files:
|
|
203
204
|
- lib/rubocop/config_loader.rb
|
204
205
|
- lib/rubocop/config_loader_resolver.rb
|
205
206
|
- lib/rubocop/config_obsoletion.rb
|
207
|
+
- lib/rubocop/config_obsoletion/changed_enforced_styles.rb
|
208
|
+
- lib/rubocop/config_obsoletion/changed_parameter.rb
|
209
|
+
- lib/rubocop/config_obsoletion/cop_rule.rb
|
210
|
+
- lib/rubocop/config_obsoletion/extracted_cop.rb
|
211
|
+
- lib/rubocop/config_obsoletion/parameter_rule.rb
|
212
|
+
- lib/rubocop/config_obsoletion/removed_cop.rb
|
213
|
+
- lib/rubocop/config_obsoletion/renamed_cop.rb
|
214
|
+
- lib/rubocop/config_obsoletion/rule.rb
|
215
|
+
- lib/rubocop/config_obsoletion/split_cop.rb
|
206
216
|
- lib/rubocop/config_regeneration.rb
|
207
217
|
- lib/rubocop/config_store.rb
|
208
218
|
- lib/rubocop/config_validator.rb
|
@@ -248,6 +258,7 @@ files:
|
|
248
258
|
- lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
|
249
259
|
- lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
|
250
260
|
- lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
|
261
|
+
- lib/rubocop/cop/internal_affairs/style_detected_api_use.rb
|
251
262
|
- lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
|
252
263
|
- lib/rubocop/cop/layout/access_modifier_indentation.rb
|
253
264
|
- lib/rubocop/cop/layout/argument_alignment.rb
|
@@ -325,6 +336,7 @@ files:
|
|
325
336
|
- lib/rubocop/cop/layout/space_around_method_call_operator.rb
|
326
337
|
- lib/rubocop/cop/layout/space_around_operators.rb
|
327
338
|
- lib/rubocop/cop/layout/space_before_block_braces.rb
|
339
|
+
- lib/rubocop/cop/layout/space_before_brackets.rb
|
328
340
|
- lib/rubocop/cop/layout/space_before_comma.rb
|
329
341
|
- lib/rubocop/cop/layout/space_before_comment.rb
|
330
342
|
- lib/rubocop/cop/layout/space_before_first_arg.rb
|
@@ -343,6 +355,7 @@ files:
|
|
343
355
|
- lib/rubocop/cop/layout/trailing_whitespace.rb
|
344
356
|
- lib/rubocop/cop/legacy/corrections_proxy.rb
|
345
357
|
- lib/rubocop/cop/legacy/corrector.rb
|
358
|
+
- lib/rubocop/cop/lint/ambiguous_assignment.rb
|
346
359
|
- lib/rubocop/cop/lint/ambiguous_block_association.rb
|
347
360
|
- lib/rubocop/cop/lint/ambiguous_operator.rb
|
348
361
|
- lib/rubocop/cop/lint/ambiguous_regexp_literal.rb
|
@@ -355,6 +368,7 @@ files:
|
|
355
368
|
- lib/rubocop/cop/lint/constant_resolution.rb
|
356
369
|
- lib/rubocop/cop/lint/debugger.rb
|
357
370
|
- lib/rubocop/cop/lint/deprecated_class_methods.rb
|
371
|
+
- lib/rubocop/cop/lint/deprecated_constants.rb
|
358
372
|
- lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb
|
359
373
|
- lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
|
360
374
|
- lib/rubocop/cop/lint/duplicate_branch.rb
|
@@ -388,6 +402,7 @@ files:
|
|
388
402
|
- lib/rubocop/cop/lint/ineffective_access_modifier.rb
|
389
403
|
- lib/rubocop/cop/lint/inherit_exception.rb
|
390
404
|
- lib/rubocop/cop/lint/interpolation_check.rb
|
405
|
+
- lib/rubocop/cop/lint/lambda_without_literal_block.rb
|
391
406
|
- lib/rubocop/cop/lint/literal_as_condition.rb
|
392
407
|
- lib/rubocop/cop/lint/literal_in_interpolation.rb
|
393
408
|
- lib/rubocop/cop/lint/loop.rb
|
@@ -411,6 +426,7 @@ files:
|
|
411
426
|
- lib/rubocop/cop/lint/rand_one.rb
|
412
427
|
- lib/rubocop/cop/lint/redundant_cop_disable_directive.rb
|
413
428
|
- lib/rubocop/cop/lint/redundant_cop_enable_directive.rb
|
429
|
+
- lib/rubocop/cop/lint/redundant_dir_glob_sort.rb
|
414
430
|
- lib/rubocop/cop/lint/redundant_require_statement.rb
|
415
431
|
- lib/rubocop/cop/lint/redundant_safe_navigation.rb
|
416
432
|
- lib/rubocop/cop/lint/redundant_splat_expansion.rb
|
@@ -472,6 +488,7 @@ files:
|
|
472
488
|
- lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb
|
473
489
|
- lib/rubocop/cop/migration/department_name.rb
|
474
490
|
- lib/rubocop/cop/mixin/alignment.rb
|
491
|
+
- lib/rubocop/cop/mixin/allowed_identifiers.rb
|
475
492
|
- lib/rubocop/cop/mixin/allowed_methods.rb
|
476
493
|
- lib/rubocop/cop/mixin/annotation_comment.rb
|
477
494
|
- lib/rubocop/cop/mixin/array_min_size.rb
|
@@ -614,6 +631,7 @@ files:
|
|
614
631
|
- lib/rubocop/cop/style/empty_method.rb
|
615
632
|
- lib/rubocop/cop/style/encoding.rb
|
616
633
|
- lib/rubocop/cop/style/end_block.rb
|
634
|
+
- lib/rubocop/cop/style/endless_method.rb
|
617
635
|
- lib/rubocop/cop/style/eval_with_location.rb
|
618
636
|
- lib/rubocop/cop/style/even_odd.rb
|
619
637
|
- lib/rubocop/cop/style/expand_path_arguments.rb
|
@@ -629,6 +647,7 @@ files:
|
|
629
647
|
- lib/rubocop/cop/style/guard_clause.rb
|
630
648
|
- lib/rubocop/cop/style/hash_as_last_array_item.rb
|
631
649
|
- lib/rubocop/cop/style/hash_each_methods.rb
|
650
|
+
- lib/rubocop/cop/style/hash_except.rb
|
632
651
|
- lib/rubocop/cop/style/hash_like_case.rb
|
633
652
|
- lib/rubocop/cop/style/hash_syntax.rb
|
634
653
|
- lib/rubocop/cop/style/hash_transform_keys.rb
|
@@ -808,6 +827,7 @@ files:
|
|
808
827
|
- lib/rubocop/formatter/tap_formatter.rb
|
809
828
|
- lib/rubocop/formatter/text_util.rb
|
810
829
|
- lib/rubocop/formatter/worst_offenders_formatter.rb
|
830
|
+
- lib/rubocop/lockfile.rb
|
811
831
|
- lib/rubocop/magic_comment.rb
|
812
832
|
- lib/rubocop/name_similarity.rb
|
813
833
|
- lib/rubocop/options.rb
|
@@ -825,6 +845,7 @@ files:
|
|
825
845
|
- lib/rubocop/string_interpreter.rb
|
826
846
|
- lib/rubocop/target_finder.rb
|
827
847
|
- lib/rubocop/target_ruby.rb
|
848
|
+
- lib/rubocop/util.rb
|
828
849
|
- lib/rubocop/version.rb
|
829
850
|
- lib/rubocop/warning.rb
|
830
851
|
- lib/rubocop/yaml_duplication_checker.rb
|
@@ -835,7 +856,7 @@ metadata:
|
|
835
856
|
homepage_uri: https://rubocop.org/
|
836
857
|
changelog_uri: https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md
|
837
858
|
source_code_uri: https://github.com/rubocop-hq/rubocop/
|
838
|
-
documentation_uri: https://docs.rubocop.org/rubocop/1.
|
859
|
+
documentation_uri: https://docs.rubocop.org/rubocop/1.8/
|
839
860
|
bug_tracker_uri: https://github.com/rubocop-hq/rubocop/issues
|
840
861
|
post_install_message:
|
841
862
|
rdoc_options: []
|