rubocop 0.93.1 → 1.6.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/README.md +36 -16
- data/config/default.yml +276 -82
- data/config/obsoletion.yml +196 -0
- data/exe/rubocop +1 -1
- data/lib/rubocop.rb +31 -2
- data/lib/rubocop/cli.rb +5 -1
- data/lib/rubocop/cli/command/auto_genenerate_config.rb +1 -1
- data/lib/rubocop/cli/command/execute_runner.rb +26 -11
- data/lib/rubocop/cli/command/suggest_extensions.rb +80 -0
- data/lib/rubocop/cli/command/version.rb +1 -1
- data/lib/rubocop/comment_config.rb +1 -1
- data/lib/rubocop/config.rb +4 -0
- data/lib/rubocop/config_loader.rb +34 -8
- data/lib/rubocop/config_loader_resolver.rb +12 -6
- data/lib/rubocop/config_obsoletion.rb +65 -247
- 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_regeneration.rb +1 -1
- data/lib/rubocop/config_validator.rb +25 -10
- data/lib/rubocop/cop/autocorrect_logic.rb +21 -6
- data/lib/rubocop/cop/badge.rb +9 -24
- data/lib/rubocop/cop/base.rb +33 -16
- data/lib/rubocop/cop/bundler/duplicated_gem.rb +26 -6
- data/lib/rubocop/cop/bundler/gem_comment.rb +1 -1
- data/lib/rubocop/cop/commissioner.rb +37 -23
- data/lib/rubocop/cop/cop.rb +2 -2
- data/lib/rubocop/cop/corrector.rb +3 -1
- data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +2 -2
- data/lib/rubocop/cop/correctors/string_literal_corrector.rb +6 -8
- data/lib/rubocop/cop/force.rb +1 -1
- data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +3 -3
- data/lib/rubocop/cop/gemspec/required_ruby_version.rb +4 -5
- data/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +1 -1
- data/lib/rubocop/cop/generator.rb +3 -10
- data/lib/rubocop/cop/generator/configuration_injector.rb +1 -1
- data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +1 -1
- data/lib/rubocop/cop/layout/block_alignment.rb +3 -4
- data/lib/rubocop/cop/layout/class_structure.rb +22 -3
- data/lib/rubocop/cop/layout/def_end_alignment.rb +1 -1
- data/lib/rubocop/cop/layout/else_alignment.rb +15 -2
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +80 -10
- data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +1 -0
- data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +6 -1
- data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +1 -1
- data/lib/rubocop/cop/layout/end_alignment.rb +3 -3
- data/lib/rubocop/cop/layout/end_of_line.rb +5 -5
- data/lib/rubocop/cop/layout/extra_spacing.rb +1 -2
- data/lib/rubocop/cop/layout/first_argument_indentation.rb +7 -2
- data/lib/rubocop/cop/layout/hash_alignment.rb +4 -4
- data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +12 -0
- data/lib/rubocop/cop/layout/line_length.rb +10 -13
- data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +7 -3
- data/lib/rubocop/cop/layout/space_around_block_parameters.rb +24 -18
- data/lib/rubocop/cop/layout/space_around_method_call_operator.rb +1 -1
- data/lib/rubocop/cop/layout/space_around_operators.rb +4 -1
- data/lib/rubocop/cop/layout/space_inside_parens.rb +35 -13
- data/lib/rubocop/cop/layout/trailing_whitespace.rb +37 -13
- data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +2 -1
- data/lib/rubocop/cop/lint/constant_definition_in_block.rb +26 -2
- data/lib/rubocop/cop/lint/debugger.rb +17 -28
- data/lib/rubocop/cop/lint/duplicate_branch.rb +93 -0
- data/lib/rubocop/cop/lint/duplicate_case_condition.rb +2 -12
- data/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +77 -0
- data/lib/rubocop/cop/lint/else_layout.rb +29 -3
- data/lib/rubocop/cop/lint/empty_block.rb +82 -0
- data/lib/rubocop/cop/lint/empty_class.rb +93 -0
- data/lib/rubocop/cop/lint/flip_flop.rb +8 -2
- data/lib/rubocop/cop/lint/interpolation_check.rb +7 -2
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +39 -7
- data/lib/rubocop/cop/lint/loop.rb +4 -4
- data/lib/rubocop/cop/lint/missing_super.rb +7 -4
- data/lib/rubocop/cop/lint/nested_percent_literal.rb +14 -0
- data/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +58 -0
- data/lib/rubocop/cop/lint/number_conversion.rb +46 -13
- data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +27 -8
- data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +19 -16
- data/lib/rubocop/cop/lint/shadowed_exception.rb +4 -5
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +13 -0
- data/lib/rubocop/cop/lint/to_enum_arguments.rb +86 -0
- data/lib/rubocop/cop/lint/to_json.rb +1 -1
- data/lib/rubocop/cop/lint/unexpected_block_arity.rb +85 -0
- data/lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb +199 -0
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +2 -2
- data/lib/rubocop/cop/lint/useless_method_definition.rb +2 -4
- data/lib/rubocop/cop/lint/useless_setter_call.rb +6 -1
- data/lib/rubocop/cop/metrics/abc_size.rb +25 -1
- data/lib/rubocop/cop/metrics/block_length.rb +13 -7
- data/lib/rubocop/cop/metrics/method_length.rb +7 -2
- data/lib/rubocop/cop/metrics/parameter_lists.rb +68 -2
- data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +20 -10
- data/lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb +146 -0
- data/lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb +6 -1
- data/lib/rubocop/cop/migration/department_name.rb +1 -1
- data/lib/rubocop/cop/mixin/check_line_breakable.rb +1 -1
- data/lib/rubocop/cop/mixin/configurable_numbering.rb +4 -3
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +9 -1
- data/lib/rubocop/cop/mixin/ignored_methods.rb +36 -3
- data/lib/rubocop/cop/mixin/line_length_help.rb +1 -1
- data/lib/rubocop/cop/mixin/method_complexity.rb +6 -0
- data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +1 -1
- data/lib/rubocop/cop/mixin/statement_modifier.rb +9 -4
- data/lib/rubocop/cop/mixin/string_help.rb +4 -1
- data/lib/rubocop/cop/mixin/visibility_help.rb +1 -3
- data/lib/rubocop/cop/naming/accessor_method_name.rb +15 -1
- data/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +12 -2
- data/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +11 -5
- data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +67 -18
- data/lib/rubocop/cop/naming/predicate_name.rb +2 -1
- data/lib/rubocop/cop/naming/variable_number.rb +100 -8
- data/lib/rubocop/cop/offense.rb +3 -3
- data/lib/rubocop/cop/security/open.rb +12 -10
- data/lib/rubocop/cop/style/accessor_grouping.rb +1 -1
- data/lib/rubocop/cop/style/and_or.rb +11 -3
- data/lib/rubocop/cop/style/arguments_forwarding.rb +142 -0
- data/lib/rubocop/cop/style/bisected_attr_accessor.rb +0 -4
- data/lib/rubocop/cop/style/case_like_if.rb +0 -4
- data/lib/rubocop/cop/style/character_literal.rb +10 -11
- data/lib/rubocop/cop/style/class_and_module_children.rb +8 -3
- data/lib/rubocop/cop/style/collection_compact.rb +91 -0
- data/lib/rubocop/cop/style/document_dynamic_eval_definition.rb +169 -0
- data/lib/rubocop/cop/style/documentation.rb +12 -1
- data/lib/rubocop/cop/style/double_negation.rb +6 -1
- data/lib/rubocop/cop/style/float_division.rb +44 -1
- data/lib/rubocop/cop/style/format_string.rb +8 -3
- data/lib/rubocop/cop/style/format_string_token.rb +47 -2
- data/lib/rubocop/cop/style/hash_syntax.rb +3 -3
- data/lib/rubocop/cop/style/identical_conditional_branches.rb +7 -2
- data/lib/rubocop/cop/style/if_inside_else.rb +37 -1
- data/lib/rubocop/cop/style/if_unless_modifier.rb +11 -3
- data/lib/rubocop/cop/style/if_with_semicolon.rb +39 -4
- data/lib/rubocop/cop/style/infinite_loop.rb +4 -0
- data/lib/rubocop/cop/style/ip_addresses.rb +1 -1
- data/lib/rubocop/cop/style/keyword_parameters_order.rb +12 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +10 -13
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +8 -13
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +7 -11
- data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +11 -2
- data/lib/rubocop/cop/style/mixin_grouping.rb +0 -4
- data/lib/rubocop/cop/style/multiple_comparison.rb +55 -7
- data/lib/rubocop/cop/style/negated_if_else_condition.rb +106 -0
- data/lib/rubocop/cop/style/nil_lambda.rb +52 -0
- data/lib/rubocop/cop/style/numeric_literals.rb +14 -11
- data/lib/rubocop/cop/style/perl_backrefs.rb +86 -9
- data/lib/rubocop/cop/style/raise_args.rb +21 -6
- data/lib/rubocop/cop/style/redundant_argument.rb +88 -0
- data/lib/rubocop/cop/style/redundant_condition.rb +2 -1
- data/lib/rubocop/cop/style/redundant_parentheses.rb +4 -0
- data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +7 -1
- data/lib/rubocop/cop/style/redundant_regexp_escape.rb +24 -8
- data/lib/rubocop/cop/style/redundant_self.rb +3 -0
- data/lib/rubocop/cop/style/safe_navigation.rb +16 -4
- data/lib/rubocop/cop/style/semicolon.rb +3 -0
- data/lib/rubocop/cop/style/single_line_block_params.rb +30 -7
- data/lib/rubocop/cop/style/sole_nested_conditional.rb +65 -3
- data/lib/rubocop/cop/style/special_global_vars.rb +1 -13
- data/lib/rubocop/cop/style/static_class.rb +97 -0
- data/lib/rubocop/cop/style/string_concatenation.rb +39 -2
- 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/swap_values.rb +108 -0
- data/lib/rubocop/cop/style/symbol_proc.rb +5 -3
- data/lib/rubocop/cop/style/trailing_underscore_variable.rb +3 -1
- data/lib/rubocop/cop/style/while_until_modifier.rb +9 -0
- data/lib/rubocop/cop/team.rb +6 -1
- data/lib/rubocop/cop/util.rb +6 -2
- data/lib/rubocop/cop/variable_force/branch.rb +1 -1
- data/lib/rubocop/cop/variable_force/scope.rb +1 -1
- data/lib/rubocop/core_ext/hash.rb +20 -0
- data/lib/rubocop/ext/regexp_node.rb +36 -11
- data/lib/rubocop/ext/regexp_parser.rb +95 -0
- data/lib/rubocop/formatter/disabled_config_formatter.rb +21 -6
- data/lib/rubocop/formatter/emacs_style_formatter.rb +2 -0
- data/lib/rubocop/formatter/formatter_set.rb +2 -1
- data/lib/rubocop/formatter/git_hub_actions_formatter.rb +47 -0
- data/lib/rubocop/formatter/offense_count_formatter.rb +1 -1
- data/lib/rubocop/formatter/simple_text_formatter.rb +2 -0
- data/lib/rubocop/formatter/tap_formatter.rb +2 -0
- data/lib/rubocop/formatter/worst_offenders_formatter.rb +1 -1
- data/lib/rubocop/lockfile.rb +40 -0
- data/lib/rubocop/magic_comment.rb +2 -2
- data/lib/rubocop/options.rb +11 -1
- data/lib/rubocop/rake_task.rb +2 -2
- data/lib/rubocop/rspec/shared_contexts.rb +4 -0
- data/lib/rubocop/runner.rb +1 -1
- data/lib/rubocop/target_finder.rb +1 -1
- data/lib/rubocop/target_ruby.rb +65 -1
- data/lib/rubocop/version.rb +56 -6
- metadata +50 -9
- data/bin/console +0 -10
- data/bin/rubocop-profile +0 -32
- data/bin/setup +0 -7
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:
|
4
|
+
version: 1.6.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: 2020-10
|
13
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parallel
|
@@ -67,6 +67,9 @@ dependencies:
|
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '1.8'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '3.0'
|
70
73
|
type: :runtime
|
71
74
|
prerelease: false
|
72
75
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,6 +77,9 @@ dependencies:
|
|
74
77
|
- - ">="
|
75
78
|
- !ruby/object:Gem::Version
|
76
79
|
version: '1.8'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
77
83
|
- !ruby/object:Gem::Dependency
|
78
84
|
name: rexml
|
79
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,14 +100,20 @@ dependencies:
|
|
94
100
|
requirements:
|
95
101
|
- - ">="
|
96
102
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
103
|
+
version: 1.2.0
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '2.0'
|
98
107
|
type: :runtime
|
99
108
|
prerelease: false
|
100
109
|
version_requirements: !ruby/object:Gem::Requirement
|
101
110
|
requirements:
|
102
111
|
- - ">="
|
103
112
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
113
|
+
version: 1.2.0
|
114
|
+
- - "<"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '2.0'
|
105
117
|
- !ruby/object:Gem::Dependency
|
106
118
|
name: ruby-progressbar
|
107
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,10 +183,8 @@ files:
|
|
171
183
|
- README.md
|
172
184
|
- assets/logo.png
|
173
185
|
- assets/output.html.erb
|
174
|
-
- bin/console
|
175
|
-
- bin/rubocop-profile
|
176
|
-
- bin/setup
|
177
186
|
- config/default.yml
|
187
|
+
- config/obsoletion.yml
|
178
188
|
- exe/rubocop
|
179
189
|
- lib/rubocop.rb
|
180
190
|
- lib/rubocop/ast_aliases.rb
|
@@ -186,6 +196,7 @@ files:
|
|
186
196
|
- lib/rubocop/cli/command/execute_runner.rb
|
187
197
|
- lib/rubocop/cli/command/init_dotfile.rb
|
188
198
|
- lib/rubocop/cli/command/show_cops.rb
|
199
|
+
- lib/rubocop/cli/command/suggest_extensions.rb
|
189
200
|
- lib/rubocop/cli/command/version.rb
|
190
201
|
- lib/rubocop/cli/environment.rb
|
191
202
|
- lib/rubocop/comment_config.rb
|
@@ -193,6 +204,15 @@ files:
|
|
193
204
|
- lib/rubocop/config_loader.rb
|
194
205
|
- lib/rubocop/config_loader_resolver.rb
|
195
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
|
196
216
|
- lib/rubocop/config_regeneration.rb
|
197
217
|
- lib/rubocop/config_store.rb
|
198
218
|
- lib/rubocop/config_validator.rb
|
@@ -347,14 +367,18 @@ files:
|
|
347
367
|
- lib/rubocop/cop/lint/deprecated_class_methods.rb
|
348
368
|
- lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb
|
349
369
|
- lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
|
370
|
+
- lib/rubocop/cop/lint/duplicate_branch.rb
|
350
371
|
- lib/rubocop/cop/lint/duplicate_case_condition.rb
|
351
372
|
- lib/rubocop/cop/lint/duplicate_elsif_condition.rb
|
352
373
|
- lib/rubocop/cop/lint/duplicate_hash_key.rb
|
353
374
|
- lib/rubocop/cop/lint/duplicate_methods.rb
|
375
|
+
- lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb
|
354
376
|
- lib/rubocop/cop/lint/duplicate_require.rb
|
355
377
|
- lib/rubocop/cop/lint/duplicate_rescue_exception.rb
|
356
378
|
- lib/rubocop/cop/lint/each_with_object_argument.rb
|
357
379
|
- lib/rubocop/cop/lint/else_layout.rb
|
380
|
+
- lib/rubocop/cop/lint/empty_block.rb
|
381
|
+
- lib/rubocop/cop/lint/empty_class.rb
|
358
382
|
- lib/rubocop/cop/lint/empty_conditional_body.rb
|
359
383
|
- lib/rubocop/cop/lint/empty_ensure.rb
|
360
384
|
- lib/rubocop/cop/lint/empty_expression.rb
|
@@ -384,6 +408,7 @@ files:
|
|
384
408
|
- lib/rubocop/cop/lint/nested_method_definition.rb
|
385
409
|
- lib/rubocop/cop/lint/nested_percent_literal.rb
|
386
410
|
- lib/rubocop/cop/lint/next_without_accumulator.rb
|
411
|
+
- lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb
|
387
412
|
- lib/rubocop/cop/lint/non_deterministic_require_order.rb
|
388
413
|
- lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
|
389
414
|
- lib/rubocop/cop/lint/number_conversion.rb
|
@@ -419,11 +444,14 @@ files:
|
|
419
444
|
- lib/rubocop/cop/lint/struct_new_override.rb
|
420
445
|
- lib/rubocop/cop/lint/suppressed_exception.rb
|
421
446
|
- lib/rubocop/cop/lint/syntax.rb
|
447
|
+
- lib/rubocop/cop/lint/to_enum_arguments.rb
|
422
448
|
- lib/rubocop/cop/lint/to_json.rb
|
423
449
|
- lib/rubocop/cop/lint/top_level_return_with_argument.rb
|
424
450
|
- lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb
|
425
451
|
- lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
|
452
|
+
- lib/rubocop/cop/lint/unexpected_block_arity.rb
|
426
453
|
- lib/rubocop/cop/lint/unified_integer.rb
|
454
|
+
- lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb
|
427
455
|
- lib/rubocop/cop/lint/unreachable_code.rb
|
428
456
|
- lib/rubocop/cop/lint/unreachable_loop.rb
|
429
457
|
- lib/rubocop/cop/lint/unused_block_argument.rb
|
@@ -450,6 +478,7 @@ files:
|
|
450
478
|
- lib/rubocop/cop/metrics/utils/abc_size_calculator.rb
|
451
479
|
- lib/rubocop/cop/metrics/utils/code_length_calculator.rb
|
452
480
|
- lib/rubocop/cop/metrics/utils/iterating_block.rb
|
481
|
+
- lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb
|
453
482
|
- lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb
|
454
483
|
- lib/rubocop/cop/migration/department_name.rb
|
455
484
|
- lib/rubocop/cop/mixin/alignment.rb
|
@@ -545,6 +574,7 @@ files:
|
|
545
574
|
- lib/rubocop/cop/style/accessor_grouping.rb
|
546
575
|
- lib/rubocop/cop/style/alias.rb
|
547
576
|
- lib/rubocop/cop/style/and_or.rb
|
577
|
+
- lib/rubocop/cop/style/arguments_forwarding.rb
|
548
578
|
- lib/rubocop/cop/style/array_coercion.rb
|
549
579
|
- lib/rubocop/cop/style/array_join.rb
|
550
580
|
- lib/rubocop/cop/style/ascii_comments.rb
|
@@ -564,6 +594,7 @@ files:
|
|
564
594
|
- lib/rubocop/cop/style/class_methods.rb
|
565
595
|
- lib/rubocop/cop/style/class_methods_definitions.rb
|
566
596
|
- lib/rubocop/cop/style/class_vars.rb
|
597
|
+
- lib/rubocop/cop/style/collection_compact.rb
|
567
598
|
- lib/rubocop/cop/style/collection_methods.rb
|
568
599
|
- lib/rubocop/cop/style/colon_method_call.rb
|
569
600
|
- lib/rubocop/cop/style/colon_method_definition.rb
|
@@ -578,6 +609,7 @@ files:
|
|
578
609
|
- lib/rubocop/cop/style/def_with_parentheses.rb
|
579
610
|
- lib/rubocop/cop/style/dir.rb
|
580
611
|
- lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb
|
612
|
+
- lib/rubocop/cop/style/document_dynamic_eval_definition.rb
|
581
613
|
- lib/rubocop/cop/style/documentation.rb
|
582
614
|
- lib/rubocop/cop/style/documentation_method.rb
|
583
615
|
- lib/rubocop/cop/style/double_cop_disable_directive.rb
|
@@ -647,6 +679,7 @@ files:
|
|
647
679
|
- lib/rubocop/cop/style/multiple_comparison.rb
|
648
680
|
- lib/rubocop/cop/style/mutable_constant.rb
|
649
681
|
- lib/rubocop/cop/style/negated_if.rb
|
682
|
+
- lib/rubocop/cop/style/negated_if_else_condition.rb
|
650
683
|
- lib/rubocop/cop/style/negated_unless.rb
|
651
684
|
- lib/rubocop/cop/style/negated_while.rb
|
652
685
|
- lib/rubocop/cop/style/nested_modifier.rb
|
@@ -654,6 +687,7 @@ files:
|
|
654
687
|
- lib/rubocop/cop/style/nested_ternary_operator.rb
|
655
688
|
- lib/rubocop/cop/style/next.rb
|
656
689
|
- lib/rubocop/cop/style/nil_comparison.rb
|
690
|
+
- lib/rubocop/cop/style/nil_lambda.rb
|
657
691
|
- lib/rubocop/cop/style/non_nil_check.rb
|
658
692
|
- lib/rubocop/cop/style/not.rb
|
659
693
|
- lib/rubocop/cop/style/numeric_literal_prefix.rb
|
@@ -673,6 +707,7 @@ files:
|
|
673
707
|
- lib/rubocop/cop/style/proc.rb
|
674
708
|
- lib/rubocop/cop/style/raise_args.rb
|
675
709
|
- lib/rubocop/cop/style/random_with_offset.rb
|
710
|
+
- lib/rubocop/cop/style/redundant_argument.rb
|
676
711
|
- lib/rubocop/cop/style/redundant_assignment.rb
|
677
712
|
- lib/rubocop/cop/style/redundant_begin.rb
|
678
713
|
- lib/rubocop/cop/style/redundant_capital_w.rb
|
@@ -709,6 +744,7 @@ files:
|
|
709
744
|
- lib/rubocop/cop/style/sole_nested_conditional.rb
|
710
745
|
- lib/rubocop/cop/style/special_global_vars.rb
|
711
746
|
- lib/rubocop/cop/style/stabby_lambda_parentheses.rb
|
747
|
+
- lib/rubocop/cop/style/static_class.rb
|
712
748
|
- lib/rubocop/cop/style/stderr_puts.rb
|
713
749
|
- lib/rubocop/cop/style/string_concatenation.rb
|
714
750
|
- lib/rubocop/cop/style/string_hash_keys.rb
|
@@ -717,6 +753,7 @@ files:
|
|
717
753
|
- lib/rubocop/cop/style/string_methods.rb
|
718
754
|
- lib/rubocop/cop/style/strip.rb
|
719
755
|
- lib/rubocop/cop/style/struct_inheritance.rb
|
756
|
+
- lib/rubocop/cop/style/swap_values.rb
|
720
757
|
- lib/rubocop/cop/style/symbol_array.rb
|
721
758
|
- lib/rubocop/cop/style/symbol_literal.rb
|
722
759
|
- lib/rubocop/cop/style/symbol_proc.rb
|
@@ -752,11 +789,13 @@ files:
|
|
752
789
|
- lib/rubocop/cop/variable_force/variable.rb
|
753
790
|
- lib/rubocop/cop/variable_force/variable_table.rb
|
754
791
|
- lib/rubocop/cops_documentation_generator.rb
|
792
|
+
- lib/rubocop/core_ext/hash.rb
|
755
793
|
- lib/rubocop/core_ext/string.rb
|
756
794
|
- lib/rubocop/directive_comment.rb
|
757
795
|
- lib/rubocop/error.rb
|
758
796
|
- lib/rubocop/ext/processed_source.rb
|
759
797
|
- lib/rubocop/ext/regexp_node.rb
|
798
|
+
- lib/rubocop/ext/regexp_parser.rb
|
760
799
|
- lib/rubocop/file_finder.rb
|
761
800
|
- lib/rubocop/formatter/auto_gen_config_formatter.rb
|
762
801
|
- lib/rubocop/formatter/base_formatter.rb
|
@@ -767,6 +806,7 @@ files:
|
|
767
806
|
- lib/rubocop/formatter/file_list_formatter.rb
|
768
807
|
- lib/rubocop/formatter/formatter_set.rb
|
769
808
|
- lib/rubocop/formatter/fuubar_style_formatter.rb
|
809
|
+
- lib/rubocop/formatter/git_hub_actions_formatter.rb
|
770
810
|
- lib/rubocop/formatter/html_formatter.rb
|
771
811
|
- lib/rubocop/formatter/json_formatter.rb
|
772
812
|
- lib/rubocop/formatter/junit_formatter.rb
|
@@ -778,6 +818,7 @@ files:
|
|
778
818
|
- lib/rubocop/formatter/tap_formatter.rb
|
779
819
|
- lib/rubocop/formatter/text_util.rb
|
780
820
|
- lib/rubocop/formatter/worst_offenders_formatter.rb
|
821
|
+
- lib/rubocop/lockfile.rb
|
781
822
|
- lib/rubocop/magic_comment.rb
|
782
823
|
- lib/rubocop/name_similarity.rb
|
783
824
|
- lib/rubocop/options.rb
|
@@ -805,7 +846,7 @@ metadata:
|
|
805
846
|
homepage_uri: https://rubocop.org/
|
806
847
|
changelog_uri: https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md
|
807
848
|
source_code_uri: https://github.com/rubocop-hq/rubocop/
|
808
|
-
documentation_uri: https://docs.rubocop.org/rubocop/
|
849
|
+
documentation_uri: https://docs.rubocop.org/rubocop/1.6/
|
809
850
|
bug_tracker_uri: https://github.com/rubocop-hq/rubocop/issues
|
810
851
|
post_install_message:
|
811
852
|
rdoc_options: []
|
@@ -822,7 +863,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
822
863
|
- !ruby/object:Gem::Version
|
823
864
|
version: '0'
|
824
865
|
requirements: []
|
825
|
-
rubygems_version: 3.1.
|
866
|
+
rubygems_version: 3.1.2
|
826
867
|
signing_key:
|
827
868
|
specification_version: 4
|
828
869
|
summary: Automatic Ruby code style checking tool.
|
data/bin/console
DELETED
data/bin/rubocop-profile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
if ARGV.include?('-h') || ARGV.include?('--help')
|
5
|
-
puts "Usage: same as main `rubocop` command but gathers profiling info"
|
6
|
-
puts "Additional option: `--memory` to print memory usage"
|
7
|
-
exit(0)
|
8
|
-
end
|
9
|
-
with_mem = ARGV.delete('--memory')
|
10
|
-
ARGV.unshift '--cache', 'false' unless ARGV.include?('--cache')
|
11
|
-
|
12
|
-
require 'stackprof'
|
13
|
-
if with_mem
|
14
|
-
require 'memory_profiler'
|
15
|
-
MemoryProfiler.start
|
16
|
-
end
|
17
|
-
StackProf.start
|
18
|
-
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
19
|
-
begin
|
20
|
-
load "#{__dir__}/../exe/rubocop"
|
21
|
-
ensure
|
22
|
-
delta = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
23
|
-
puts "Finished in #{delta.round(1)} seconds"
|
24
|
-
StackProf.stop
|
25
|
-
if with_mem
|
26
|
-
puts "Building memory report..."
|
27
|
-
report = MemoryProfiler.stop
|
28
|
-
end
|
29
|
-
Dir.mkdir('tmp') unless File.exist?('tmp')
|
30
|
-
StackProf.results('tmp/stackprof.dump')
|
31
|
-
report&.pretty_print(scale_bytes: true)
|
32
|
-
end
|