rubocop 1.22.2 → 1.24.1
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 -2
- data/config/default.yml +87 -5
- data/lib/rubocop/cli/command/auto_genenerate_config.rb +1 -1
- data/lib/rubocop/cli/command/init_dotfile.rb +1 -1
- data/lib/rubocop/cli/command/show_docs_url.rb +48 -0
- data/lib/rubocop/cli/command/suggest_extensions.rb +1 -1
- data/lib/rubocop/cli.rb +1 -0
- data/lib/rubocop/config_loader_resolver.rb +1 -1
- data/lib/rubocop/cop/bundler/duplicated_gem.rb +1 -1
- data/lib/rubocop/cop/correctors/each_to_for_corrector.rb +1 -1
- data/lib/rubocop/cop/correctors/if_then_corrector.rb +55 -0
- data/lib/rubocop/cop/documentation.rb +19 -2
- data/lib/rubocop/cop/gemspec/date_assignment.rb +2 -10
- data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +1 -10
- data/lib/rubocop/cop/gemspec/require_mfa.rb +144 -0
- data/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +3 -10
- data/lib/rubocop/cop/generator.rb +1 -1
- data/lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb +47 -0
- data/lib/rubocop/cop/internal_affairs/undefined_config.rb +3 -1
- data/lib/rubocop/cop/internal_affairs.rb +1 -0
- data/lib/rubocop/cop/layout/block_alignment.rb +3 -3
- data/lib/rubocop/cop/layout/comment_indentation.rb +31 -2
- data/lib/rubocop/cop/layout/dot_position.rb +9 -1
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +22 -1
- data/lib/rubocop/cop/layout/hash_alignment.rb +1 -1
- data/lib/rubocop/cop/layout/space_after_colon.rb +1 -1
- data/lib/rubocop/cop/layout/space_before_first_arg.rb +4 -0
- data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +11 -5
- data/lib/rubocop/cop/lint/ambiguous_range.rb +2 -2
- data/lib/rubocop/cop/lint/constant_definition_in_block.rb +1 -1
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +16 -4
- data/lib/rubocop/cop/lint/deprecated_constants.rb +3 -2
- data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +6 -0
- data/lib/rubocop/cop/lint/each_with_object_argument.rb +1 -1
- data/lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb +4 -0
- data/lib/rubocop/cop/lint/number_conversion.rb +5 -2
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +7 -4
- data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +117 -0
- data/lib/rubocop/cop/metrics/block_length.rb +1 -0
- data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +0 -9
- data/lib/rubocop/cop/metrics/method_length.rb +1 -0
- data/lib/rubocop/cop/metrics/module_length.rb +1 -1
- data/lib/rubocop/cop/metrics/parameter_lists.rb +1 -1
- data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +1 -1
- data/lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb +1 -1
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +5 -0
- data/lib/rubocop/cop/mixin/gemspec_help.rb +30 -0
- data/lib/rubocop/cop/mixin/hash_alignment_styles.rb +4 -3
- data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +56 -0
- data/lib/rubocop/cop/mixin/string_literals_help.rb +1 -5
- data/lib/rubocop/cop/naming/block_forwarding.rb +107 -0
- data/lib/rubocop/cop/naming/file_name.rb +37 -4
- data/lib/rubocop/cop/security/open.rb +11 -1
- data/lib/rubocop/cop/style/character_literal.rb +8 -1
- data/lib/rubocop/cop/style/collection_compact.rb +31 -13
- data/lib/rubocop/cop/style/combinable_loops.rb +2 -2
- data/lib/rubocop/cop/style/documentation.rb +1 -1
- data/lib/rubocop/cop/style/empty_case_condition.rb +10 -0
- data/lib/rubocop/cop/style/empty_method.rb +1 -1
- data/lib/rubocop/cop/style/file_read.rb +112 -0
- data/lib/rubocop/cop/style/file_write.rb +124 -0
- data/lib/rubocop/cop/style/format_string_token.rb +2 -1
- data/lib/rubocop/cop/style/hash_conversion.rb +2 -1
- data/lib/rubocop/cop/style/hash_syntax.rb +22 -0
- data/lib/rubocop/cop/style/hash_transform_keys.rb +6 -6
- data/lib/rubocop/cop/style/hash_transform_values.rb +6 -6
- data/lib/rubocop/cop/style/if_inside_else.rb +15 -0
- data/lib/rubocop/cop/style/map_to_hash.rb +68 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +13 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +3 -1
- data/lib/rubocop/cop/style/method_def_parentheses.rb +17 -13
- data/lib/rubocop/cop/style/numeric_literals.rb +10 -1
- data/lib/rubocop/cop/style/one_line_conditional.rb +18 -39
- data/lib/rubocop/cop/style/open_struct_use.rb +69 -0
- data/lib/rubocop/cop/style/parentheses_around_condition.rb +12 -2
- data/lib/rubocop/cop/style/quoted_symbols.rb +11 -1
- data/lib/rubocop/cop/style/redundant_interpolation.rb +17 -3
- data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +5 -1
- data/lib/rubocop/cop/style/redundant_self.rb +1 -1
- data/lib/rubocop/cop/style/safe_navigation.rb +1 -5
- data/lib/rubocop/cop/style/select_by_regexp.rb +4 -3
- data/lib/rubocop/cop/style/single_line_block_params.rb +2 -2
- data/lib/rubocop/cop/style/sole_nested_conditional.rb +3 -1
- data/lib/rubocop/cop/team.rb +1 -1
- data/lib/rubocop/cop/util.rb +9 -1
- data/lib/rubocop/formatter/html_formatter.rb +5 -2
- data/lib/rubocop/formatter/json_formatter.rb +4 -1
- data/lib/rubocop/options.rb +6 -1
- data/lib/rubocop/remote_config.rb +2 -4
- data/lib/rubocop/result_cache.rb +1 -1
- data/lib/rubocop/version.rb +1 -1
- data/lib/rubocop/yaml_duplication_checker.rb +1 -1
- data/lib/rubocop.rb +11 -0
- metadata +18 -5
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.24.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: 2021-
|
13
|
+
date: 2021-12-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parallel
|
@@ -100,7 +100,7 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.15.1
|
104
104
|
- - "<"
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '2.0'
|
@@ -110,7 +110,7 @@ dependencies:
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: 1.
|
113
|
+
version: 1.15.1
|
114
114
|
- - "<"
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '2.0'
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/rubocop/cli/command/execute_runner.rb
|
197
197
|
- lib/rubocop/cli/command/init_dotfile.rb
|
198
198
|
- lib/rubocop/cli/command/show_cops.rb
|
199
|
+
- lib/rubocop/cli/command/show_docs_url.rb
|
199
200
|
- lib/rubocop/cli/command/suggest_extensions.rb
|
200
201
|
- lib/rubocop/cli/command/version.rb
|
201
202
|
- lib/rubocop/cli/environment.rb
|
@@ -233,6 +234,7 @@ files:
|
|
233
234
|
- lib/rubocop/cop/correctors/each_to_for_corrector.rb
|
234
235
|
- lib/rubocop/cop/correctors/empty_line_corrector.rb
|
235
236
|
- lib/rubocop/cop/correctors/for_to_each_corrector.rb
|
237
|
+
- lib/rubocop/cop/correctors/if_then_corrector.rb
|
236
238
|
- lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb
|
237
239
|
- lib/rubocop/cop/correctors/line_break_corrector.rb
|
238
240
|
- lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb
|
@@ -250,6 +252,7 @@ files:
|
|
250
252
|
- lib/rubocop/cop/gemspec/date_assignment.rb
|
251
253
|
- lib/rubocop/cop/gemspec/duplicated_assignment.rb
|
252
254
|
- lib/rubocop/cop/gemspec/ordered_dependencies.rb
|
255
|
+
- lib/rubocop/cop/gemspec/require_mfa.rb
|
253
256
|
- lib/rubocop/cop/gemspec/required_ruby_version.rb
|
254
257
|
- lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb
|
255
258
|
- lib/rubocop/cop/generator.rb
|
@@ -270,6 +273,7 @@ files:
|
|
270
273
|
- lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb
|
271
274
|
- lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
|
272
275
|
- lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
|
276
|
+
- lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb
|
273
277
|
- lib/rubocop/cop/internal_affairs/style_detected_api_use.rb
|
274
278
|
- lib/rubocop/cop/internal_affairs/undefined_config.rb
|
275
279
|
- lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
|
@@ -493,6 +497,7 @@ files:
|
|
493
497
|
- lib/rubocop/cop/lint/useless_assignment.rb
|
494
498
|
- lib/rubocop/cop/lint/useless_else_without_rescue.rb
|
495
499
|
- lib/rubocop/cop/lint/useless_method_definition.rb
|
500
|
+
- lib/rubocop/cop/lint/useless_ruby2_keywords.rb
|
496
501
|
- lib/rubocop/cop/lint/useless_setter_call.rb
|
497
502
|
- lib/rubocop/cop/lint/useless_times.rb
|
498
503
|
- lib/rubocop/cop/lint/void.rb
|
@@ -538,7 +543,9 @@ files:
|
|
538
543
|
- lib/rubocop/cop/mixin/first_element_line_break.rb
|
539
544
|
- lib/rubocop/cop/mixin/frozen_string_literal.rb
|
540
545
|
- lib/rubocop/cop/mixin/gem_declaration.rb
|
546
|
+
- lib/rubocop/cop/mixin/gemspec_help.rb
|
541
547
|
- lib/rubocop/cop/mixin/hash_alignment_styles.rb
|
548
|
+
- lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
|
542
549
|
- lib/rubocop/cop/mixin/hash_transform_method.rb
|
543
550
|
- lib/rubocop/cop/mixin/heredoc.rb
|
544
551
|
- lib/rubocop/cop/mixin/ignored_methods.rb
|
@@ -584,6 +591,7 @@ files:
|
|
584
591
|
- lib/rubocop/cop/naming/accessor_method_name.rb
|
585
592
|
- lib/rubocop/cop/naming/ascii_identifiers.rb
|
586
593
|
- lib/rubocop/cop/naming/binary_operator_parameter_name.rb
|
594
|
+
- lib/rubocop/cop/naming/block_forwarding.rb
|
587
595
|
- lib/rubocop/cop/naming/block_parameter_name.rb
|
588
596
|
- lib/rubocop/cop/naming/class_and_module_camel_case.rb
|
589
597
|
- lib/rubocop/cop/naming/constant_name.rb
|
@@ -668,6 +676,8 @@ files:
|
|
668
676
|
- lib/rubocop/cop/style/expand_path_arguments.rb
|
669
677
|
- lib/rubocop/cop/style/explicit_block_argument.rb
|
670
678
|
- lib/rubocop/cop/style/exponential_notation.rb
|
679
|
+
- lib/rubocop/cop/style/file_read.rb
|
680
|
+
- lib/rubocop/cop/style/file_write.rb
|
671
681
|
- lib/rubocop/cop/style/float_division.rb
|
672
682
|
- lib/rubocop/cop/style/for.rb
|
673
683
|
- lib/rubocop/cop/style/format_string.rb
|
@@ -700,6 +710,7 @@ files:
|
|
700
710
|
- lib/rubocop/cop/style/lambda.rb
|
701
711
|
- lib/rubocop/cop/style/lambda_call.rb
|
702
712
|
- lib/rubocop/cop/style/line_end_concatenation.rb
|
713
|
+
- lib/rubocop/cop/style/map_to_hash.rb
|
703
714
|
- lib/rubocop/cop/style/method_call_with_args_parentheses.rb
|
704
715
|
- lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb
|
705
716
|
- lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb
|
@@ -740,6 +751,7 @@ files:
|
|
740
751
|
- lib/rubocop/cop/style/numeric_literals.rb
|
741
752
|
- lib/rubocop/cop/style/numeric_predicate.rb
|
742
753
|
- lib/rubocop/cop/style/one_line_conditional.rb
|
754
|
+
- lib/rubocop/cop/style/open_struct_use.rb
|
743
755
|
- lib/rubocop/cop/style/option_hash.rb
|
744
756
|
- lib/rubocop/cop/style/optional_arguments.rb
|
745
757
|
- lib/rubocop/cop/style/optional_boolean_parameter.rb
|
@@ -899,8 +911,9 @@ metadata:
|
|
899
911
|
homepage_uri: https://rubocop.org/
|
900
912
|
changelog_uri: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
|
901
913
|
source_code_uri: https://github.com/rubocop/rubocop/
|
902
|
-
documentation_uri: https://docs.rubocop.org/rubocop/1.
|
914
|
+
documentation_uri: https://docs.rubocop.org/rubocop/1.24/
|
903
915
|
bug_tracker_uri: https://github.com/rubocop/rubocop/issues
|
916
|
+
rubygems_mfa_required: 'true'
|
904
917
|
post_install_message:
|
905
918
|
rdoc_options: []
|
906
919
|
require_paths:
|