rubocop 1.36.0 → 1.40.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 +1 -1
- data/config/default.yml +78 -12
- data/exe/rubocop +1 -1
- data/lib/rubocop/arguments_env.rb +17 -0
- data/lib/rubocop/arguments_file.rb +17 -0
- data/lib/rubocop/cli/command/execute_runner.rb +7 -7
- data/lib/rubocop/cli/command/suggest_extensions.rb +8 -1
- data/lib/rubocop/comment_config.rb +41 -1
- data/lib/rubocop/config.rb +5 -4
- data/lib/rubocop/config_loader.rb +5 -5
- data/lib/rubocop/config_loader_resolver.rb +1 -1
- data/lib/rubocop/cop/base.rb +2 -9
- data/lib/rubocop/cop/commissioner.rb +3 -1
- data/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +22 -6
- data/lib/rubocop/cop/generator.rb +1 -2
- data/lib/rubocop/cop/internal_affairs/create_empty_file.rb +37 -0
- data/lib/rubocop/cop/internal_affairs/example_heredoc_delimiter.rb +111 -0
- data/lib/rubocop/cop/internal_affairs/lambda_or_proc.rb +46 -0
- data/lib/rubocop/cop/internal_affairs.rb +3 -0
- data/lib/rubocop/cop/layout/first_argument_indentation.rb +1 -0
- data/lib/rubocop/cop/layout/indentation_style.rb +1 -1
- data/lib/rubocop/cop/layout/indentation_width.rb +1 -1
- data/lib/rubocop/cop/layout/line_continuation_leading_space.rb +29 -8
- data/lib/rubocop/cop/layout/line_continuation_spacing.rb +1 -1
- data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +13 -9
- data/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +3 -0
- data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +30 -3
- data/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +34 -0
- data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +6 -2
- data/lib/rubocop/cop/lint/ambiguous_block_association.rb +2 -2
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +11 -1
- data/lib/rubocop/cop/lint/deprecated_constants.rb +8 -1
- data/lib/rubocop/cop/lint/duplicate_magic_comment.rb +73 -0
- data/lib/rubocop/cop/lint/duplicate_methods.rb +28 -9
- data/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +25 -6
- data/lib/rubocop/cop/lint/empty_block.rb +1 -5
- data/lib/rubocop/cop/lint/empty_class.rb +3 -1
- data/lib/rubocop/cop/lint/empty_conditional_body.rb +21 -9
- data/lib/rubocop/cop/lint/interpolation_check.rb +4 -3
- data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +18 -3
- data/lib/rubocop/cop/lint/nested_method_definition.rb +50 -1
- data/lib/rubocop/cop/lint/number_conversion.rb +1 -1
- data/lib/rubocop/cop/lint/ordered_magic_comments.rb +4 -5
- data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +1 -1
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +5 -0
- data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +36 -4
- data/lib/rubocop/cop/lint/redundant_dir_glob_sort.rb +7 -0
- data/lib/rubocop/cop/lint/redundant_require_statement.rb +38 -10
- data/lib/rubocop/cop/lint/require_parentheses.rb +1 -1
- data/lib/rubocop/cop/lint/safe_navigation_chain.rb +18 -8
- data/lib/rubocop/cop/lint/send_with_mixin_argument.rb +5 -4
- data/lib/rubocop/cop/lint/shadowed_exception.rb +0 -10
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +7 -3
- data/lib/rubocop/cop/lint/suppressed_exception.rb +1 -1
- data/lib/rubocop/cop/lint/unreachable_loop.rb +1 -1
- data/lib/rubocop/cop/lint/unused_method_argument.rb +4 -0
- data/lib/rubocop/cop/lint/void.rb +6 -6
- data/lib/rubocop/cop/metrics/abc_size.rb +1 -1
- data/lib/rubocop/cop/metrics/block_length.rb +9 -4
- data/lib/rubocop/cop/metrics/class_length.rb +9 -4
- data/lib/rubocop/cop/metrics/method_length.rb +9 -4
- data/lib/rubocop/cop/metrics/module_length.rb +9 -4
- data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +5 -2
- data/lib/rubocop/cop/mixin/comments_help.rb +12 -0
- data/lib/rubocop/cop/mixin/frozen_string_literal.rb +4 -0
- data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +30 -8
- data/lib/rubocop/cop/mixin/range_help.rb +23 -0
- data/lib/rubocop/cop/mixin/rescue_node.rb +3 -1
- data/lib/rubocop/cop/mixin/statement_modifier.rb +15 -1
- data/lib/rubocop/cop/mixin/surrounding_space.rb +10 -8
- data/lib/rubocop/cop/mixin/visibility_help.rb +40 -5
- data/lib/rubocop/cop/naming/inclusive_language.rb +1 -1
- data/lib/rubocop/cop/registry.rb +32 -14
- data/lib/rubocop/cop/style/access_modifier_declarations.rb +5 -7
- data/lib/rubocop/cop/style/accessor_grouping.rb +7 -3
- data/lib/rubocop/cop/style/array_intersect.rb +111 -0
- data/lib/rubocop/cop/style/block_delimiters.rb +2 -2
- data/lib/rubocop/cop/style/character_literal.rb +1 -1
- data/lib/rubocop/cop/style/class_equality_comparison.rb +8 -6
- data/lib/rubocop/cop/style/collection_compact.rb +12 -3
- data/lib/rubocop/cop/style/empty_method.rb +1 -1
- data/lib/rubocop/cop/style/endless_method.rb +1 -1
- data/lib/rubocop/cop/style/explicit_block_argument.rb +4 -0
- data/lib/rubocop/cop/style/format_string_token.rb +1 -1
- data/lib/rubocop/cop/style/guard_clause.rb +90 -22
- data/lib/rubocop/cop/style/hash_as_last_array_item.rb +1 -0
- data/lib/rubocop/cop/style/hash_each_methods.rb +32 -10
- data/lib/rubocop/cop/style/hash_except.rb +4 -0
- data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
- data/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +25 -2
- data/lib/rubocop/cop/style/if_with_semicolon.rb +2 -1
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +13 -2
- data/lib/rubocop/cop/style/module_function.rb +28 -6
- data/lib/rubocop/cop/style/negated_if_else_condition.rb +7 -1
- data/lib/rubocop/cop/style/nil_lambda.rb +1 -1
- data/lib/rubocop/cop/style/numeric_predicate.rb +1 -1
- data/lib/rubocop/cop/style/object_then.rb +3 -0
- data/lib/rubocop/cop/style/operator_method_call.rb +53 -0
- data/lib/rubocop/cop/style/quoted_symbols.rb +1 -1
- data/lib/rubocop/cop/style/redundant_argument.rb +3 -0
- data/lib/rubocop/cop/style/redundant_begin.rb +1 -0
- data/lib/rubocop/cop/style/redundant_condition.rb +5 -2
- data/lib/rubocop/cop/style/redundant_constant_base.rb +72 -0
- data/lib/rubocop/cop/style/redundant_each.rb +116 -0
- data/lib/rubocop/cop/style/redundant_initialize.rb +3 -1
- data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +8 -1
- data/lib/rubocop/cop/style/redundant_regexp_escape.rb +12 -3
- data/lib/rubocop/cop/style/redundant_return.rb +7 -0
- data/lib/rubocop/cop/style/redundant_sort.rb +1 -1
- data/lib/rubocop/cop/style/redundant_string_escape.rb +181 -0
- data/lib/rubocop/cop/style/require_order.rb +88 -0
- data/lib/rubocop/cop/style/rescue_modifier.rb +1 -1
- data/lib/rubocop/cop/style/safe_navigation.rb +35 -6
- data/lib/rubocop/cop/style/select_by_regexp.rb +8 -4
- data/lib/rubocop/cop/style/static_class.rb +32 -1
- data/lib/rubocop/cop/style/string_literals.rb +1 -5
- data/lib/rubocop/cop/style/symbol_array.rb +2 -0
- data/lib/rubocop/cop/style/symbol_proc.rb +3 -5
- data/lib/rubocop/cop/style/word_array.rb +2 -0
- data/lib/rubocop/cop/team.rb +4 -5
- data/lib/rubocop/cop/util.rb +2 -2
- data/lib/rubocop/cop/variable_force/assignment.rb +1 -1
- data/lib/rubocop/cop/variable_force/variable_table.rb +1 -1
- data/lib/rubocop/cop/variable_force.rb +20 -29
- data/lib/rubocop/cops_documentation_generator.rb +2 -1
- data/lib/rubocop/ext/processed_source.rb +2 -0
- data/lib/rubocop/formatter/disabled_config_formatter.rb +25 -8
- data/lib/rubocop/formatter/html_formatter.rb +1 -1
- data/lib/rubocop/formatter/offense_count_formatter.rb +8 -5
- data/lib/rubocop/formatter/worst_offenders_formatter.rb +6 -3
- data/lib/rubocop/formatter.rb +3 -1
- data/lib/rubocop/optimized_patterns.rb +38 -0
- data/lib/rubocop/options.rb +28 -16
- data/lib/rubocop/path_util.rb +14 -2
- data/lib/rubocop/result_cache.rb +1 -1
- data/lib/rubocop/rspec/cop_helper.rb +24 -1
- data/lib/rubocop/rspec/shared_contexts.rb +14 -1
- data/lib/rubocop/rspec/support.rb +2 -2
- data/lib/rubocop/runner.rb +15 -11
- data/lib/rubocop/server/cache.rb +5 -1
- data/lib/rubocop/server/cli.rb +9 -2
- data/lib/rubocop/server/client_command/exec.rb +5 -0
- data/lib/rubocop/server/core.rb +19 -2
- data/lib/rubocop/server/socket_reader.rb +5 -1
- data/lib/rubocop/server.rb +1 -1
- data/lib/rubocop/target_ruby.rb +1 -1
- data/lib/rubocop/version.rb +8 -3
- data/lib/rubocop.rb +18 -6
- metadata +18 -5
data/lib/rubocop/server/core.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'socket'
|
4
3
|
require 'securerandom'
|
4
|
+
require 'socket'
|
5
5
|
|
6
6
|
#
|
7
7
|
# This code is based on https://github.com/fohte/rubocop-daemon.
|
@@ -17,6 +17,8 @@ module RuboCop
|
|
17
17
|
# The core of server process. It starts TCP server and perform socket communication.
|
18
18
|
# @api private
|
19
19
|
class Core
|
20
|
+
JSON_FORMATS = %w[json j].freeze
|
21
|
+
|
20
22
|
def self.token
|
21
23
|
@token ||= SecureRandom.hex(4)
|
22
24
|
end
|
@@ -41,6 +43,7 @@ module RuboCop
|
|
41
43
|
|
42
44
|
pid = fork do
|
43
45
|
Process.daemon(true)
|
46
|
+
$stderr.reopen(Cache.stderr_path, 'w')
|
44
47
|
Cache.write_pid_file do
|
45
48
|
read_socket(@server.accept) until @server.closed?
|
46
49
|
end
|
@@ -56,7 +59,12 @@ module RuboCop
|
|
56
59
|
def start_server(host, port)
|
57
60
|
@server = TCPServer.open(host, port)
|
58
61
|
|
59
|
-
|
62
|
+
# JSON format does not expected output message when IDE integration with server mode.
|
63
|
+
# See: https://github.com/rubocop/rubocop/issues/11164
|
64
|
+
return if use_json_format?
|
65
|
+
|
66
|
+
output_stream = ARGV.include?('--stderr') ? $stderr : $stdout
|
67
|
+
output_stream.puts "RuboCop server starting on #{@server.addr[3]}:#{@server.addr[1]}."
|
60
68
|
end
|
61
69
|
|
62
70
|
def read_socket(socket)
|
@@ -74,6 +82,15 @@ module RuboCop
|
|
74
82
|
ensure
|
75
83
|
socket.close
|
76
84
|
end
|
85
|
+
|
86
|
+
def use_json_format?
|
87
|
+
return true if ARGV.include?('--format=json') || ARGV.include?('--format=j')
|
88
|
+
return false unless (index = ARGV.index('--format'))
|
89
|
+
|
90
|
+
format = ARGV[index + 1]
|
91
|
+
|
92
|
+
JSON_FORMATS.include?(format)
|
93
|
+
end
|
77
94
|
end
|
78
95
|
end
|
79
96
|
end
|
@@ -24,13 +24,17 @@ module RuboCop
|
|
24
24
|
def read!
|
25
25
|
request = parse_request(@socket.read)
|
26
26
|
|
27
|
+
stderr = StringIO.new
|
27
28
|
Helper.redirect(
|
28
29
|
stdin: StringIO.new(request.body),
|
29
30
|
stdout: @socket,
|
30
|
-
stderr:
|
31
|
+
stderr: stderr
|
31
32
|
) do
|
32
33
|
create_command_instance(request).run
|
33
34
|
end
|
35
|
+
ensure
|
36
|
+
Cache.stderr_path.write(stderr.string)
|
37
|
+
@socket.close
|
34
38
|
end
|
35
39
|
|
36
40
|
private
|
data/lib/rubocop/server.rb
CHANGED
data/lib/rubocop/target_ruby.rb
CHANGED
@@ -84,7 +84,7 @@ module RuboCop
|
|
84
84
|
# @api private
|
85
85
|
class ToolVersionsFile < RubyVersionFile
|
86
86
|
TOOL_VERSIONS_FILENAME = '.tool-versions'
|
87
|
-
TOOL_VERSIONS_PATTERN =
|
87
|
+
TOOL_VERSIONS_PATTERN = /^(?:ruby )(?<version>\d+\.\d+)/.freeze
|
88
88
|
|
89
89
|
def name
|
90
90
|
"`#{TOOL_VERSIONS_FILENAME}`"
|
data/lib/rubocop/version.rb
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
module RuboCop
|
4
4
|
# This module holds the RuboCop version information.
|
5
5
|
module Version
|
6
|
-
STRING = '1.
|
6
|
+
STRING = '1.40.0'
|
7
7
|
|
8
8
|
MSG = '%<version>s (using Parser %<parser_version>s, ' \
|
9
9
|
'rubocop-ast %<rubocop_ast_version>s, ' \
|
10
|
-
'running on %<ruby_engine>s %<ruby_version>s)%<
|
10
|
+
'running on %<ruby_engine>s %<ruby_version>s)%<server_mode>s [%<ruby_platform>s]'
|
11
11
|
|
12
12
|
CANONICAL_FEATURE_NAMES = { 'Rspec' => 'RSpec', 'Graphql' => 'GraphQL', 'Md' => 'Markdown',
|
13
13
|
'Thread_safety' => 'ThreadSafety' }.freeze
|
@@ -19,7 +19,7 @@ module RuboCop
|
|
19
19
|
verbose_version = format(MSG, version: STRING, parser_version: Parser::VERSION,
|
20
20
|
rubocop_ast_version: RuboCop::AST::Version::STRING,
|
21
21
|
ruby_engine: RUBY_ENGINE, ruby_version: RUBY_VERSION,
|
22
|
-
|
22
|
+
server_mode: server_mode,
|
23
23
|
ruby_platform: RUBY_PLATFORM)
|
24
24
|
return verbose_version unless env
|
25
25
|
|
@@ -89,5 +89,10 @@ module RuboCop
|
|
89
89
|
def self.document_version
|
90
90
|
STRING.match('\d+\.\d+').to_s
|
91
91
|
end
|
92
|
+
|
93
|
+
# @api private
|
94
|
+
def self.server_mode
|
95
|
+
RuboCop.const_defined?(:Server) && Server.running? ? ' +server' : ''
|
96
|
+
end
|
92
97
|
end
|
93
98
|
end
|
data/lib/rubocop.rb
CHANGED
@@ -4,9 +4,9 @@ require 'English'
|
|
4
4
|
before_us = $LOADED_FEATURES.dup
|
5
5
|
require 'rainbow'
|
6
6
|
|
7
|
-
require 'set'
|
8
7
|
require 'forwardable'
|
9
8
|
require 'regexp_parser'
|
9
|
+
require 'set'
|
10
10
|
require 'unicode/display_width'
|
11
11
|
|
12
12
|
# we have to require RuboCop's version, before rubocop-ast's
|
@@ -14,21 +14,24 @@ require_relative 'rubocop/version'
|
|
14
14
|
require 'rubocop-ast'
|
15
15
|
|
16
16
|
require_relative 'rubocop/ast_aliases'
|
17
|
+
require_relative 'rubocop/ext/range'
|
17
18
|
require_relative 'rubocop/ext/regexp_node'
|
18
19
|
require_relative 'rubocop/ext/regexp_parser'
|
19
|
-
require_relative 'rubocop/ext/range'
|
20
20
|
|
21
21
|
require_relative 'rubocop/core_ext/string'
|
22
22
|
require_relative 'rubocop/ext/processed_source'
|
23
23
|
|
24
|
-
require_relative 'rubocop/
|
24
|
+
require_relative 'rubocop/error'
|
25
25
|
require_relative 'rubocop/file_finder'
|
26
|
-
require_relative 'rubocop/platform'
|
27
26
|
require_relative 'rubocop/name_similarity'
|
27
|
+
require_relative 'rubocop/optimized_patterns'
|
28
|
+
require_relative 'rubocop/path_util'
|
29
|
+
require_relative 'rubocop/platform'
|
28
30
|
require_relative 'rubocop/string_interpreter'
|
29
|
-
require_relative 'rubocop/error'
|
30
|
-
require_relative 'rubocop/warning'
|
31
31
|
require_relative 'rubocop/util'
|
32
|
+
require_relative 'rubocop/warning'
|
33
|
+
|
34
|
+
# rubocop:disable Style/RequireOrder
|
32
35
|
|
33
36
|
require_relative 'rubocop/cop/util'
|
34
37
|
require_relative 'rubocop/cop/offense'
|
@@ -292,6 +295,7 @@ require_relative 'rubocop/cop/lint/duplicate_branch'
|
|
292
295
|
require_relative 'rubocop/cop/lint/duplicate_case_condition'
|
293
296
|
require_relative 'rubocop/cop/lint/duplicate_elsif_condition'
|
294
297
|
require_relative 'rubocop/cop/lint/duplicate_hash_key'
|
298
|
+
require_relative 'rubocop/cop/lint/duplicate_magic_comment'
|
295
299
|
require_relative 'rubocop/cop/lint/duplicate_methods'
|
296
300
|
require_relative 'rubocop/cop/lint/duplicate_regexp_character_class_element'
|
297
301
|
require_relative 'rubocop/cop/lint/duplicate_require'
|
@@ -439,6 +443,7 @@ require_relative 'rubocop/cop/style/alias'
|
|
439
443
|
require_relative 'rubocop/cop/style/and_or'
|
440
444
|
require_relative 'rubocop/cop/style/arguments_forwarding'
|
441
445
|
require_relative 'rubocop/cop/style/array_coercion'
|
446
|
+
require_relative 'rubocop/cop/style/array_intersect'
|
442
447
|
require_relative 'rubocop/cop/style/array_join'
|
443
448
|
require_relative 'rubocop/cop/style/ascii_comments'
|
444
449
|
require_relative 'rubocop/cop/style/attr'
|
@@ -537,12 +542,16 @@ require_relative 'rubocop/cop/style/method_call_with_args_parentheses'
|
|
537
542
|
require_relative 'rubocop/cop/style/multiline_in_pattern_then'
|
538
543
|
require_relative 'rubocop/cop/style/numbered_parameters'
|
539
544
|
require_relative 'rubocop/cop/style/open_struct_use'
|
545
|
+
require_relative 'rubocop/cop/style/operator_method_call'
|
540
546
|
require_relative 'rubocop/cop/style/redundant_assignment'
|
547
|
+
require_relative 'rubocop/cop/style/redundant_constant_base'
|
548
|
+
require_relative 'rubocop/cop/style/redundant_each'
|
541
549
|
require_relative 'rubocop/cop/style/redundant_fetch_block'
|
542
550
|
require_relative 'rubocop/cop/style/redundant_file_extension_in_require'
|
543
551
|
require_relative 'rubocop/cop/style/redundant_initialize'
|
544
552
|
require_relative 'rubocop/cop/style/redundant_self_assignment'
|
545
553
|
require_relative 'rubocop/cop/style/redundant_self_assignment_branch'
|
554
|
+
require_relative 'rubocop/cop/style/require_order'
|
546
555
|
require_relative 'rubocop/cop/style/sole_nested_conditional'
|
547
556
|
require_relative 'rubocop/cop/style/static_class'
|
548
557
|
require_relative 'rubocop/cop/style/map_compact_with_conditional_block'
|
@@ -612,6 +621,7 @@ require_relative 'rubocop/cop/style/redundant_return'
|
|
612
621
|
require_relative 'rubocop/cop/style/redundant_self'
|
613
622
|
require_relative 'rubocop/cop/style/redundant_sort'
|
614
623
|
require_relative 'rubocop/cop/style/redundant_sort_by'
|
624
|
+
require_relative 'rubocop/cop/style/redundant_string_escape'
|
615
625
|
require_relative 'rubocop/cop/style/regexp_literal'
|
616
626
|
require_relative 'rubocop/cop/style/rescue_modifier'
|
617
627
|
require_relative 'rubocop/cop/style/rescue_standard_error'
|
@@ -716,6 +726,8 @@ require_relative 'rubocop/remote_config'
|
|
716
726
|
require_relative 'rubocop/target_ruby'
|
717
727
|
require_relative 'rubocop/yaml_duplication_checker'
|
718
728
|
|
729
|
+
# rubocop:enable Style/RequireOrder
|
730
|
+
|
719
731
|
unless File.exist?("#{__dir__}/../rubocop.gemspec") # Check if we are a gem
|
720
732
|
RuboCop::ResultCache.rubocop_required_features = $LOADED_FEATURES - before_us
|
721
733
|
end
|
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.40.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: 2022-
|
13
|
+
date: 2022-12-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 1.
|
123
|
+
version: 1.23.0
|
124
124
|
- - "<"
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '2.0'
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1.
|
133
|
+
version: 1.23.0
|
134
134
|
- - "<"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '2.0'
|
@@ -207,6 +207,8 @@ files:
|
|
207
207
|
- config/obsoletion.yml
|
208
208
|
- exe/rubocop
|
209
209
|
- lib/rubocop.rb
|
210
|
+
- lib/rubocop/arguments_env.rb
|
211
|
+
- lib/rubocop/arguments_file.rb
|
210
212
|
- lib/rubocop/ast_aliases.rb
|
211
213
|
- lib/rubocop/cache_config.rb
|
212
214
|
- lib/rubocop/cached_data.rb
|
@@ -284,9 +286,12 @@ files:
|
|
284
286
|
- lib/rubocop/cop/ignored_node.rb
|
285
287
|
- lib/rubocop/cop/internal_affairs.rb
|
286
288
|
- lib/rubocop/cop/internal_affairs/cop_description.rb
|
289
|
+
- lib/rubocop/cop/internal_affairs/create_empty_file.rb
|
287
290
|
- lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb
|
288
291
|
- lib/rubocop/cop/internal_affairs/example_description.rb
|
292
|
+
- lib/rubocop/cop/internal_affairs/example_heredoc_delimiter.rb
|
289
293
|
- lib/rubocop/cop/internal_affairs/inherit_deprecated_cop_class.rb
|
294
|
+
- lib/rubocop/cop/internal_affairs/lambda_or_proc.rb
|
290
295
|
- lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb
|
291
296
|
- lib/rubocop/cop/internal_affairs/method_name_end_with.rb
|
292
297
|
- lib/rubocop/cop/internal_affairs/method_name_equal.rb
|
@@ -430,6 +435,7 @@ files:
|
|
430
435
|
- lib/rubocop/cop/lint/duplicate_case_condition.rb
|
431
436
|
- lib/rubocop/cop/lint/duplicate_elsif_condition.rb
|
432
437
|
- lib/rubocop/cop/lint/duplicate_hash_key.rb
|
438
|
+
- lib/rubocop/cop/lint/duplicate_magic_comment.rb
|
433
439
|
- lib/rubocop/cop/lint/duplicate_methods.rb
|
434
440
|
- lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb
|
435
441
|
- lib/rubocop/cop/lint/duplicate_require.rb
|
@@ -657,6 +663,7 @@ files:
|
|
657
663
|
- lib/rubocop/cop/style/and_or.rb
|
658
664
|
- lib/rubocop/cop/style/arguments_forwarding.rb
|
659
665
|
- lib/rubocop/cop/style/array_coercion.rb
|
666
|
+
- lib/rubocop/cop/style/array_intersect.rb
|
660
667
|
- lib/rubocop/cop/style/array_join.rb
|
661
668
|
- lib/rubocop/cop/style/ascii_comments.rb
|
662
669
|
- lib/rubocop/cop/style/attr.rb
|
@@ -795,6 +802,7 @@ files:
|
|
795
802
|
- lib/rubocop/cop/style/object_then.rb
|
796
803
|
- lib/rubocop/cop/style/one_line_conditional.rb
|
797
804
|
- lib/rubocop/cop/style/open_struct_use.rb
|
805
|
+
- lib/rubocop/cop/style/operator_method_call.rb
|
798
806
|
- lib/rubocop/cop/style/option_hash.rb
|
799
807
|
- lib/rubocop/cop/style/optional_arguments.rb
|
800
808
|
- lib/rubocop/cop/style/optional_boolean_parameter.rb
|
@@ -815,6 +823,8 @@ files:
|
|
815
823
|
- lib/rubocop/cop/style/redundant_capital_w.rb
|
816
824
|
- lib/rubocop/cop/style/redundant_condition.rb
|
817
825
|
- lib/rubocop/cop/style/redundant_conditional.rb
|
826
|
+
- lib/rubocop/cop/style/redundant_constant_base.rb
|
827
|
+
- lib/rubocop/cop/style/redundant_each.rb
|
818
828
|
- lib/rubocop/cop/style/redundant_exception.rb
|
819
829
|
- lib/rubocop/cop/style/redundant_fetch_block.rb
|
820
830
|
- lib/rubocop/cop/style/redundant_file_extension_in_require.rb
|
@@ -831,7 +841,9 @@ files:
|
|
831
841
|
- lib/rubocop/cop/style/redundant_self_assignment_branch.rb
|
832
842
|
- lib/rubocop/cop/style/redundant_sort.rb
|
833
843
|
- lib/rubocop/cop/style/redundant_sort_by.rb
|
844
|
+
- lib/rubocop/cop/style/redundant_string_escape.rb
|
834
845
|
- lib/rubocop/cop/style/regexp_literal.rb
|
846
|
+
- lib/rubocop/cop/style/require_order.rb
|
835
847
|
- lib/rubocop/cop/style/rescue_modifier.rb
|
836
848
|
- lib/rubocop/cop/style/rescue_standard_error.rb
|
837
849
|
- lib/rubocop/cop/style/return_nil.rb
|
@@ -932,6 +944,7 @@ files:
|
|
932
944
|
- lib/rubocop/lockfile.rb
|
933
945
|
- lib/rubocop/magic_comment.rb
|
934
946
|
- lib/rubocop/name_similarity.rb
|
947
|
+
- lib/rubocop/optimized_patterns.rb
|
935
948
|
- lib/rubocop/options.rb
|
936
949
|
- lib/rubocop/path_util.rb
|
937
950
|
- lib/rubocop/platform.rb
|
@@ -977,7 +990,7 @@ metadata:
|
|
977
990
|
homepage_uri: https://rubocop.org/
|
978
991
|
changelog_uri: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
|
979
992
|
source_code_uri: https://github.com/rubocop/rubocop/
|
980
|
-
documentation_uri: https://docs.rubocop.org/rubocop/1.
|
993
|
+
documentation_uri: https://docs.rubocop.org/rubocop/1.40/
|
981
994
|
bug_tracker_uri: https://github.com/rubocop/rubocop/issues
|
982
995
|
rubygems_mfa_required: 'true'
|
983
996
|
post_install_message:
|