rubocop 0.43.0 → 0.44.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubocop might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/rubocop +0 -1
- data/config/default.yml +31 -0
- data/config/disabled.yml +6 -6
- data/config/enabled.yml +182 -140
- data/lib/rubocop.rb +7 -2
- data/lib/rubocop/ast_node.rb +0 -1
- data/lib/rubocop/ast_node/builder.rb +0 -1
- data/lib/rubocop/ast_node/sexp.rb +0 -1
- data/lib/rubocop/ast_node/traversal.rb +0 -1
- data/lib/rubocop/cached_data.rb +3 -20
- data/lib/rubocop/cli.rb +0 -1
- data/lib/rubocop/comment_config.rb +0 -1
- data/lib/rubocop/config.rb +0 -1
- data/lib/rubocop/config_loader.rb +1 -2
- data/lib/rubocop/config_loader_resolver.rb +0 -1
- data/lib/rubocop/config_store.rb +0 -1
- data/lib/rubocop/cop/autocorrect_logic.rb +0 -1
- data/lib/rubocop/cop/commissioner.rb +0 -1
- data/lib/rubocop/cop/cop.rb +15 -5
- data/lib/rubocop/cop/corrector.rb +0 -1
- data/lib/rubocop/cop/force.rb +0 -1
- data/lib/rubocop/cop/ignored_node.rb +0 -1
- data/lib/rubocop/cop/lint/ambiguous_operator.rb +0 -1
- data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +0 -1
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +2 -2
- data/lib/rubocop/cop/lint/block_alignment.rb +0 -1
- data/lib/rubocop/cop/lint/circular_argument_reference.rb +0 -1
- data/lib/rubocop/cop/lint/condition_position.rb +0 -1
- data/lib/rubocop/cop/lint/debugger.rb +0 -1
- data/lib/rubocop/cop/lint/def_end_alignment.rb +0 -1
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +0 -1
- data/lib/rubocop/cop/lint/duplicate_methods.rb +0 -1
- data/lib/rubocop/cop/lint/duplicated_key.rb +0 -1
- data/lib/rubocop/cop/lint/each_with_object_argument.rb +0 -1
- data/lib/rubocop/cop/lint/else_layout.rb +0 -1
- data/lib/rubocop/cop/lint/empty_ensure.rb +0 -1
- data/lib/rubocop/cop/lint/empty_interpolation.rb +0 -1
- data/lib/rubocop/cop/lint/end_alignment.rb +0 -1
- data/lib/rubocop/cop/lint/end_in_method.rb +0 -1
- data/lib/rubocop/cop/lint/ensure_return.rb +0 -1
- data/lib/rubocop/cop/lint/eval.rb +0 -1
- data/lib/rubocop/cop/lint/float_out_of_range.rb +0 -1
- data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +0 -1
- data/lib/rubocop/cop/lint/handle_exceptions.rb +0 -1
- data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +0 -1
- data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +0 -1
- data/lib/rubocop/cop/lint/inherit_exception.rb +0 -1
- data/lib/rubocop/cop/lint/invalid_character_literal.rb +0 -1
- data/lib/rubocop/cop/lint/literal_in_condition.rb +0 -1
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +0 -1
- data/lib/rubocop/cop/lint/loop.rb +0 -1
- data/lib/rubocop/cop/lint/nested_method_definition.rb +0 -1
- data/lib/rubocop/cop/lint/next_without_accumulator.rb +0 -1
- data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +0 -1
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +0 -1
- data/lib/rubocop/cop/lint/percent_string_array.rb +0 -1
- data/lib/rubocop/cop/lint/percent_symbol_array.rb +0 -1
- data/lib/rubocop/cop/lint/rand_one.rb +0 -1
- data/lib/rubocop/cop/lint/require_parentheses.rb +0 -1
- data/lib/rubocop/cop/lint/rescue_exception.rb +0 -1
- data/lib/rubocop/cop/lint/shadowed_exception.rb +1 -2
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +0 -1
- data/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +0 -1
- data/lib/rubocop/cop/lint/syntax.rb +0 -1
- data/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +0 -1
- data/lib/rubocop/cop/lint/unified_integer.rb +0 -1
- data/lib/rubocop/cop/lint/unneeded_disable.rb +0 -1
- data/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +15 -2
- data/lib/rubocop/cop/lint/unreachable_code.rb +0 -1
- data/lib/rubocop/cop/lint/unused_block_argument.rb +81 -27
- data/lib/rubocop/cop/lint/unused_method_argument.rb +0 -1
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +0 -1
- data/lib/rubocop/cop/lint/useless_assignment.rb +0 -1
- data/lib/rubocop/cop/lint/useless_comparison.rb +0 -1
- data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +0 -1
- data/lib/rubocop/cop/lint/useless_setter_call.rb +0 -1
- data/lib/rubocop/cop/lint/void.rb +0 -1
- data/lib/rubocop/cop/metrics/abc_size.rb +1 -2
- data/lib/rubocop/cop/metrics/block_length.rb +26 -0
- data/lib/rubocop/cop/metrics/block_nesting.rb +0 -1
- data/lib/rubocop/cop/metrics/class_length.rb +0 -1
- data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +0 -1
- data/lib/rubocop/cop/metrics/line_length.rb +45 -8
- data/lib/rubocop/cop/metrics/method_length.rb +5 -10
- data/lib/rubocop/cop/metrics/module_length.rb +0 -1
- data/lib/rubocop/cop/metrics/parameter_lists.rb +0 -1
- data/lib/rubocop/cop/metrics/perceived_complexity.rb +0 -1
- data/lib/rubocop/cop/mixin/access_modifier_node.rb +0 -1
- data/lib/rubocop/cop/mixin/annotation_comment.rb +0 -1
- data/lib/rubocop/cop/mixin/array_hash_indentation.rb +0 -1
- data/lib/rubocop/cop/mixin/array_syntax.rb +0 -1
- data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +0 -1
- data/lib/rubocop/cop/mixin/check_assignment.rb +0 -1
- data/lib/rubocop/cop/mixin/classish_length.rb +0 -1
- data/lib/rubocop/cop/mixin/code_length.rb +1 -2
- data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +0 -1
- data/lib/rubocop/cop/mixin/configurable_max.rb +0 -1
- data/lib/rubocop/cop/mixin/configurable_naming.rb +0 -1
- data/lib/rubocop/cop/mixin/configurable_numbering.rb +2 -2
- data/lib/rubocop/cop/mixin/def_node.rb +0 -1
- data/lib/rubocop/cop/mixin/documentation_comment.rb +0 -1
- data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +41 -16
- data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +0 -1
- data/lib/rubocop/cop/mixin/first_element_line_break.rb +0 -1
- data/lib/rubocop/cop/mixin/frozen_string_literal.rb +0 -1
- data/lib/rubocop/cop/mixin/hash_node.rb +0 -1
- data/lib/rubocop/cop/mixin/if_node.rb +0 -1
- data/lib/rubocop/cop/mixin/integer_node.rb +0 -1
- data/lib/rubocop/cop/mixin/match_range.rb +0 -1
- data/lib/rubocop/cop/mixin/method_complexity.rb +0 -1
- data/lib/rubocop/cop/mixin/method_preference.rb +0 -1
- data/lib/rubocop/cop/mixin/min_body_length.rb +0 -1
- data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +0 -1
- data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +0 -1
- data/lib/rubocop/cop/mixin/negative_conditional.rb +0 -1
- data/lib/rubocop/cop/mixin/on_method_def.rb +0 -1
- data/lib/rubocop/cop/mixin/on_normal_if_unless.rb +0 -1
- data/lib/rubocop/cop/mixin/parentheses.rb +0 -1
- data/lib/rubocop/cop/mixin/parser_diagnostic.rb +0 -1
- data/lib/rubocop/cop/mixin/percent_literal.rb +0 -1
- data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +0 -1
- data/lib/rubocop/cop/mixin/safe_assignment.rb +0 -1
- data/lib/rubocop/cop/mixin/safe_mode.rb +0 -1
- data/lib/rubocop/cop/mixin/space_after_punctuation.rb +0 -1
- data/lib/rubocop/cop/mixin/space_before_punctuation.rb +0 -1
- data/lib/rubocop/cop/mixin/space_inside.rb +0 -1
- data/lib/rubocop/cop/mixin/statement_modifier.rb +0 -1
- data/lib/rubocop/cop/mixin/string_help.rb +0 -1
- data/lib/rubocop/cop/mixin/string_literals_help.rb +0 -1
- data/lib/rubocop/cop/mixin/surrounding_space.rb +0 -1
- data/lib/rubocop/cop/mixin/too_many_lines.rb +25 -0
- data/lib/rubocop/cop/mixin/trailing_comma.rb +1 -2
- data/lib/rubocop/cop/mixin/unused_argument.rb +0 -1
- data/lib/rubocop/cop/offense.rb +0 -1
- data/lib/rubocop/cop/performance/case_when_splat.rb +17 -8
- data/lib/rubocop/cop/performance/casecmp.rb +0 -1
- data/lib/rubocop/cop/performance/count.rb +0 -1
- data/lib/rubocop/cop/performance/detect.rb +0 -1
- data/lib/rubocop/cop/performance/double_start_end_with.rb +0 -1
- data/lib/rubocop/cop/performance/end_with.rb +0 -1
- data/lib/rubocop/cop/performance/fixed_size.rb +0 -1
- data/lib/rubocop/cop/performance/flat_map.rb +0 -1
- data/lib/rubocop/cop/performance/{hash_each.rb → hash_each_methods.rb} +0 -1
- data/lib/rubocop/cop/performance/lstrip_rstrip.rb +0 -1
- data/lib/rubocop/cop/performance/range_include.rb +0 -1
- data/lib/rubocop/cop/performance/redundant_block_call.rb +0 -1
- data/lib/rubocop/cop/performance/redundant_match.rb +0 -1
- data/lib/rubocop/cop/performance/redundant_merge.rb +1 -1
- data/lib/rubocop/cop/performance/redundant_sort_by.rb +0 -1
- data/lib/rubocop/cop/performance/reverse_each.rb +0 -1
- data/lib/rubocop/cop/performance/sample.rb +1 -2
- data/lib/rubocop/cop/performance/size.rb +0 -1
- data/lib/rubocop/cop/performance/sort_with_block.rb +0 -1
- data/lib/rubocop/cop/performance/start_with.rb +0 -1
- data/lib/rubocop/cop/performance/string_replacement.rb +0 -1
- data/lib/rubocop/cop/performance/times_map.rb +0 -1
- data/lib/rubocop/cop/rails/action_filter.rb +2 -3
- data/lib/rubocop/cop/rails/date.rb +0 -1
- data/lib/rubocop/cop/rails/delegate.rb +0 -1
- data/lib/rubocop/cop/rails/delegate_allow_blank.rb +62 -0
- data/lib/rubocop/cop/rails/dynamic_find_by.rb +77 -0
- data/lib/rubocop/cop/rails/exit.rb +0 -1
- data/lib/rubocop/cop/rails/find_by.rb +0 -1
- data/lib/rubocop/cop/rails/find_each.rb +0 -1
- data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +0 -1
- data/lib/rubocop/cop/rails/http_positional_arguments.rb +89 -0
- data/lib/rubocop/cop/rails/not_null_column.rb +1 -2
- data/lib/rubocop/cop/rails/output.rb +0 -1
- data/lib/rubocop/cop/rails/output_safety.rb +1 -2
- data/lib/rubocop/cop/rails/pluralization_grammar.rb +0 -1
- data/lib/rubocop/cop/rails/read_write_attribute.rb +0 -1
- data/lib/rubocop/cop/rails/request_referer.rb +0 -1
- data/lib/rubocop/cop/rails/safe_navigation.rb +0 -1
- data/lib/rubocop/cop/rails/save_bang.rb +12 -3
- data/lib/rubocop/cop/rails/scope_args.rb +0 -1
- data/lib/rubocop/cop/rails/time_zone.rb +0 -1
- data/lib/rubocop/cop/rails/uniq_before_pluck.rb +1 -2
- data/lib/rubocop/cop/rails/validation.rb +0 -1
- data/lib/rubocop/cop/security/json_load.rb +11 -3
- data/lib/rubocop/cop/severity.rb +0 -1
- data/lib/rubocop/cop/style/access_modifier_indentation.rb +0 -1
- data/lib/rubocop/cop/style/accessor_method_name.rb +0 -1
- data/lib/rubocop/cop/style/alias.rb +0 -1
- data/lib/rubocop/cop/style/align_array.rb +0 -1
- data/lib/rubocop/cop/style/align_hash.rb +0 -1
- data/lib/rubocop/cop/style/align_parameters.rb +0 -1
- data/lib/rubocop/cop/style/and_or.rb +0 -1
- data/lib/rubocop/cop/style/array_join.rb +0 -1
- data/lib/rubocop/cop/style/ascii_comments.rb +0 -1
- data/lib/rubocop/cop/style/ascii_identifiers.rb +0 -1
- data/lib/rubocop/cop/style/attr.rb +0 -1
- data/lib/rubocop/cop/style/auto_resource_cleanup.rb +0 -1
- data/lib/rubocop/cop/style/bare_percent_literals.rb +0 -1
- data/lib/rubocop/cop/style/begin_block.rb +0 -1
- data/lib/rubocop/cop/style/block_comments.rb +0 -1
- data/lib/rubocop/cop/style/block_delimiters.rb +0 -1
- data/lib/rubocop/cop/style/block_end_newline.rb +0 -1
- data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +0 -1
- data/lib/rubocop/cop/style/case_equality.rb +0 -1
- data/lib/rubocop/cop/style/case_indentation.rb +0 -1
- data/lib/rubocop/cop/style/character_literal.rb +0 -1
- data/lib/rubocop/cop/style/class_and_module_camel_case.rb +0 -1
- data/lib/rubocop/cop/style/class_and_module_children.rb +0 -1
- data/lib/rubocop/cop/style/class_check.rb +0 -1
- data/lib/rubocop/cop/style/class_methods.rb +0 -1
- data/lib/rubocop/cop/style/class_vars.rb +0 -1
- data/lib/rubocop/cop/style/closing_parenthesis_indentation.rb +0 -1
- data/lib/rubocop/cop/style/collection_methods.rb +0 -1
- data/lib/rubocop/cop/style/colon_method_call.rb +0 -1
- data/lib/rubocop/cop/style/command_literal.rb +0 -1
- data/lib/rubocop/cop/style/comment_annotation.rb +0 -1
- data/lib/rubocop/cop/style/comment_indentation.rb +0 -1
- data/lib/rubocop/cop/style/conditional_assignment.rb +0 -1
- data/lib/rubocop/cop/style/constant_name.rb +0 -1
- data/lib/rubocop/cop/style/copyright.rb +0 -1
- data/lib/rubocop/cop/style/def_with_parentheses.rb +0 -1
- data/lib/rubocop/cop/style/documentation.rb +0 -1
- data/lib/rubocop/cop/style/documentation_method.rb +0 -1
- data/lib/rubocop/cop/style/dot_position.rb +0 -1
- data/lib/rubocop/cop/style/double_negation.rb +0 -1
- data/lib/rubocop/cop/style/each_for_simple_loop.rb +0 -1
- data/lib/rubocop/cop/style/each_with_object.rb +0 -1
- data/lib/rubocop/cop/style/else_alignment.rb +0 -1
- data/lib/rubocop/cop/style/empty_case_condition.rb +0 -1
- data/lib/rubocop/cop/style/empty_else.rb +7 -6
- data/lib/rubocop/cop/style/empty_line_between_defs.rb +0 -1
- data/lib/rubocop/cop/style/empty_lines.rb +0 -1
- data/lib/rubocop/cop/style/empty_lines_around_access_modifier.rb +15 -8
- data/lib/rubocop/cop/style/empty_lines_around_block_body.rb +0 -1
- data/lib/rubocop/cop/style/empty_lines_around_class_body.rb +0 -1
- data/lib/rubocop/cop/style/empty_lines_around_method_body.rb +0 -1
- data/lib/rubocop/cop/style/empty_lines_around_module_body.rb +0 -1
- data/lib/rubocop/cop/style/empty_literal.rb +0 -1
- data/lib/rubocop/cop/style/encoding.rb +0 -1
- data/lib/rubocop/cop/style/end_block.rb +0 -1
- data/lib/rubocop/cop/style/end_of_line.rb +0 -1
- data/lib/rubocop/cop/style/even_odd.rb +0 -1
- data/lib/rubocop/cop/style/extra_spacing.rb +5 -4
- data/lib/rubocop/cop/style/file_name.rb +0 -1
- data/lib/rubocop/cop/style/first_array_element_line_break.rb +0 -1
- data/lib/rubocop/cop/style/first_hash_element_line_break.rb +0 -1
- data/lib/rubocop/cop/style/first_method_argument_line_break.rb +0 -1
- data/lib/rubocop/cop/style/first_method_parameter_line_break.rb +0 -1
- data/lib/rubocop/cop/style/first_parameter_indentation.rb +0 -1
- data/lib/rubocop/cop/style/flip_flop.rb +0 -1
- data/lib/rubocop/cop/style/for.rb +0 -1
- data/lib/rubocop/cop/style/format_string.rb +0 -1
- data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +0 -1
- data/lib/rubocop/cop/style/global_vars.rb +0 -1
- data/lib/rubocop/cop/style/guard_clause.rb +2 -4
- data/lib/rubocop/cop/style/hash_syntax.rb +0 -1
- data/lib/rubocop/cop/style/identical_conditional_branches.rb +0 -1
- data/lib/rubocop/cop/style/if_inside_else.rb +0 -1
- data/lib/rubocop/cop/style/if_unless_modifier.rb +0 -1
- data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +0 -1
- data/lib/rubocop/cop/style/if_with_semicolon.rb +0 -1
- data/lib/rubocop/cop/style/implicit_runtime_error.rb +0 -1
- data/lib/rubocop/cop/style/indent_array.rb +0 -1
- data/lib/rubocop/cop/style/indent_assignment.rb +0 -1
- data/lib/rubocop/cop/style/indent_hash.rb +0 -1
- data/lib/rubocop/cop/style/indentation_consistency.rb +0 -1
- data/lib/rubocop/cop/style/indentation_width.rb +0 -1
- data/lib/rubocop/cop/style/infinite_loop.rb +0 -1
- data/lib/rubocop/cop/style/initial_indentation.rb +0 -1
- data/lib/rubocop/cop/style/inline_comment.rb +0 -1
- data/lib/rubocop/cop/style/lambda.rb +0 -1
- data/lib/rubocop/cop/style/lambda_call.rb +0 -1
- data/lib/rubocop/cop/style/leading_comment_space.rb +0 -1
- data/lib/rubocop/cop/style/line_end_concatenation.rb +1 -2
- data/lib/rubocop/cop/style/method_call_parentheses.rb +0 -1
- data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +0 -1
- data/lib/rubocop/cop/style/method_def_parentheses.rb +0 -1
- data/lib/rubocop/cop/style/method_missing.rb +0 -1
- data/lib/rubocop/cop/style/method_name.rb +0 -1
- data/lib/rubocop/cop/style/missing_else.rb +0 -1
- data/lib/rubocop/cop/style/module_function.rb +0 -1
- data/lib/rubocop/cop/style/multiline_array_brace_layout.rb +0 -1
- data/lib/rubocop/cop/style/multiline_assignment_layout.rb +0 -1
- data/lib/rubocop/cop/style/multiline_block_chain.rb +0 -1
- data/lib/rubocop/cop/style/multiline_block_layout.rb +0 -1
- data/lib/rubocop/cop/style/multiline_hash_brace_layout.rb +0 -1
- data/lib/rubocop/cop/style/multiline_if_then.rb +0 -1
- data/lib/rubocop/cop/style/multiline_memoization.rb +44 -0
- data/lib/rubocop/cop/style/multiline_method_call_brace_layout.rb +0 -1
- data/lib/rubocop/cop/style/multiline_method_call_indentation.rb +0 -1
- data/lib/rubocop/cop/style/multiline_method_definition_brace_layout.rb +0 -1
- data/lib/rubocop/cop/style/multiline_operation_indentation.rb +0 -1
- data/lib/rubocop/cop/style/multiline_ternary_operator.rb +0 -1
- data/lib/rubocop/cop/style/mutable_constant.rb +0 -1
- data/lib/rubocop/cop/style/negated_if.rb +0 -1
- data/lib/rubocop/cop/style/negated_while.rb +0 -1
- data/lib/rubocop/cop/style/nested_modifier.rb +0 -1
- data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +0 -1
- data/lib/rubocop/cop/style/nested_ternary_operator.rb +0 -1
- data/lib/rubocop/cop/style/next.rb +0 -1
- data/lib/rubocop/cop/style/nil_comparison.rb +0 -1
- data/lib/rubocop/cop/style/non_nil_check.rb +18 -2
- data/lib/rubocop/cop/style/not.rb +0 -1
- data/lib/rubocop/cop/style/numeric_literal_prefix.rb +2 -5
- data/lib/rubocop/cop/style/numeric_literals.rb +0 -1
- data/lib/rubocop/cop/style/numeric_predicate.rb +0 -1
- data/lib/rubocop/cop/style/one_line_conditional.rb +0 -1
- data/lib/rubocop/cop/style/op_method.rb +0 -1
- data/lib/rubocop/cop/style/option_hash.rb +0 -1
- data/lib/rubocop/cop/style/optional_arguments.rb +0 -1
- data/lib/rubocop/cop/style/parallel_assignment.rb +13 -2
- data/lib/rubocop/cop/style/parentheses_around_condition.rb +0 -1
- data/lib/rubocop/cop/style/percent_literal_delimiters.rb +0 -1
- data/lib/rubocop/cop/style/percent_q_literals.rb +0 -1
- data/lib/rubocop/cop/style/perl_backrefs.rb +0 -1
- data/lib/rubocop/cop/style/predicate_name.rb +0 -1
- data/lib/rubocop/cop/style/preferred_hash_methods.rb +44 -6
- data/lib/rubocop/cop/style/proc.rb +0 -1
- data/lib/rubocop/cop/style/raise_args.rb +13 -14
- data/lib/rubocop/cop/style/redundant_begin.rb +0 -1
- data/lib/rubocop/cop/style/redundant_exception.rb +0 -1
- data/lib/rubocop/cop/style/redundant_freeze.rb +0 -1
- data/lib/rubocop/cop/style/redundant_parentheses.rb +2 -2
- data/lib/rubocop/cop/style/redundant_return.rb +37 -9
- data/lib/rubocop/cop/style/redundant_self.rb +0 -1
- data/lib/rubocop/cop/style/regexp_literal.rb +0 -1
- data/lib/rubocop/cop/style/rescue_ensure_alignment.rb +0 -1
- data/lib/rubocop/cop/style/rescue_modifier.rb +0 -1
- data/lib/rubocop/cop/style/safe_navigation.rb +51 -39
- data/lib/rubocop/cop/style/self_assignment.rb +0 -1
- data/lib/rubocop/cop/style/semicolon.rb +0 -1
- data/lib/rubocop/cop/style/send.rb +0 -1
- data/lib/rubocop/cop/style/signal_exception.rb +0 -1
- data/lib/rubocop/cop/style/single_line_block_params.rb +0 -1
- data/lib/rubocop/cop/style/single_line_methods.rb +0 -1
- data/lib/rubocop/cop/style/space_after_colon.rb +0 -1
- data/lib/rubocop/cop/style/space_after_comma.rb +0 -1
- data/lib/rubocop/cop/style/space_after_method_name.rb +0 -1
- data/lib/rubocop/cop/style/space_after_not.rb +0 -1
- data/lib/rubocop/cop/style/space_after_semicolon.rb +0 -1
- data/lib/rubocop/cop/style/space_around_block_parameters.rb +0 -1
- data/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb +0 -1
- data/lib/rubocop/cop/style/space_around_keyword.rb +0 -1
- data/lib/rubocop/cop/style/space_around_operators.rb +0 -1
- data/lib/rubocop/cop/style/space_before_block_braces.rb +0 -1
- data/lib/rubocop/cop/style/space_before_comma.rb +0 -1
- data/lib/rubocop/cop/style/space_before_comment.rb +0 -1
- data/lib/rubocop/cop/style/space_before_first_arg.rb +0 -1
- data/lib/rubocop/cop/style/space_before_semicolon.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_array_percent_literal.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_block_braces.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_brackets.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_parens.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_percent_literal_delimiters.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_range_literal.rb +0 -1
- data/lib/rubocop/cop/style/space_inside_string_interpolation.rb +0 -1
- data/lib/rubocop/cop/style/special_global_vars.rb +0 -1
- data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +0 -1
- data/lib/rubocop/cop/style/string_literals.rb +0 -1
- data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +0 -1
- data/lib/rubocop/cop/style/string_methods.rb +0 -1
- data/lib/rubocop/cop/style/struct_inheritance.rb +0 -1
- data/lib/rubocop/cop/style/symbol_array.rb +0 -1
- data/lib/rubocop/cop/style/symbol_literal.rb +0 -1
- data/lib/rubocop/cop/style/symbol_proc.rb +0 -1
- data/lib/rubocop/cop/style/tab.rb +0 -1
- data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -2
- data/lib/rubocop/cop/style/trailing_blank_lines.rb +0 -1
- data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +0 -1
- data/lib/rubocop/cop/style/trailing_comma_in_literal.rb +0 -1
- data/lib/rubocop/cop/style/trailing_underscore_variable.rb +0 -1
- data/lib/rubocop/cop/style/trailing_whitespace.rb +0 -1
- data/lib/rubocop/cop/style/trivial_accessors.rb +0 -1
- data/lib/rubocop/cop/style/unless_else.rb +0 -1
- data/lib/rubocop/cop/style/unneeded_capital_w.rb +3 -2
- data/lib/rubocop/cop/style/unneeded_interpolation.rb +0 -1
- data/lib/rubocop/cop/style/unneeded_percent_q.rb +0 -1
- data/lib/rubocop/cop/style/variable_interpolation.rb +0 -1
- data/lib/rubocop/cop/style/variable_name.rb +0 -1
- data/lib/rubocop/cop/style/variable_number.rb +0 -1
- data/lib/rubocop/cop/style/when_then.rb +0 -1
- data/lib/rubocop/cop/style/while_until_do.rb +0 -1
- data/lib/rubocop/cop/style/while_until_modifier.rb +0 -1
- data/lib/rubocop/cop/style/word_array.rb +0 -1
- data/lib/rubocop/cop/style/zero_length_predicate.rb +0 -1
- data/lib/rubocop/cop/team.rb +1 -2
- data/lib/rubocop/cop/util.rb +11 -6
- data/lib/rubocop/cop/variable_force.rb +0 -1
- data/lib/rubocop/cop/variable_force/assignment.rb +0 -1
- data/lib/rubocop/cop/variable_force/locatable.rb +0 -1
- data/lib/rubocop/cop/variable_force/reference.rb +0 -1
- data/lib/rubocop/cop/variable_force/scope.rb +0 -1
- data/lib/rubocop/cop/variable_force/variable.rb +0 -1
- data/lib/rubocop/cop/variable_force/variable_table.rb +0 -1
- data/lib/rubocop/error.rb +0 -1
- data/lib/rubocop/formatter/base_formatter.rb +0 -1
- data/lib/rubocop/formatter/clang_style_formatter.rb +0 -1
- data/lib/rubocop/formatter/colorizable.rb +0 -1
- data/lib/rubocop/formatter/disabled_config_formatter.rb +0 -1
- data/lib/rubocop/formatter/disabled_lines_formatter.rb +0 -1
- data/lib/rubocop/formatter/emacs_style_formatter.rb +0 -1
- data/lib/rubocop/formatter/file_list_formatter.rb +0 -1
- data/lib/rubocop/formatter/formatter_set.rb +0 -1
- data/lib/rubocop/formatter/fuubar_style_formatter.rb +0 -1
- data/lib/rubocop/formatter/html_formatter.rb +2 -3
- data/lib/rubocop/formatter/json_formatter.rb +0 -1
- data/lib/rubocop/formatter/offense_count_formatter.rb +0 -1
- data/lib/rubocop/formatter/progress_formatter.rb +0 -1
- data/lib/rubocop/formatter/simple_text_formatter.rb +0 -1
- data/lib/rubocop/formatter/text_util.rb +0 -1
- data/lib/rubocop/formatter/worst_offenders_formatter.rb +0 -1
- data/lib/rubocop/name_similarity.rb +0 -1
- data/lib/rubocop/node_pattern.rb +0 -1
- data/lib/rubocop/options.rb +0 -1
- data/lib/rubocop/path_util.rb +0 -1
- data/lib/rubocop/processed_source.rb +3 -4
- data/lib/rubocop/rake_task.rb +0 -1
- data/lib/rubocop/remote_config.rb +0 -1
- data/lib/rubocop/result_cache.rb +3 -4
- data/lib/rubocop/rspec/cop_helper.rb +0 -1
- data/lib/rubocop/rspec/host_environment_simulation_helper.rb +0 -1
- data/lib/rubocop/rspec/shared_contexts.rb +0 -1
- data/lib/rubocop/rspec/shared_examples.rb +0 -1
- data/lib/rubocop/rspec/support.rb +0 -1
- data/lib/rubocop/runner.rb +0 -1
- data/lib/rubocop/string_interpreter.rb +0 -1
- data/lib/rubocop/string_util.rb +0 -1
- data/lib/rubocop/target_finder.rb +0 -1
- data/lib/rubocop/token.rb +0 -1
- data/lib/rubocop/version.rb +1 -2
- data/lib/rubocop/warning.rb +0 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1631a5c10e3bd5546d7b4a55a63148fabaacf058
|
4
|
+
data.tar.gz: c7e8faab79e7dabafb495fb1037298b6b3785b3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59371070490a54dba2fc417cb1d00d45eab85e407d9cacf6d457f652ae5721619bfcb891f980f3446dc72a902104afb1da9c7ee022d44f5cab6fdae17dc9ad12
|
7
|
+
data.tar.gz: eeb000ca52cac9ed4aaec1185444bb8af0928711fceba785c77dfea1e6d512a773cf489d56fa782bab1bb56726ae35e45b56b64ac3d6223bc35b27a40516e799
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
|
|
51
51
|
might want to use a conservative version locking in your `Gemfile`:
|
52
52
|
|
53
53
|
```rb
|
54
|
-
gem 'rubocop', '~> 0.
|
54
|
+
gem 'rubocop', '~> 0.44.0', require: false
|
55
55
|
```
|
56
56
|
|
57
57
|
## Quickstart
|
data/bin/rubocop
CHANGED
data/config/default.yml
CHANGED
@@ -39,6 +39,9 @@ AllCops:
|
|
39
39
|
# behavior by overriding DisplayStyleGuide, or by giving the
|
40
40
|
# -S/--display-style-guide option.
|
41
41
|
DisplayStyleGuide: false
|
42
|
+
# When specifying style guide URLs, any paths and/or fragments will be
|
43
|
+
# evaluated relative to the base URL.
|
44
|
+
StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
|
42
45
|
# Extra details are not displayed in offense messages by default. Change
|
43
46
|
# behavior by overriding ExtraDetails, or by giving the
|
44
47
|
# -E/--extra-details option.
|
@@ -432,12 +435,14 @@ Style/EmptyLinesAroundClassBody:
|
|
432
435
|
EnforcedStyle: no_empty_lines
|
433
436
|
SupportedStyles:
|
434
437
|
- empty_lines
|
438
|
+
- empty_lines_except_namespace
|
435
439
|
- no_empty_lines
|
436
440
|
|
437
441
|
Style/EmptyLinesAroundModuleBody:
|
438
442
|
EnforcedStyle: no_empty_lines
|
439
443
|
SupportedStyles:
|
440
444
|
- empty_lines
|
445
|
+
- empty_lines_except_namespace
|
441
446
|
- no_empty_lines
|
442
447
|
|
443
448
|
# Checks whether the source file has a utf-8 encoding comment or not
|
@@ -817,6 +822,12 @@ Style/PredicateName:
|
|
817
822
|
Exclude:
|
818
823
|
- 'spec/**/*'
|
819
824
|
|
825
|
+
Style/PreferredHashMethods:
|
826
|
+
EnforcedStyle: short
|
827
|
+
SupportedStyles:
|
828
|
+
- short
|
829
|
+
- verbose
|
830
|
+
|
820
831
|
Style/RaiseArgs:
|
821
832
|
EnforcedStyle: exploded
|
822
833
|
SupportedStyles:
|
@@ -841,6 +852,11 @@ Style/RegexpLiteral:
|
|
841
852
|
# are found in the regexp string.
|
842
853
|
AllowInnerSlashes: false
|
843
854
|
|
855
|
+
Style/SafeNavigation:
|
856
|
+
# Safe navigation may cause a statement to start returning `nil` in addition
|
857
|
+
# to whatever it used to return.
|
858
|
+
ConvertCodeThatCanStartToReturnNil: false
|
859
|
+
|
844
860
|
Style/Semicolon:
|
845
861
|
# Allow ; to separate several expressions on the same line.
|
846
862
|
AllowAsExpressionSeparator: false
|
@@ -1109,11 +1125,22 @@ Metrics/LineLength:
|
|
1109
1125
|
URISchemes:
|
1110
1126
|
- http
|
1111
1127
|
- https
|
1128
|
+
# The IgnoreCopDirectives option causes the LineLength rule to ignore cop
|
1129
|
+
# directives like '# rubocop: enable ...' when calculating a line's length.
|
1130
|
+
IgnoreCopDirectives: false
|
1112
1131
|
|
1113
1132
|
Metrics/MethodLength:
|
1114
1133
|
CountComments: false # count full line comments?
|
1115
1134
|
Max: 10
|
1116
1135
|
|
1136
|
+
Metrics/BlockLength:
|
1137
|
+
CountComments: false # count full line comments?
|
1138
|
+
Max: 25
|
1139
|
+
Exclude:
|
1140
|
+
- 'Rakefile'
|
1141
|
+
- '**/*.rake'
|
1142
|
+
- 'spec/**/*.rb'
|
1143
|
+
|
1117
1144
|
Metrics/ParameterLists:
|
1118
1145
|
Max: 5
|
1119
1146
|
CountKeywordArgs: true
|
@@ -1211,6 +1238,10 @@ Rails/Date:
|
|
1211
1238
|
- strict
|
1212
1239
|
- flexible
|
1213
1240
|
|
1241
|
+
Rails/DynamicFindBy:
|
1242
|
+
Whitelist:
|
1243
|
+
- find_by_sql
|
1244
|
+
|
1214
1245
|
Rails/Exit:
|
1215
1246
|
Include:
|
1216
1247
|
- app/**/*.rb
|
data/config/disabled.yml
CHANGED
@@ -16,7 +16,7 @@ Style/AutoResourceCleanup:
|
|
16
16
|
|
17
17
|
Style/CollectionMethods:
|
18
18
|
Description: 'Preferred collection methods.'
|
19
|
-
StyleGuide: '
|
19
|
+
StyleGuide: '#map-find-select-reduce-size'
|
20
20
|
Enabled: false
|
21
21
|
|
22
22
|
Style/Copyright:
|
@@ -32,7 +32,7 @@ Style/DocumentationMethod:
|
|
32
32
|
|
33
33
|
Style/Encoding:
|
34
34
|
Description: 'Use UTF-8 as the source file encoding.'
|
35
|
-
StyleGuide: '
|
35
|
+
StyleGuide: '#utf-8'
|
36
36
|
Enabled: false
|
37
37
|
|
38
38
|
Style/FirstArrayElementLineBreak:
|
@@ -71,7 +71,7 @@ Style/InlineComment:
|
|
71
71
|
|
72
72
|
Style/MethodCalledOnDoEndBlock:
|
73
73
|
Description: 'Avoid chaining a method call on a do...end block.'
|
74
|
-
StyleGuide: '
|
74
|
+
StyleGuide: '#single-line-blocks'
|
75
75
|
Enabled: false
|
76
76
|
|
77
77
|
Style/MissingElse:
|
@@ -93,7 +93,7 @@ Style/MissingElse:
|
|
93
93
|
|
94
94
|
Style/MultilineAssignmentLayout:
|
95
95
|
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
96
|
-
StyleGuide: '
|
96
|
+
StyleGuide: '#indent-conditional-assignment'
|
97
97
|
Enabled: false
|
98
98
|
|
99
99
|
Style/OptionHash:
|
@@ -102,7 +102,7 @@ Style/OptionHash:
|
|
102
102
|
|
103
103
|
Style/Send:
|
104
104
|
Description: 'Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.'
|
105
|
-
StyleGuide: '
|
105
|
+
StyleGuide: '#prefer-public-send'
|
106
106
|
Enabled: false
|
107
107
|
|
108
108
|
Style/StringMethods:
|
@@ -111,5 +111,5 @@ Style/StringMethods:
|
|
111
111
|
|
112
112
|
Style/SymbolArray:
|
113
113
|
Description: 'Use %i or %I for arrays of symbols.'
|
114
|
-
StyleGuide: '
|
114
|
+
StyleGuide: '#percent-i'
|
115
115
|
Enabled: false
|
data/config/enabled.yml
CHANGED
@@ -2,24 +2,24 @@
|
|
2
2
|
|
3
3
|
Style/AccessModifierIndentation:
|
4
4
|
Description: Check indentation of private/protected visibility modifiers.
|
5
|
-
StyleGuide: '
|
5
|
+
StyleGuide: '#indent-public-private-protected'
|
6
6
|
Enabled: true
|
7
7
|
|
8
8
|
Style/AccessorMethodName:
|
9
9
|
Description: Check the naming of accessor methods for get_/set_.
|
10
|
-
StyleGuide: '
|
10
|
+
StyleGuide: '#accessor_mutator_method_names'
|
11
11
|
Enabled: true
|
12
12
|
|
13
13
|
Style/Alias:
|
14
14
|
Description: 'Use alias instead of alias_method.'
|
15
|
-
StyleGuide: '
|
15
|
+
StyleGuide: '#alias-method'
|
16
16
|
Enabled: true
|
17
17
|
|
18
18
|
Style/AlignArray:
|
19
19
|
Description: >-
|
20
20
|
Align the elements of an array literal if they span more than
|
21
21
|
one line.
|
22
|
-
StyleGuide: '
|
22
|
+
StyleGuide: '#align-multiline-arrays'
|
23
23
|
Enabled: true
|
24
24
|
|
25
25
|
Style/AlignHash:
|
@@ -32,47 +32,47 @@ Style/AlignParameters:
|
|
32
32
|
Description: >-
|
33
33
|
Align the parameters of a method call if they span more
|
34
34
|
than one line.
|
35
|
-
StyleGuide: '
|
35
|
+
StyleGuide: '#no-double-indent'
|
36
36
|
Enabled: true
|
37
37
|
|
38
38
|
Style/AndOr:
|
39
39
|
Description: 'Use &&/|| instead of and/or.'
|
40
|
-
StyleGuide: '
|
40
|
+
StyleGuide: '#no-and-or-or'
|
41
41
|
Enabled: true
|
42
42
|
|
43
43
|
Style/ArrayJoin:
|
44
44
|
Description: 'Use Array#join instead of Array#*.'
|
45
|
-
StyleGuide: '
|
45
|
+
StyleGuide: '#array-join'
|
46
46
|
Enabled: true
|
47
47
|
|
48
48
|
Style/AsciiComments:
|
49
49
|
Description: 'Use only ascii symbols in comments.'
|
50
|
-
StyleGuide: '
|
50
|
+
StyleGuide: '#english-comments'
|
51
51
|
Enabled: true
|
52
52
|
|
53
53
|
Style/AsciiIdentifiers:
|
54
54
|
Description: 'Use only ascii symbols in identifiers.'
|
55
|
-
StyleGuide: '
|
55
|
+
StyleGuide: '#english-identifiers'
|
56
56
|
Enabled: true
|
57
57
|
|
58
58
|
Style/Attr:
|
59
59
|
Description: 'Checks for uses of Module#attr.'
|
60
|
-
StyleGuide: '
|
60
|
+
StyleGuide: '#attr'
|
61
61
|
Enabled: true
|
62
62
|
|
63
63
|
Style/BeginBlock:
|
64
64
|
Description: 'Avoid the use of BEGIN blocks.'
|
65
|
-
StyleGuide: '
|
65
|
+
StyleGuide: '#no-BEGIN-blocks'
|
66
66
|
Enabled: true
|
67
67
|
|
68
68
|
Style/BarePercentLiterals:
|
69
69
|
Description: 'Checks if usage of %() or %Q() matches configuration.'
|
70
|
-
StyleGuide: '
|
70
|
+
StyleGuide: '#percent-q-shorthand'
|
71
71
|
Enabled: true
|
72
72
|
|
73
73
|
Style/BlockComments:
|
74
74
|
Description: 'Do not use block comments.'
|
75
|
-
StyleGuide: '
|
75
|
+
StyleGuide: '#no-block-comments'
|
76
76
|
Enabled: true
|
77
77
|
|
78
78
|
Style/BlockEndNewline:
|
@@ -84,7 +84,7 @@ Style/BlockDelimiters:
|
|
84
84
|
Avoid using {...} for multi-line blocks (multiline chaining is
|
85
85
|
always ugly).
|
86
86
|
Prefer {...} over do...end for single-line blocks.
|
87
|
-
StyleGuide: '
|
87
|
+
StyleGuide: '#single-line-blocks'
|
88
88
|
Enabled: true
|
89
89
|
|
90
90
|
Style/BracesAroundHashParameters:
|
@@ -93,22 +93,22 @@ Style/BracesAroundHashParameters:
|
|
93
93
|
|
94
94
|
Style/CaseEquality:
|
95
95
|
Description: 'Avoid explicit use of the case equality operator(===).'
|
96
|
-
StyleGuide: '
|
96
|
+
StyleGuide: '#no-case-equality'
|
97
97
|
Enabled: true
|
98
98
|
|
99
99
|
Style/CaseIndentation:
|
100
100
|
Description: 'Indentation of when in a case/when/[else/]end.'
|
101
|
-
StyleGuide: '
|
101
|
+
StyleGuide: '#indent-when-to-case'
|
102
102
|
Enabled: true
|
103
103
|
|
104
104
|
Style/CharacterLiteral:
|
105
105
|
Description: 'Checks for uses of character literals.'
|
106
|
-
StyleGuide: '
|
106
|
+
StyleGuide: '#no-character-literals'
|
107
107
|
Enabled: true
|
108
108
|
|
109
109
|
Style/ClassAndModuleCamelCase:
|
110
110
|
Description: 'Use CamelCase for classes and modules.'
|
111
|
-
StyleGuide: '
|
111
|
+
StyleGuide: '#camelcase-classes'
|
112
112
|
Enabled: true
|
113
113
|
|
114
114
|
Style/ClassAndModuleChildren:
|
@@ -121,12 +121,12 @@ Style/ClassCheck:
|
|
121
121
|
|
122
122
|
Style/ClassMethods:
|
123
123
|
Description: 'Use self when defining module/class methods.'
|
124
|
-
StyleGuide: '
|
124
|
+
StyleGuide: '#def-self-class-methods'
|
125
125
|
Enabled: true
|
126
126
|
|
127
127
|
Style/ClassVars:
|
128
128
|
Description: 'Avoid the use of class variables.'
|
129
|
-
StyleGuide: '
|
129
|
+
StyleGuide: '#no-class-vars'
|
130
130
|
Enabled: true
|
131
131
|
|
132
132
|
Style/ClosingParenthesisIndentation:
|
@@ -135,19 +135,19 @@ Style/ClosingParenthesisIndentation:
|
|
135
135
|
|
136
136
|
Style/ColonMethodCall:
|
137
137
|
Description: 'Do not use :: for method call.'
|
138
|
-
StyleGuide: '
|
138
|
+
StyleGuide: '#double-colons'
|
139
139
|
Enabled: true
|
140
140
|
|
141
141
|
Style/CommandLiteral:
|
142
142
|
Description: 'Use `` or %x around command literals.'
|
143
|
-
StyleGuide: '
|
143
|
+
StyleGuide: '#percent-x'
|
144
144
|
Enabled: true
|
145
145
|
|
146
146
|
Style/CommentAnnotation:
|
147
147
|
Description: >-
|
148
148
|
Checks formatting of special comments
|
149
149
|
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
150
|
-
StyleGuide: '
|
150
|
+
StyleGuide: '#annotate-keywords'
|
151
151
|
Enabled: true
|
152
152
|
|
153
153
|
Style/CommentIndentation:
|
@@ -163,17 +163,12 @@ Style/ConditionalAssignment:
|
|
163
163
|
|
164
164
|
Style/ConstantName:
|
165
165
|
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
166
|
-
StyleGuide: '
|
166
|
+
StyleGuide: '#screaming-snake-case'
|
167
167
|
Enabled: true
|
168
168
|
|
169
169
|
Style/DefWithParentheses:
|
170
170
|
Description: 'Use def with parentheses when there are arguments.'
|
171
|
-
StyleGuide: '
|
172
|
-
Enabled: true
|
173
|
-
|
174
|
-
Style/PreferredHashMethods:
|
175
|
-
Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
|
176
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
171
|
+
StyleGuide: '#method-parens'
|
177
172
|
Enabled: true
|
178
173
|
|
179
174
|
Style/Documentation:
|
@@ -185,12 +180,12 @@ Style/Documentation:
|
|
185
180
|
|
186
181
|
Style/DotPosition:
|
187
182
|
Description: 'Checks the position of the dot in multi-line method calls.'
|
188
|
-
StyleGuide: '
|
183
|
+
StyleGuide: '#consistent-multi-line-chains'
|
189
184
|
Enabled: true
|
190
185
|
|
191
186
|
Style/DoubleNegation:
|
192
187
|
Description: 'Checks for uses of double negation (!!).'
|
193
|
-
StyleGuide: '
|
188
|
+
StyleGuide: '#no-bang-bang'
|
194
189
|
Enabled: true
|
195
190
|
|
196
191
|
Style/EachForSimpleLoop:
|
@@ -217,7 +212,7 @@ Style/EmptyCaseCondition:
|
|
217
212
|
|
218
213
|
Style/EmptyLineBetweenDefs:
|
219
214
|
Description: 'Use empty lines between defs.'
|
220
|
-
StyleGuide: '
|
215
|
+
StyleGuide: '#empty-lines-between-methods'
|
221
216
|
Enabled: true
|
222
217
|
|
223
218
|
Style/EmptyLines:
|
@@ -246,22 +241,22 @@ Style/EmptyLinesAroundMethodBody:
|
|
246
241
|
|
247
242
|
Style/EmptyLiteral:
|
248
243
|
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
249
|
-
StyleGuide: '
|
244
|
+
StyleGuide: '#literal-array-hash'
|
250
245
|
Enabled: true
|
251
246
|
|
252
247
|
Style/EndBlock:
|
253
248
|
Description: 'Avoid the use of END blocks.'
|
254
|
-
StyleGuide: '
|
249
|
+
StyleGuide: '#no-END-blocks'
|
255
250
|
Enabled: true
|
256
251
|
|
257
252
|
Style/EndOfLine:
|
258
253
|
Description: 'Use Unix-style line endings.'
|
259
|
-
StyleGuide: '
|
254
|
+
StyleGuide: '#crlf'
|
260
255
|
Enabled: true
|
261
256
|
|
262
257
|
Style/EvenOdd:
|
263
258
|
Description: 'Favor the use of Integer#even? && Integer#odd?'
|
264
|
-
StyleGuide: '
|
259
|
+
StyleGuide: '#predicate-methods'
|
265
260
|
Enabled: true
|
266
261
|
|
267
262
|
Style/ExtraSpacing:
|
@@ -270,7 +265,7 @@ Style/ExtraSpacing:
|
|
270
265
|
|
271
266
|
Style/FileName:
|
272
267
|
Description: 'Use snake_case for source file names.'
|
273
|
-
StyleGuide: '
|
268
|
+
StyleGuide: '#snake-case-files'
|
274
269
|
Enabled: true
|
275
270
|
|
276
271
|
Style/FrozenStringLiteralComment:
|
@@ -290,35 +285,35 @@ Style/FirstParameterIndentation:
|
|
290
285
|
|
291
286
|
Style/FlipFlop:
|
292
287
|
Description: 'Checks for flip flops'
|
293
|
-
StyleGuide: '
|
288
|
+
StyleGuide: '#no-flip-flops'
|
294
289
|
Enabled: true
|
295
290
|
|
296
291
|
Style/For:
|
297
292
|
Description: 'Checks use of for or each in multiline loops.'
|
298
|
-
StyleGuide: '
|
293
|
+
StyleGuide: '#no-for-loops'
|
299
294
|
Enabled: true
|
300
295
|
|
301
296
|
Style/FormatString:
|
302
297
|
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
303
|
-
StyleGuide: '
|
298
|
+
StyleGuide: '#sprintf'
|
304
299
|
Enabled: true
|
305
300
|
|
306
301
|
Style/GlobalVars:
|
307
302
|
Description: 'Do not introduce global variables.'
|
308
|
-
StyleGuide: '
|
303
|
+
StyleGuide: '#instance-vars'
|
309
304
|
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
310
305
|
Enabled: true
|
311
306
|
|
312
307
|
Style/GuardClause:
|
313
308
|
Description: 'Check for conditionals that can be replaced with guard clauses'
|
314
|
-
StyleGuide: '
|
309
|
+
StyleGuide: '#no-nested-conditionals'
|
315
310
|
Enabled: true
|
316
311
|
|
317
312
|
Style/HashSyntax:
|
318
313
|
Description: >-
|
319
314
|
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
320
315
|
{ :a => 1, :b => 2 }.
|
321
|
-
StyleGuide: '
|
316
|
+
StyleGuide: '#hash-literals'
|
322
317
|
Enabled: true
|
323
318
|
|
324
319
|
Style/IfInsideElse:
|
@@ -329,7 +324,7 @@ Style/IfUnlessModifier:
|
|
329
324
|
Description: >-
|
330
325
|
Favor modifier if/unless usage when you have a
|
331
326
|
single-line body.
|
332
|
-
StyleGuide: '
|
327
|
+
StyleGuide: '#if-as-a-modifier'
|
333
328
|
Enabled: true
|
334
329
|
|
335
330
|
Style/IfUnlessModifierOfIfUnless:
|
@@ -339,7 +334,7 @@ Style/IfUnlessModifierOfIfUnless:
|
|
339
334
|
|
340
335
|
Style/IfWithSemicolon:
|
341
336
|
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
342
|
-
StyleGuide: '
|
337
|
+
StyleGuide: '#no-semicolon-ifs'
|
343
338
|
Enabled: true
|
344
339
|
|
345
340
|
Style/IndentationConsistency:
|
@@ -348,7 +343,7 @@ Style/IndentationConsistency:
|
|
348
343
|
|
349
344
|
Style/IndentationWidth:
|
350
345
|
Description: 'Use 2 spaces for indentation.'
|
351
|
-
StyleGuide: '
|
346
|
+
StyleGuide: '#spaces-indentation'
|
352
347
|
Enabled: true
|
353
348
|
|
354
349
|
Style/IdenticalConditionalBranches:
|
@@ -376,22 +371,22 @@ Style/IndentHash:
|
|
376
371
|
|
377
372
|
Style/InfiniteLoop:
|
378
373
|
Description: 'Use Kernel#loop for infinite loops.'
|
379
|
-
StyleGuide: '
|
374
|
+
StyleGuide: '#infinite-loop'
|
380
375
|
Enabled: true
|
381
376
|
|
382
377
|
Style/Lambda:
|
383
378
|
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
384
|
-
StyleGuide: '
|
379
|
+
StyleGuide: '#lambda-multi-line'
|
385
380
|
Enabled: true
|
386
381
|
|
387
382
|
Style/LambdaCall:
|
388
383
|
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
389
|
-
StyleGuide: '
|
384
|
+
StyleGuide: '#proc-call'
|
390
385
|
Enabled: true
|
391
386
|
|
392
387
|
Style/LeadingCommentSpace:
|
393
388
|
Description: 'Comments should start with a space.'
|
394
|
-
StyleGuide: '
|
389
|
+
StyleGuide: '#hash-space'
|
395
390
|
Enabled: true
|
396
391
|
|
397
392
|
Style/LineEndConcatenation:
|
@@ -402,29 +397,29 @@ Style/LineEndConcatenation:
|
|
402
397
|
|
403
398
|
Style/MethodCallParentheses:
|
404
399
|
Description: 'Do not use parentheses for method calls with no arguments.'
|
405
|
-
StyleGuide: '
|
400
|
+
StyleGuide: '#method-invocation-parens'
|
406
401
|
Enabled: true
|
407
402
|
|
408
403
|
Style/MethodDefParentheses:
|
409
404
|
Description: >-
|
410
405
|
Checks if the method definitions have or don't have
|
411
406
|
parentheses.
|
412
|
-
StyleGuide: '
|
407
|
+
StyleGuide: '#method-parens'
|
413
408
|
Enabled: true
|
414
409
|
|
415
410
|
Style/MethodName:
|
416
411
|
Description: 'Use the configured style when naming methods.'
|
417
|
-
StyleGuide: '
|
412
|
+
StyleGuide: '#snake-case-symbols-methods-vars'
|
418
413
|
Enabled: true
|
419
414
|
|
420
415
|
Style/MethodMissing:
|
421
416
|
Description: 'Avoid using `method_missing`.'
|
422
|
-
StyleGuide: '
|
417
|
+
StyleGuide: '#no-method-missing'
|
423
418
|
Enabled: true
|
424
419
|
|
425
420
|
Style/ModuleFunction:
|
426
421
|
Description: 'Checks for usage of `extend self` in modules.'
|
427
|
-
StyleGuide: '
|
422
|
+
StyleGuide: '#module-function'
|
428
423
|
Enabled: true
|
429
424
|
|
430
425
|
Style/MultilineArrayBraceLayout:
|
@@ -436,7 +431,7 @@ Style/MultilineArrayBraceLayout:
|
|
436
431
|
|
437
432
|
Style/MultilineBlockChain:
|
438
433
|
Description: 'Avoid multi-line chains of blocks.'
|
439
|
-
StyleGuide: '
|
434
|
+
StyleGuide: '#single-line-blocks'
|
440
435
|
Enabled: true
|
441
436
|
|
442
437
|
Style/MultilineBlockLayout:
|
@@ -452,7 +447,11 @@ Style/MultilineHashBraceLayout:
|
|
452
447
|
|
453
448
|
Style/MultilineIfThen:
|
454
449
|
Description: 'Do not use then for multi-line if/unless.'
|
455
|
-
StyleGuide: '
|
450
|
+
StyleGuide: '#no-then'
|
451
|
+
Enabled: true
|
452
|
+
|
453
|
+
Style/MultilineMemoization:
|
454
|
+
Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
|
456
455
|
Enabled: true
|
457
456
|
|
458
457
|
Style/MultilineMethodCallBraceLayout:
|
@@ -485,7 +484,7 @@ Style/MultilineTernaryOperator:
|
|
485
484
|
Description: >-
|
486
485
|
Avoid multi-line ?: (the ternary operator);
|
487
486
|
use if/unless instead.
|
488
|
-
StyleGuide: '
|
487
|
+
StyleGuide: '#no-multiline-ternary'
|
489
488
|
Enabled: true
|
490
489
|
|
491
490
|
Style/MutableConstant:
|
@@ -496,17 +495,17 @@ Style/NegatedIf:
|
|
496
495
|
Description: >-
|
497
496
|
Favor unless over if for negative conditions
|
498
497
|
(or control flow or).
|
499
|
-
StyleGuide: '
|
498
|
+
StyleGuide: '#unless-for-negatives'
|
500
499
|
Enabled: true
|
501
500
|
|
502
501
|
Style/NegatedWhile:
|
503
502
|
Description: 'Favor until over while for negative conditions.'
|
504
|
-
StyleGuide: '
|
503
|
+
StyleGuide: '#until-for-negatives'
|
505
504
|
Enabled: true
|
506
505
|
|
507
506
|
Style/NestedModifier:
|
508
507
|
Description: 'Avoid using nested modifiers.'
|
509
|
-
StyleGuide: '
|
508
|
+
StyleGuide: '#no-nested-modifiers'
|
510
509
|
Enabled: true
|
511
510
|
|
512
511
|
Style/NestedParenthesizedCalls:
|
@@ -517,65 +516,69 @@ Style/NestedParenthesizedCalls:
|
|
517
516
|
|
518
517
|
Style/NestedTernaryOperator:
|
519
518
|
Description: 'Use one expression per branch in a ternary operator.'
|
520
|
-
StyleGuide: '
|
519
|
+
StyleGuide: '#no-nested-ternary'
|
521
520
|
Enabled: true
|
522
521
|
|
523
522
|
Style/Next:
|
524
523
|
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
525
|
-
StyleGuide: '
|
524
|
+
StyleGuide: '#no-nested-conditionals'
|
526
525
|
Enabled: true
|
527
526
|
|
528
527
|
Style/NilComparison:
|
529
528
|
Description: 'Prefer x.nil? to x == nil.'
|
530
|
-
StyleGuide: '
|
529
|
+
StyleGuide: '#predicate-methods'
|
531
530
|
Enabled: true
|
532
531
|
|
533
532
|
Style/NonNilCheck:
|
534
533
|
Description: 'Checks for redundant nil checks.'
|
535
|
-
StyleGuide: '
|
534
|
+
StyleGuide: '#no-non-nil-checks'
|
536
535
|
Enabled: true
|
537
536
|
|
538
537
|
Style/Not:
|
539
538
|
Description: 'Use ! instead of not.'
|
540
|
-
StyleGuide: '
|
539
|
+
StyleGuide: '#bang-not-not'
|
541
540
|
Enabled: true
|
542
541
|
|
543
542
|
Style/NumericLiterals:
|
544
543
|
Description: >-
|
545
544
|
Add underscores to large numeric literals to improve their
|
546
545
|
readability.
|
547
|
-
StyleGuide: '
|
546
|
+
StyleGuide: '#underscores-in-numerics'
|
548
547
|
Enabled: true
|
549
548
|
|
550
549
|
Style/NumericLiteralPrefix:
|
551
550
|
Description: 'Use smallcase prefixes for numeric literals.'
|
552
|
-
StyleGuide: '
|
551
|
+
StyleGuide: '#numeric-literal-prefixes'
|
553
552
|
Enabled: true
|
554
553
|
|
555
554
|
Style/NumericPredicate:
|
556
555
|
Description: >-
|
557
556
|
Checks for the use of predicate- or comparison methods for
|
558
557
|
numeric comparisons.
|
559
|
-
StyleGuide: '
|
558
|
+
StyleGuide: '#predicate-methods'
|
559
|
+
# This will change to a new method call which isn't guaranteed to be on the
|
560
|
+
# object. Switching these methods has to be done with knowledge of the types
|
561
|
+
# of the variables which rubocop doesn't have.
|
562
|
+
AutoCorrect: false
|
560
563
|
Enabled: true
|
561
564
|
|
562
565
|
Style/OneLineConditional:
|
563
566
|
Description: >-
|
564
567
|
Favor the ternary operator(?:) over
|
565
568
|
if/then/else/end constructs.
|
566
|
-
StyleGuide: '
|
569
|
+
StyleGuide: '#ternary-operator'
|
567
570
|
Enabled: true
|
568
571
|
|
569
572
|
Style/OpMethod:
|
570
573
|
Description: 'When defining binary operators, name the argument other.'
|
571
|
-
StyleGuide: '
|
574
|
+
StyleGuide: '#other-arg'
|
572
575
|
Enabled: true
|
573
576
|
|
574
577
|
Style/OptionalArguments:
|
575
578
|
Description: >-
|
576
579
|
Checks for optional arguments that do not appear at the end
|
577
580
|
of the argument list
|
578
|
-
StyleGuide: '
|
581
|
+
StyleGuide: '#optional-arguments'
|
579
582
|
Enabled: true
|
580
583
|
|
581
584
|
Style/ParallelAssignment:
|
@@ -583,19 +586,19 @@ Style/ParallelAssignment:
|
|
583
586
|
Check for simple usages of parallel assignment.
|
584
587
|
It will only warn when the number of variables
|
585
588
|
matches on both sides of the assignment.
|
586
|
-
StyleGuide: '
|
589
|
+
StyleGuide: '#parallel-assignment'
|
587
590
|
Enabled: true
|
588
591
|
|
589
592
|
Style/ParenthesesAroundCondition:
|
590
593
|
Description: >-
|
591
594
|
Don't use parentheses around the condition of an
|
592
595
|
if/unless/while.
|
593
|
-
StyleGuide: '
|
596
|
+
StyleGuide: '#no-parens-if'
|
594
597
|
Enabled: true
|
595
598
|
|
596
599
|
Style/PercentLiteralDelimiters:
|
597
600
|
Description: 'Use `%`-literal delimiters consistently'
|
598
|
-
StyleGuide: '
|
601
|
+
StyleGuide: '#percent-literal-braces'
|
599
602
|
Enabled: true
|
600
603
|
|
601
604
|
Style/PercentQLiterals:
|
@@ -604,32 +607,37 @@ Style/PercentQLiterals:
|
|
604
607
|
|
605
608
|
Style/PerlBackrefs:
|
606
609
|
Description: 'Avoid Perl-style regex back references.'
|
607
|
-
StyleGuide: '
|
610
|
+
StyleGuide: '#no-perl-regexp-last-matchers'
|
608
611
|
Enabled: true
|
609
612
|
|
610
613
|
Style/PredicateName:
|
611
614
|
Description: 'Check the names of predicate methods.'
|
612
|
-
StyleGuide: '
|
615
|
+
StyleGuide: '#bool-methods-qmark'
|
616
|
+
Enabled: true
|
617
|
+
|
618
|
+
Style/PreferredHashMethods:
|
619
|
+
Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
|
620
|
+
StyleGuide: '#hash-key'
|
613
621
|
Enabled: true
|
614
622
|
|
615
623
|
Style/Proc:
|
616
624
|
Description: 'Use proc instead of Proc.new.'
|
617
|
-
StyleGuide: '
|
625
|
+
StyleGuide: '#proc'
|
618
626
|
Enabled: true
|
619
627
|
|
620
628
|
Style/RaiseArgs:
|
621
629
|
Description: 'Checks the arguments passed to raise/fail.'
|
622
|
-
StyleGuide: '
|
630
|
+
StyleGuide: '#exception-class-messages'
|
623
631
|
Enabled: true
|
624
632
|
|
625
633
|
Style/RedundantBegin:
|
626
634
|
Description: "Don't use begin blocks when they are not needed."
|
627
|
-
StyleGuide: '
|
635
|
+
StyleGuide: '#begin-implicit'
|
628
636
|
Enabled: true
|
629
637
|
|
630
638
|
Style/RedundantException:
|
631
639
|
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
632
|
-
StyleGuide: '
|
640
|
+
StyleGuide: '#no-explicit-runtimeerror'
|
633
641
|
Enabled: true
|
634
642
|
|
635
643
|
Style/RedundantFreeze:
|
@@ -642,17 +650,17 @@ Style/RedundantParentheses:
|
|
642
650
|
|
643
651
|
Style/RedundantReturn:
|
644
652
|
Description: "Don't use return where it's not required."
|
645
|
-
StyleGuide: '
|
653
|
+
StyleGuide: '#no-explicit-return'
|
646
654
|
Enabled: true
|
647
655
|
|
648
656
|
Style/RedundantSelf:
|
649
657
|
Description: "Don't use self where it's not needed."
|
650
|
-
StyleGuide: '
|
658
|
+
StyleGuide: '#no-self-unless-required'
|
651
659
|
Enabled: true
|
652
660
|
|
653
661
|
Style/RegexpLiteral:
|
654
662
|
Description: 'Use / or %r around regular expressions.'
|
655
|
-
StyleGuide: '
|
663
|
+
StyleGuide: '#percent-r'
|
656
664
|
Enabled: true
|
657
665
|
|
658
666
|
Style/RescueEnsureAlignment:
|
@@ -661,7 +669,7 @@ Style/RescueEnsureAlignment:
|
|
661
669
|
|
662
670
|
Style/RescueModifier:
|
663
671
|
Description: 'Avoid using rescue in its modifier form.'
|
664
|
-
StyleGuide: '
|
672
|
+
StyleGuide: '#no-rescue-modifiers'
|
665
673
|
Enabled: true
|
666
674
|
|
667
675
|
Style/SafeNavigation:
|
@@ -675,27 +683,27 @@ Style/SelfAssignment:
|
|
675
683
|
Description: >-
|
676
684
|
Checks for places where self-assignment shorthand should have
|
677
685
|
been used.
|
678
|
-
StyleGuide: '
|
686
|
+
StyleGuide: '#self-assignment'
|
679
687
|
Enabled: true
|
680
688
|
|
681
689
|
Style/Semicolon:
|
682
690
|
Description: "Don't use semicolons to terminate expressions."
|
683
|
-
StyleGuide: '
|
691
|
+
StyleGuide: '#no-semicolon'
|
684
692
|
Enabled: true
|
685
693
|
|
686
694
|
Style/SignalException:
|
687
695
|
Description: 'Checks for proper usage of fail and raise.'
|
688
|
-
StyleGuide: '
|
696
|
+
StyleGuide: '#prefer-raise-over-fail'
|
689
697
|
Enabled: true
|
690
698
|
|
691
699
|
Style/SingleLineBlockParams:
|
692
700
|
Description: 'Enforces the names of some block params.'
|
693
|
-
StyleGuide: '
|
701
|
+
StyleGuide: '#reduce-blocks'
|
694
702
|
Enabled: true
|
695
703
|
|
696
704
|
Style/SingleLineMethods:
|
697
705
|
Description: 'Avoid single-line methods.'
|
698
|
-
StyleGuide: '
|
706
|
+
StyleGuide: '#no-single-line-methods'
|
699
707
|
Enabled: true
|
700
708
|
|
701
709
|
Style/SpaceBeforeFirstArg:
|
@@ -706,29 +714,29 @@ Style/SpaceBeforeFirstArg:
|
|
706
714
|
|
707
715
|
Style/SpaceAfterColon:
|
708
716
|
Description: 'Use spaces after colons.'
|
709
|
-
StyleGuide: '
|
717
|
+
StyleGuide: '#spaces-operators'
|
710
718
|
Enabled: true
|
711
719
|
|
712
720
|
Style/SpaceAfterComma:
|
713
721
|
Description: 'Use spaces after commas.'
|
714
|
-
StyleGuide: '
|
722
|
+
StyleGuide: '#spaces-operators'
|
715
723
|
Enabled: true
|
716
724
|
|
717
725
|
Style/SpaceAfterMethodName:
|
718
726
|
Description: >-
|
719
727
|
Do not put a space between a method name and the opening
|
720
728
|
parenthesis in a method definition.
|
721
|
-
StyleGuide: '
|
729
|
+
StyleGuide: '#parens-no-spaces'
|
722
730
|
Enabled: true
|
723
731
|
|
724
732
|
Style/SpaceAfterNot:
|
725
733
|
Description: Tracks redundant space after the ! operator.
|
726
|
-
StyleGuide: '
|
734
|
+
StyleGuide: '#no-space-bang'
|
727
735
|
Enabled: true
|
728
736
|
|
729
737
|
Style/SpaceAfterSemicolon:
|
730
738
|
Description: 'Use spaces after semicolons.'
|
731
|
-
StyleGuide: '
|
739
|
+
StyleGuide: '#spaces-operators'
|
732
740
|
Enabled: true
|
733
741
|
|
734
742
|
Style/SpaceBeforeBlockBraces:
|
@@ -767,7 +775,7 @@ Style/SpaceAroundEqualsInParameterDefault:
|
|
767
775
|
Checks that the equals signs in parameter default assignments
|
768
776
|
have or don't have surrounding space depending on
|
769
777
|
configuration.
|
770
|
-
StyleGuide: '
|
778
|
+
StyleGuide: '#spaces-around-equals'
|
771
779
|
Enabled: true
|
772
780
|
|
773
781
|
Style/SpaceAroundKeyword:
|
@@ -776,7 +784,7 @@ Style/SpaceAroundKeyword:
|
|
776
784
|
|
777
785
|
Style/SpaceAroundOperators:
|
778
786
|
Description: 'Use a single space around operators.'
|
779
|
-
StyleGuide: '
|
787
|
+
StyleGuide: '#spaces-operators'
|
780
788
|
Enabled: true
|
781
789
|
|
782
790
|
Style/SpaceInsideArrayPercentLiteral:
|
@@ -789,42 +797,42 @@ Style/SpaceInsidePercentLiteralDelimiters:
|
|
789
797
|
|
790
798
|
Style/SpaceInsideBrackets:
|
791
799
|
Description: 'No spaces after [ or before ].'
|
792
|
-
StyleGuide: '
|
800
|
+
StyleGuide: '#no-spaces-braces'
|
793
801
|
Enabled: true
|
794
802
|
|
795
803
|
Style/SpaceInsideHashLiteralBraces:
|
796
804
|
Description: "Use spaces inside hash literal braces - or don't."
|
797
|
-
StyleGuide: '
|
805
|
+
StyleGuide: '#spaces-operators'
|
798
806
|
Enabled: true
|
799
807
|
|
800
808
|
Style/SpaceInsideParens:
|
801
809
|
Description: 'No spaces after ( or before ).'
|
802
|
-
StyleGuide: '
|
810
|
+
StyleGuide: '#no-spaces-braces'
|
803
811
|
Enabled: true
|
804
812
|
|
805
813
|
Style/SpaceInsideRangeLiteral:
|
806
814
|
Description: 'No spaces inside range literals.'
|
807
|
-
StyleGuide: '
|
815
|
+
StyleGuide: '#no-space-inside-range-literals'
|
808
816
|
Enabled: true
|
809
817
|
|
810
818
|
Style/SpaceInsideStringInterpolation:
|
811
819
|
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
812
|
-
StyleGuide: '
|
820
|
+
StyleGuide: '#string-interpolation'
|
813
821
|
Enabled: true
|
814
822
|
|
815
823
|
Style/SpecialGlobalVars:
|
816
824
|
Description: 'Avoid Perl-style global variables.'
|
817
|
-
StyleGuide: '
|
825
|
+
StyleGuide: '#no-cryptic-perlisms'
|
818
826
|
Enabled: true
|
819
827
|
|
820
828
|
Style/StabbyLambdaParentheses:
|
821
829
|
Description: 'Check for the usage of parentheses around stabby lambda arguments.'
|
822
|
-
StyleGuide: '
|
830
|
+
StyleGuide: '#stabby-lambda-with-args'
|
823
831
|
Enabled: true
|
824
832
|
|
825
833
|
Style/StringLiterals:
|
826
834
|
Description: 'Checks if uses of quotes match the configured preference.'
|
827
|
-
StyleGuide: '
|
835
|
+
StyleGuide: '#consistent-string-literals'
|
828
836
|
Enabled: true
|
829
837
|
|
830
838
|
Style/StringLiteralsInInterpolation:
|
@@ -835,7 +843,7 @@ Style/StringLiteralsInInterpolation:
|
|
835
843
|
|
836
844
|
Style/StructInheritance:
|
837
845
|
Description: 'Checks for inheritance from Struct.new.'
|
838
|
-
StyleGuide: '
|
846
|
+
StyleGuide: '#no-extend-struct-new'
|
839
847
|
Enabled: true
|
840
848
|
|
841
849
|
Style/SymbolLiteral:
|
@@ -848,7 +856,7 @@ Style/SymbolProc:
|
|
848
856
|
|
849
857
|
Style/Tab:
|
850
858
|
Description: 'No hard tabs.'
|
851
|
-
StyleGuide: '
|
859
|
+
StyleGuide: '#spaces-indentation'
|
852
860
|
Enabled: true
|
853
861
|
|
854
862
|
Style/TernaryParentheses:
|
@@ -857,34 +865,34 @@ Style/TernaryParentheses:
|
|
857
865
|
|
858
866
|
Style/TrailingBlankLines:
|
859
867
|
Description: 'Checks trailing blank lines and final newline.'
|
860
|
-
StyleGuide: '
|
868
|
+
StyleGuide: '#newline-eof'
|
861
869
|
Enabled: true
|
862
870
|
|
863
871
|
Style/TrailingCommaInArguments:
|
864
872
|
Description: 'Checks for trailing comma in argument lists.'
|
865
|
-
StyleGuide: '
|
873
|
+
StyleGuide: '#no-trailing-params-comma'
|
866
874
|
Enabled: true
|
867
875
|
|
868
876
|
Style/TrailingCommaInLiteral:
|
869
877
|
Description: 'Checks for trailing comma in array and hash literals.'
|
870
|
-
StyleGuide: '
|
878
|
+
StyleGuide: '#no-trailing-array-commas'
|
871
879
|
Enabled: true
|
872
880
|
|
873
881
|
Style/TrailingWhitespace:
|
874
882
|
Description: 'Avoid trailing whitespace.'
|
875
|
-
StyleGuide: '
|
883
|
+
StyleGuide: '#no-trailing-whitespace'
|
876
884
|
Enabled: true
|
877
885
|
|
878
886
|
Style/TrivialAccessors:
|
879
887
|
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
880
|
-
StyleGuide: '
|
888
|
+
StyleGuide: '#attr_family'
|
881
889
|
Enabled: true
|
882
890
|
|
883
891
|
Style/UnlessElse:
|
884
892
|
Description: >-
|
885
893
|
Do not use unless with else. Rewrite these with the positive
|
886
894
|
case first.
|
887
|
-
StyleGuide: '
|
895
|
+
StyleGuide: '#no-else-with-unless'
|
888
896
|
Enabled: true
|
889
897
|
|
890
898
|
Style/UnneededCapitalW:
|
@@ -897,7 +905,7 @@ Style/UnneededInterpolation:
|
|
897
905
|
|
898
906
|
Style/UnneededPercentQ:
|
899
907
|
Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
|
900
|
-
StyleGuide: '
|
908
|
+
StyleGuide: '#percent-q'
|
901
909
|
Enabled: true
|
902
910
|
|
903
911
|
Style/TrailingUnderscoreVariable:
|
@@ -911,12 +919,12 @@ Style/VariableInterpolation:
|
|
911
919
|
Description: >-
|
912
920
|
Don't interpolate global, instance and class variables
|
913
921
|
directly in strings.
|
914
|
-
StyleGuide: '
|
922
|
+
StyleGuide: '#curlies-interpolate'
|
915
923
|
Enabled: true
|
916
924
|
|
917
925
|
Style/VariableName:
|
918
926
|
Description: 'Use the configured style when naming variables.'
|
919
|
-
StyleGuide: '
|
927
|
+
StyleGuide: '#snake-case-symbols-methods-vars'
|
920
928
|
Enabled: true
|
921
929
|
|
922
930
|
Style/VariableNumber:
|
@@ -925,24 +933,24 @@ Style/VariableNumber:
|
|
925
933
|
|
926
934
|
Style/WhenThen:
|
927
935
|
Description: 'Use when x then ... for one-line cases.'
|
928
|
-
StyleGuide: '
|
936
|
+
StyleGuide: '#one-line-cases'
|
929
937
|
Enabled: true
|
930
938
|
|
931
939
|
Style/WhileUntilDo:
|
932
940
|
Description: 'Checks for redundant do after while or until.'
|
933
|
-
StyleGuide: '
|
941
|
+
StyleGuide: '#no-multiline-while-do'
|
934
942
|
Enabled: true
|
935
943
|
|
936
944
|
Style/WhileUntilModifier:
|
937
945
|
Description: >-
|
938
946
|
Favor modifier while/until usage when you have a
|
939
947
|
single-line body.
|
940
|
-
StyleGuide: '
|
948
|
+
StyleGuide: '#while-as-a-modifier'
|
941
949
|
Enabled: true
|
942
950
|
|
943
951
|
Style/WordArray:
|
944
952
|
Description: 'Use %w or %W for arrays of words.'
|
945
|
-
StyleGuide: '
|
953
|
+
StyleGuide: '#percent-w'
|
946
954
|
Enabled: true
|
947
955
|
|
948
956
|
Style/ZeroLengthPredicate:
|
@@ -960,7 +968,7 @@ Metrics/AbcSize:
|
|
960
968
|
|
961
969
|
Metrics/BlockNesting:
|
962
970
|
Description: 'Avoid excessive block nesting'
|
963
|
-
StyleGuide: '
|
971
|
+
StyleGuide: '#three-is-the-number-thou-shalt-count'
|
964
972
|
Enabled: true
|
965
973
|
|
966
974
|
Metrics/ClassLength:
|
@@ -979,17 +987,21 @@ Metrics/CyclomaticComplexity:
|
|
979
987
|
|
980
988
|
Metrics/LineLength:
|
981
989
|
Description: 'Limit lines to 80 characters.'
|
982
|
-
StyleGuide: '
|
990
|
+
StyleGuide: '#80-character-limits'
|
983
991
|
Enabled: true
|
984
992
|
|
985
993
|
Metrics/MethodLength:
|
986
994
|
Description: 'Avoid methods longer than 10 lines of code.'
|
987
|
-
StyleGuide: '
|
995
|
+
StyleGuide: '#short-methods'
|
996
|
+
Enabled: true
|
997
|
+
|
998
|
+
Metrics/BlockLength:
|
999
|
+
Description: 'Avoid long blocks with many lines.'
|
988
1000
|
Enabled: true
|
989
1001
|
|
990
1002
|
Metrics/ParameterLists:
|
991
1003
|
Description: 'Avoid parameter lists longer than three or four parameters.'
|
992
|
-
StyleGuide: '
|
1004
|
+
StyleGuide: '#too-many-params'
|
993
1005
|
Enabled: true
|
994
1006
|
|
995
1007
|
Metrics/PerceivedComplexity:
|
@@ -1005,7 +1017,7 @@ Lint/AmbiguousOperator:
|
|
1005
1017
|
Description: >-
|
1006
1018
|
Checks for ambiguous operators in the first argument of a
|
1007
1019
|
method invocation without parentheses.
|
1008
|
-
StyleGuide: '
|
1020
|
+
StyleGuide: '#method-invocation-parens'
|
1009
1021
|
Enabled: true
|
1010
1022
|
|
1011
1023
|
Lint/AmbiguousRegexpLiteral:
|
@@ -1016,7 +1028,7 @@ Lint/AmbiguousRegexpLiteral:
|
|
1016
1028
|
|
1017
1029
|
Lint/AssignmentInCondition:
|
1018
1030
|
Description: "Don't use assignment in conditions."
|
1019
|
-
StyleGuide: '
|
1031
|
+
StyleGuide: '#safe-assignment-in-condition'
|
1020
1032
|
Enabled: true
|
1021
1033
|
|
1022
1034
|
Lint/BlockAlignment:
|
@@ -1031,7 +1043,7 @@ Lint/ConditionPosition:
|
|
1031
1043
|
Description: >-
|
1032
1044
|
Checks for condition placed in a confusing position relative to
|
1033
1045
|
the keyword.
|
1034
|
-
StyleGuide: '
|
1046
|
+
StyleGuide: '#same-line-condition'
|
1035
1047
|
Enabled: true
|
1036
1048
|
|
1037
1049
|
Lint/Debugger:
|
@@ -1080,7 +1092,7 @@ Lint/EndInMethod:
|
|
1080
1092
|
|
1081
1093
|
Lint/EnsureReturn:
|
1082
1094
|
Description: 'Do not use return in an ensure block.'
|
1083
|
-
StyleGuide: '
|
1095
|
+
StyleGuide: '#no-return-ensure'
|
1084
1096
|
Enabled: true
|
1085
1097
|
|
1086
1098
|
Lint/Eval:
|
@@ -1099,7 +1111,7 @@ Lint/FormatParameterMismatch:
|
|
1099
1111
|
|
1100
1112
|
Lint/HandleExceptions:
|
1101
1113
|
Description: "Don't suppress exception."
|
1102
|
-
StyleGuide: '
|
1114
|
+
StyleGuide: '#dont-hide-exceptions'
|
1103
1115
|
Enabled: true
|
1104
1116
|
|
1105
1117
|
Lint/ImplicitStringConcatenation:
|
@@ -1136,12 +1148,12 @@ Lint/Loop:
|
|
1136
1148
|
Description: >-
|
1137
1149
|
Use Kernel#loop with break rather than begin/end/until or
|
1138
1150
|
begin/end/while for post-loop tests.
|
1139
|
-
StyleGuide: '
|
1151
|
+
StyleGuide: '#loop-with-break'
|
1140
1152
|
Enabled: true
|
1141
1153
|
|
1142
1154
|
Lint/NestedMethodDefinition:
|
1143
1155
|
Description: 'Do not use nested method definitions.'
|
1144
|
-
StyleGuide: '
|
1156
|
+
StyleGuide: '#no-nested-methods'
|
1145
1157
|
Enabled: true
|
1146
1158
|
|
1147
1159
|
Lint/NextWithoutAccumulator:
|
@@ -1158,7 +1170,7 @@ Lint/ParenthesesAsGroupedExpression:
|
|
1158
1170
|
Description: >-
|
1159
1171
|
Checks for method calls with a space before the opening
|
1160
1172
|
parenthesis.
|
1161
|
-
StyleGuide: '
|
1173
|
+
StyleGuide: '#parens-no-spaces'
|
1162
1174
|
Enabled: true
|
1163
1175
|
|
1164
1176
|
Lint/PercentStringArray:
|
@@ -1185,7 +1197,7 @@ Lint/RequireParentheses:
|
|
1185
1197
|
|
1186
1198
|
Lint/RescueException:
|
1187
1199
|
Description: 'Avoid rescuing the Exception class.'
|
1188
|
-
StyleGuide: '
|
1200
|
+
StyleGuide: '#no-blind-rescues'
|
1189
1201
|
Enabled: true
|
1190
1202
|
|
1191
1203
|
Lint/ShadowedException:
|
@@ -1202,7 +1214,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
1202
1214
|
|
1203
1215
|
Lint/StringConversionInInterpolation:
|
1204
1216
|
Description: 'Checks for Object#to_s usage in string interpolation.'
|
1205
|
-
StyleGuide: '
|
1217
|
+
StyleGuide: '#no-to-s'
|
1206
1218
|
Enabled: true
|
1207
1219
|
|
1208
1220
|
Lint/UnderscorePrefixedVariableName:
|
@@ -1226,12 +1238,12 @@ Lint/UnneededSplatExpansion:
|
|
1226
1238
|
|
1227
1239
|
Lint/UnusedBlockArgument:
|
1228
1240
|
Description: 'Checks for unused block arguments.'
|
1229
|
-
StyleGuide: '
|
1241
|
+
StyleGuide: '#underscore-unused-vars'
|
1230
1242
|
Enabled: true
|
1231
1243
|
|
1232
1244
|
Lint/UnusedMethodArgument:
|
1233
1245
|
Description: 'Checks for unused method arguments.'
|
1234
|
-
StyleGuide: '
|
1246
|
+
StyleGuide: '#underscore-unused-vars'
|
1235
1247
|
Enabled: true
|
1236
1248
|
|
1237
1249
|
Lint/UnreachableCode:
|
@@ -1245,7 +1257,7 @@ Lint/UselessAccessModifier:
|
|
1245
1257
|
|
1246
1258
|
Lint/UselessAssignment:
|
1247
1259
|
Description: 'Checks for useless assignment to a local variable.'
|
1248
|
-
StyleGuide: '
|
1260
|
+
StyleGuide: '#underscore-unused-vars'
|
1249
1261
|
Enabled: true
|
1250
1262
|
|
1251
1263
|
Lint/UselessComparison:
|
@@ -1311,6 +1323,10 @@ Performance/DoubleStartEndWith:
|
|
1311
1323
|
Performance/EndWith:
|
1312
1324
|
Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.'
|
1313
1325
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
|
1326
|
+
# This will change to a new method call which isn't guaranteed to be on the
|
1327
|
+
# object. Switching these methods has to be done with knowledge of the types
|
1328
|
+
# of the variables which rubocop doesn't have.
|
1329
|
+
AutoCorrect: false
|
1314
1330
|
Enabled: true
|
1315
1331
|
|
1316
1332
|
Performance/FixedSize:
|
@@ -1334,7 +1350,7 @@ Performance/HashEachMethods:
|
|
1334
1350
|
Description: >-
|
1335
1351
|
Use `Hash#each_key` and `Hash#each_value` instead of
|
1336
1352
|
`Hash#keys.each` and `Hash#values.each`.
|
1337
|
-
StyleGuide: '
|
1353
|
+
StyleGuide: '#hash-each'
|
1338
1354
|
Enabled: true
|
1339
1355
|
AutoCorrect: false
|
1340
1356
|
|
@@ -1393,6 +1409,10 @@ Performance/SortWithBlock:
|
|
1393
1409
|
Performance/StartWith:
|
1394
1410
|
Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
|
1395
1411
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
|
1412
|
+
# This will change to a new method call which isn't guaranteed to be on the
|
1413
|
+
# object. Switching these methods has to be done with knowledge of the types
|
1414
|
+
# of the variables which rubocop doesn't have.
|
1415
|
+
AutoCorrect: false
|
1396
1416
|
Enabled: true
|
1397
1417
|
|
1398
1418
|
Performance/StringReplacement:
|
@@ -1423,6 +1443,15 @@ Rails/Delegate:
|
|
1423
1443
|
Description: 'Prefer delegate method for delegations.'
|
1424
1444
|
Enabled: true
|
1425
1445
|
|
1446
|
+
Rails/DelegateAllowBlank:
|
1447
|
+
Description: 'Do not use allow_blank as an option to delegate.'
|
1448
|
+
Enabled: true
|
1449
|
+
|
1450
|
+
Rails/DynamicFindBy:
|
1451
|
+
Description: 'Use `find_by` instead of dynamic `find_by_*`.'
|
1452
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
|
1453
|
+
Enabled: true
|
1454
|
+
|
1426
1455
|
Rails/Exit:
|
1427
1456
|
Description: >-
|
1428
1457
|
Favor `fail`, `break`, `return`, etc. over `exit` in
|
@@ -1445,6 +1474,13 @@ Rails/HasAndBelongsToMany:
|
|
1445
1474
|
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#has-many-through'
|
1446
1475
|
Enabled: true
|
1447
1476
|
|
1477
|
+
Rails/HttpPositionalArguments:
|
1478
|
+
Description: 'Use keyword arguments instead of positional arguments in http method calls.'
|
1479
|
+
Enabled: true
|
1480
|
+
Include:
|
1481
|
+
- 'spec/**/*'
|
1482
|
+
- 'test/**/*'
|
1483
|
+
|
1448
1484
|
Rails/NotNullColumn:
|
1449
1485
|
Description: 'Do not add a NOT NULL column without a default value'
|
1450
1486
|
Enabled: true
|
@@ -1495,5 +1531,11 @@ Rails/Validation:
|
|
1495
1531
|
Enabled: true
|
1496
1532
|
|
1497
1533
|
Security/JSONLoad:
|
1498
|
-
Description
|
1534
|
+
Description: >-
|
1535
|
+
Prefer usage of `JSON.parse` over `JSON.load` due to potential
|
1536
|
+
security issues. See reference for more information.
|
1537
|
+
Reference: 'http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load'
|
1499
1538
|
Enabled: true
|
1539
|
+
# Autocorrect here will change to a method that may cause crashes depending
|
1540
|
+
# on the value of the argument.
|
1541
|
+
AutoCorrect: false
|