rubocop 0.22.0 → 0.23.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/.gitignore +3 -0
- data/.rubocop_todo.yml +7 -7
- data/CHANGELOG.md +34 -1
- data/Gemfile +1 -1
- data/README.md +86 -47
- data/Rakefile +2 -2
- data/bin/rubocop +1 -1
- data/config/default.yml +76 -74
- data/config/disabled.yml +6 -2
- data/config/enabled.yml +180 -180
- data/lib/rubocop.rb +1 -0
- data/lib/rubocop/cli.rb +7 -3
- data/lib/rubocop/comment_config.rb +4 -2
- data/lib/rubocop/config.rb +15 -3
- data/lib/rubocop/config_loader.rb +8 -3
- data/lib/rubocop/config_store.rb +1 -1
- data/lib/rubocop/cop/commissioner.rb +1 -1
- data/lib/rubocop/cop/cop.rb +16 -2
- data/lib/rubocop/cop/corrector.rb +1 -1
- data/lib/rubocop/cop/force.rb +1 -1
- data/lib/rubocop/cop/ignored_node.rb +1 -1
- data/lib/rubocop/cop/lint/ambiguous_operator.rb +1 -1
- data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +1 -1
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +1 -1
- data/lib/rubocop/cop/lint/block_alignment.rb +1 -1
- data/lib/rubocop/cop/lint/condition_position.rb +1 -1
- data/lib/rubocop/cop/lint/debugger.rb +1 -1
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +1 -1
- data/lib/rubocop/cop/lint/else_layout.rb +1 -1
- data/lib/rubocop/cop/lint/empty_ensure.rb +1 -1
- data/lib/rubocop/cop/lint/empty_interpolation.rb +1 -1
- data/lib/rubocop/cop/lint/end_alignment.rb +1 -1
- data/lib/rubocop/cop/lint/end_in_method.rb +1 -1
- data/lib/rubocop/cop/lint/ensure_return.rb +1 -1
- data/lib/rubocop/cop/lint/eval.rb +1 -1
- data/lib/rubocop/cop/lint/handle_exceptions.rb +1 -1
- data/lib/rubocop/cop/lint/invalid_character_literal.rb +1 -1
- data/lib/rubocop/cop/lint/literal_in_condition.rb +1 -1
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +1 -1
- data/lib/rubocop/cop/lint/loop.rb +1 -1
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +1 -1
- data/lib/rubocop/cop/lint/require_parentheses.rb +1 -1
- data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +1 -1
- data/lib/rubocop/cop/lint/space_before_first_arg.rb +1 -1
- data/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +1 -1
- data/lib/rubocop/cop/lint/syntax.rb +1 -1
- data/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +1 -1
- data/lib/rubocop/cop/lint/unreachable_code.rb +1 -1
- data/lib/rubocop/cop/lint/unused_block_argument.rb +1 -1
- data/lib/rubocop/cop/lint/unused_method_argument.rb +1 -1
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +1 -1
- data/lib/rubocop/cop/lint/useless_assignment.rb +1 -1
- data/lib/rubocop/cop/lint/useless_comparison.rb +1 -1
- data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +1 -1
- data/lib/rubocop/cop/lint/useless_setter_call.rb +1 -1
- data/lib/rubocop/cop/lint/void.rb +1 -1
- data/lib/rubocop/cop/mixin/annotation_comment.rb +2 -2
- data/lib/rubocop/cop/mixin/array_syntax.rb +1 -1
- data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +32 -3
- data/lib/rubocop/cop/mixin/autocorrect_unless_changing_ast.rb +1 -1
- data/lib/rubocop/cop/mixin/check_assignment.rb +1 -1
- data/lib/rubocop/cop/mixin/check_methods.rb +1 -1
- data/lib/rubocop/cop/mixin/code_length.rb +1 -1
- data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +1 -1
- data/lib/rubocop/cop/mixin/configurable_max.rb +1 -1
- data/lib/rubocop/cop/mixin/configurable_naming.rb +1 -1
- data/lib/rubocop/cop/mixin/if_node.rb +1 -1
- data/lib/rubocop/cop/mixin/if_then_else.rb +1 -1
- data/lib/rubocop/cop/mixin/negative_conditional.rb +1 -1
- data/lib/rubocop/cop/mixin/parser_diagnostic.rb +1 -1
- data/lib/rubocop/cop/mixin/percent_literal.rb +1 -1
- data/lib/rubocop/cop/mixin/safe_assignment.rb +14 -3
- data/lib/rubocop/cop/mixin/space_after_punctuation.rb +1 -1
- data/lib/rubocop/cop/mixin/space_inside.rb +1 -1
- data/lib/rubocop/cop/mixin/statement_modifier.rb +2 -2
- data/lib/rubocop/cop/mixin/string_help.rb +1 -1
- data/lib/rubocop/cop/mixin/surrounding_space.rb +1 -1
- data/lib/rubocop/cop/mixin/unused_argument.rb +1 -1
- data/lib/rubocop/cop/offense.rb +3 -3
- data/lib/rubocop/cop/rails/action_filter.rb +1 -1
- data/lib/rubocop/cop/rails/default_scope.rb +1 -1
- data/lib/rubocop/cop/rails/delegate.rb +1 -1
- data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +1 -1
- data/lib/rubocop/cop/rails/output.rb +1 -1
- data/lib/rubocop/cop/rails/read_write_attribute.rb +1 -1
- data/lib/rubocop/cop/rails/scope_args.rb +1 -1
- data/lib/rubocop/cop/rails/validation.rb +1 -1
- data/lib/rubocop/cop/severity.rb +1 -1
- data/lib/rubocop/cop/style/access_modifier_indentation.rb +1 -1
- data/lib/rubocop/cop/style/accessor_method_name.rb +1 -1
- data/lib/rubocop/cop/style/alias.rb +1 -1
- data/lib/rubocop/cop/style/align_array.rb +1 -1
- data/lib/rubocop/cop/style/align_hash.rb +1 -1
- data/lib/rubocop/cop/style/align_parameters.rb +1 -1
- data/lib/rubocop/cop/style/and_or.rb +1 -1
- data/lib/rubocop/cop/style/array_join.rb +1 -1
- data/lib/rubocop/cop/style/ascii_comments.rb +1 -1
- data/lib/rubocop/cop/style/ascii_identifiers.rb +1 -1
- data/lib/rubocop/cop/style/attr.rb +1 -1
- data/lib/rubocop/cop/style/begin_block.rb +1 -1
- data/lib/rubocop/cop/style/block_comments.rb +24 -3
- data/lib/rubocop/cop/style/block_nesting.rb +1 -1
- data/lib/rubocop/cop/style/blocks.rb +1 -1
- data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +1 -1
- data/lib/rubocop/cop/style/case_equality.rb +1 -1
- data/lib/rubocop/cop/style/case_indentation.rb +1 -1
- data/lib/rubocop/cop/style/character_literal.rb +1 -1
- data/lib/rubocop/cop/style/class_and_module_camel_case.rb +1 -1
- data/lib/rubocop/cop/style/class_and_module_children.rb +1 -1
- data/lib/rubocop/cop/style/class_length.rb +1 -1
- data/lib/rubocop/cop/style/class_methods.rb +1 -1
- data/lib/rubocop/cop/style/class_vars.rb +1 -1
- data/lib/rubocop/cop/style/collection_methods.rb +1 -1
- data/lib/rubocop/cop/style/colon_method_call.rb +1 -1
- data/lib/rubocop/cop/style/comment_annotation.rb +1 -1
- data/lib/rubocop/cop/style/comment_indentation.rb +1 -1
- data/lib/rubocop/cop/style/constant_name.rb +1 -1
- data/lib/rubocop/cop/style/cyclomatic_complexity.rb +1 -1
- data/lib/rubocop/cop/style/def_with_parentheses.rb +1 -1
- data/lib/rubocop/cop/style/deprecated_hash_methods.rb +1 -1
- data/lib/rubocop/cop/style/documentation.rb +4 -2
- data/lib/rubocop/cop/style/dot_position.rb +1 -1
- data/lib/rubocop/cop/style/double_negation.rb +1 -1
- data/lib/rubocop/cop/style/each_with_object.rb +21 -5
- data/lib/rubocop/cop/style/empty_line_between_defs.rb +1 -1
- data/lib/rubocop/cop/style/empty_lines.rb +1 -1
- data/lib/rubocop/cop/style/empty_lines_around_access_modifier.rb +1 -1
- data/lib/rubocop/cop/style/empty_lines_around_body.rb +1 -1
- data/lib/rubocop/cop/style/empty_literal.rb +1 -1
- data/lib/rubocop/cop/style/encoding.rb +1 -1
- data/lib/rubocop/cop/style/end_block.rb +1 -1
- data/lib/rubocop/cop/style/end_of_line.rb +12 -3
- data/lib/rubocop/cop/style/even_odd.rb +1 -1
- data/lib/rubocop/cop/style/file_name.rb +1 -1
- data/lib/rubocop/cop/style/flip_flop.rb +1 -1
- data/lib/rubocop/cop/style/for.rb +1 -1
- data/lib/rubocop/cop/style/format_string.rb +1 -1
- data/lib/rubocop/cop/style/global_vars.rb +1 -1
- data/lib/rubocop/cop/style/guard_clause.rb +1 -1
- data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
- data/lib/rubocop/cop/style/if_unless_modifier.rb +1 -1
- data/lib/rubocop/cop/style/if_with_semicolon.rb +1 -1
- data/lib/rubocop/cop/style/indent_array.rb +35 -12
- data/lib/rubocop/cop/style/indent_hash.rb +39 -23
- data/lib/rubocop/cop/style/indentation_consistency.rb +1 -1
- data/lib/rubocop/cop/style/indentation_width.rb +2 -2
- data/lib/rubocop/cop/style/inline_comment.rb +19 -0
- data/lib/rubocop/cop/style/lambda.rb +1 -1
- data/lib/rubocop/cop/style/lambda_call.rb +1 -1
- data/lib/rubocop/cop/style/leading_comment_space.rb +1 -1
- data/lib/rubocop/cop/style/line_end_concatenation.rb +1 -1
- data/lib/rubocop/cop/style/line_length.rb +1 -1
- data/lib/rubocop/cop/style/method_call_parentheses.rb +2 -2
- data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +1 -1
- data/lib/rubocop/cop/style/method_def_parentheses.rb +1 -1
- data/lib/rubocop/cop/style/method_length.rb +1 -1
- data/lib/rubocop/cop/style/method_name.rb +1 -1
- data/lib/rubocop/cop/style/module_function.rb +1 -1
- data/lib/rubocop/cop/style/multiline_block_chain.rb +1 -1
- data/lib/rubocop/cop/style/multiline_if_then.rb +1 -1
- data/lib/rubocop/cop/style/multiline_ternary_operator.rb +1 -1
- data/lib/rubocop/cop/style/negated_if.rb +1 -1
- data/lib/rubocop/cop/style/negated_while.rb +1 -1
- data/lib/rubocop/cop/style/nested_ternary_operator.rb +1 -1
- data/lib/rubocop/cop/style/next.rb +2 -1
- data/lib/rubocop/cop/style/nil_comparison.rb +1 -1
- data/lib/rubocop/cop/style/non_nil_check.rb +1 -1
- data/lib/rubocop/cop/style/not.rb +1 -1
- data/lib/rubocop/cop/style/numeric_literals.rb +1 -1
- data/lib/rubocop/cop/style/one_line_conditional.rb +1 -1
- data/lib/rubocop/cop/style/op_method.rb +1 -1
- data/lib/rubocop/cop/style/parameter_lists.rb +1 -1
- data/lib/rubocop/cop/style/parentheses_around_condition.rb +11 -1
- data/lib/rubocop/cop/style/percent_literal_delimiters.rb +1 -1
- data/lib/rubocop/cop/style/perl_backrefs.rb +1 -1
- data/lib/rubocop/cop/style/predicate_name.rb +1 -1
- data/lib/rubocop/cop/style/proc.rb +1 -1
- data/lib/rubocop/cop/style/raise_args.rb +1 -1
- data/lib/rubocop/cop/style/redundant_begin.rb +1 -1
- data/lib/rubocop/cop/style/redundant_exception.rb +1 -1
- data/lib/rubocop/cop/style/redundant_return.rb +1 -1
- data/lib/rubocop/cop/style/redundant_self.rb +1 -1
- data/lib/rubocop/cop/style/regexp_literal.rb +13 -5
- data/lib/rubocop/cop/style/rescue_modifier.rb +1 -1
- data/lib/rubocop/cop/style/self_assignment.rb +1 -1
- data/lib/rubocop/cop/style/semicolon.rb +1 -1
- data/lib/rubocop/cop/style/signal_exception.rb +1 -1
- data/lib/rubocop/cop/style/single_line_block_params.rb +1 -1
- data/lib/rubocop/cop/style/single_line_methods.rb +1 -1
- data/lib/rubocop/cop/style/single_space_before_first_arg.rb +1 -1
- data/lib/rubocop/cop/style/space_after_colon.rb +1 -1
- data/lib/rubocop/cop/style/space_after_comma.rb +1 -1
- data/lib/rubocop/cop/style/space_after_control_keyword.rb +1 -1
- data/lib/rubocop/cop/style/space_after_method_name.rb +1 -1
- data/lib/rubocop/cop/style/space_after_not.rb +1 -1
- data/lib/rubocop/cop/style/space_after_semicolon.rb +1 -1
- data/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb +1 -1
- data/lib/rubocop/cop/style/space_around_operators.rb +1 -1
- data/lib/rubocop/cop/style/space_before_block_braces.rb +3 -2
- data/lib/rubocop/cop/style/space_before_comment.rb +1 -1
- data/lib/rubocop/cop/style/space_before_modifier_keyword.rb +1 -1
- data/lib/rubocop/cop/style/space_inside_block_braces.rb +3 -2
- data/lib/rubocop/cop/style/space_inside_brackets.rb +1 -1
- data/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +1 -1
- data/lib/rubocop/cop/style/space_inside_parens.rb +1 -1
- data/lib/rubocop/cop/style/special_global_vars.rb +1 -1
- data/lib/rubocop/cop/style/string_literals.rb +1 -1
- data/lib/rubocop/cop/style/symbol_array.rb +1 -1
- data/lib/rubocop/cop/style/tab.rb +1 -1
- data/lib/rubocop/cop/style/trailing_blank_lines.rb +1 -1
- data/lib/rubocop/cop/style/trailing_comma.rb +16 -3
- data/lib/rubocop/cop/style/trailing_whitespace.rb +1 -1
- data/lib/rubocop/cop/style/trivial_accessors.rb +40 -9
- data/lib/rubocop/cop/style/unless_else.rb +1 -1
- data/lib/rubocop/cop/style/unneeded_capital_w.rb +1 -1
- data/lib/rubocop/cop/style/unneeded_percent_x.rb +1 -1
- data/lib/rubocop/cop/style/variable_interpolation.rb +1 -1
- data/lib/rubocop/cop/style/variable_name.rb +1 -1
- data/lib/rubocop/cop/style/when_then.rb +1 -1
- data/lib/rubocop/cop/style/while_until_do.rb +1 -1
- data/lib/rubocop/cop/style/while_until_modifier.rb +1 -1
- data/lib/rubocop/cop/style/word_array.rb +1 -1
- data/lib/rubocop/cop/team.rb +12 -2
- data/lib/rubocop/cop/util.rb +1 -1
- data/lib/rubocop/cop/variable_force.rb +4 -4
- data/lib/rubocop/cop/variable_force/assignment.rb +1 -1
- data/lib/rubocop/cop/variable_force/locatable.rb +1 -1
- data/lib/rubocop/cop/variable_force/reference.rb +1 -1
- data/lib/rubocop/cop/variable_force/scope.rb +1 -1
- data/lib/rubocop/cop/variable_force/variable.rb +1 -1
- data/lib/rubocop/cop/variable_force/variable_table.rb +1 -1
- data/lib/rubocop/file_inspector.rb +3 -3
- data/lib/rubocop/formatter/base_formatter.rb +6 -6
- data/lib/rubocop/formatter/clang_style_formatter.rb +1 -1
- data/lib/rubocop/formatter/colorizable.rb +1 -1
- data/lib/rubocop/formatter/disabled_config_formatter.rb +2 -2
- data/lib/rubocop/formatter/disabled_lines_formatter.rb +1 -1
- data/lib/rubocop/formatter/emacs_style_formatter.rb +1 -1
- data/lib/rubocop/formatter/file_list_formatter.rb +1 -1
- data/lib/rubocop/formatter/formatter_set.rb +1 -1
- data/lib/rubocop/formatter/fuubar_style_formatter.rb +1 -1
- data/lib/rubocop/formatter/json_formatter.rb +2 -2
- data/lib/rubocop/formatter/offense_count_formatter.rb +1 -1
- data/lib/rubocop/formatter/progress_formatter.rb +1 -1
- data/lib/rubocop/formatter/simple_text_formatter.rb +1 -1
- data/lib/rubocop/options.rb +6 -4
- data/lib/rubocop/path_util.rb +1 -1
- data/lib/rubocop/processed_source.rb +1 -1
- data/lib/rubocop/rake_task.rb +3 -3
- data/lib/rubocop/source_parser.rb +2 -2
- data/lib/rubocop/target_finder.rb +2 -6
- data/lib/rubocop/token.rb +1 -1
- data/lib/rubocop/version.rb +2 -2
- data/relnotes/v0.21.0.md +1 -1
- data/relnotes/v0.23.0.md +79 -0
- data/rubocop.gemspec +1 -1
- data/spec/.rubocop.yml +1 -1
- data/spec/isolated_environment_spec.rb +1 -1
- data/spec/project_spec.rb +3 -3
- data/spec/rubocop/cli_spec.rb +242 -94
- data/spec/rubocop/comment_config_spec.rb +17 -15
- data/spec/rubocop/config_loader_spec.rb +51 -34
- data/spec/rubocop/config_spec.rb +5 -5
- data/spec/rubocop/config_store_spec.rb +11 -11
- data/spec/rubocop/cop/commissioner_spec.rb +4 -4
- data/spec/rubocop/cop/cop_spec.rb +33 -10
- data/spec/rubocop/cop/corrector_spec.rb +1 -1
- data/spec/rubocop/cop/force_spec.rb +2 -2
- data/spec/rubocop/cop/lint/ambiguous_operator_spec.rb +1 -1
- data/spec/rubocop/cop/lint/ambiguous_regexp_literal_spec.rb +1 -1
- data/spec/rubocop/cop/lint/assignment_in_condition_spec.rb +1 -1
- data/spec/rubocop/cop/lint/block_alignment_spec.rb +2 -2
- data/spec/rubocop/cop/lint/condition_position_spec.rb +4 -4
- data/spec/rubocop/cop/lint/debugger_spec.rb +1 -1
- data/spec/rubocop/cop/lint/deprecated_class_methods_spec.rb +1 -1
- data/spec/rubocop/cop/lint/else_layout_spec.rb +5 -5
- data/spec/rubocop/cop/lint/empty_ensure_spec.rb +1 -1
- data/spec/rubocop/cop/lint/empty_interpolation_spec.rb +1 -1
- data/spec/rubocop/cop/lint/end_alignment_spec.rb +1 -1
- data/spec/rubocop/cop/lint/end_in_method_spec.rb +1 -1
- data/spec/rubocop/cop/lint/ensure_return_spec.rb +1 -1
- data/spec/rubocop/cop/lint/eval_spec.rb +1 -1
- data/spec/rubocop/cop/lint/handle_exceptions_spec.rb +1 -1
- data/spec/rubocop/cop/lint/invalid_character_literal_spec.rb +1 -1
- data/spec/rubocop/cop/lint/literal_in_condition_spec.rb +1 -1
- data/spec/rubocop/cop/lint/literal_in_interpolation_spec.rb +1 -1
- data/spec/rubocop/cop/lint/loop_spec.rb +1 -1
- data/spec/rubocop/cop/lint/parentheses_as_grouped_expression_spec.rb +1 -1
- data/spec/rubocop/cop/lint/require_parentheses_spec.rb +1 -1
- data/spec/rubocop/cop/lint/rescue_exception_spec.rb +2 -2
- data/spec/rubocop/cop/lint/shadowing_outer_local_variable_spec.rb +1 -1
- data/spec/rubocop/cop/lint/space_before_first_arg_spec.rb +1 -1
- data/spec/rubocop/cop/lint/string_conversion_in_interpolation_spec.rb +1 -1
- data/spec/rubocop/cop/lint/syntax_spec.rb +2 -2
- data/spec/rubocop/cop/lint/underscore_prefixed_variable_name_spec.rb +1 -1
- data/spec/rubocop/cop/lint/unreachable_code_spec.rb +1 -1
- data/spec/rubocop/cop/lint/unused_block_argument_spec.rb +1 -1
- data/spec/rubocop/cop/lint/unused_method_argument_spec.rb +1 -1
- data/spec/rubocop/cop/lint/useless_access_modifier_spec.rb +1 -1
- data/spec/rubocop/cop/lint/useless_assignment_spec.rb +1 -1
- data/spec/rubocop/cop/lint/useless_comparison_spec.rb +1 -1
- data/spec/rubocop/cop/lint/useless_else_without_rescue_spec.rb +1 -1
- data/spec/rubocop/cop/lint/useless_setter_call_spec.rb +1 -1
- data/spec/rubocop/cop/lint/void_spec.rb +1 -1
- data/spec/rubocop/cop/offense_spec.rb +2 -2
- data/spec/rubocop/cop/rails/action_filter_spec.rb +1 -1
- data/spec/rubocop/cop/rails/default_scope_spec.rb +1 -1
- data/spec/rubocop/cop/rails/delegate_spec.rb +1 -1
- data/spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb +1 -1
- data/spec/rubocop/cop/rails/output_spec.rb +1 -1
- data/spec/rubocop/cop/rails/read_write_attribute_spec.rb +1 -1
- data/spec/rubocop/cop/rails/scope_args_spec.rb +1 -1
- data/spec/rubocop/cop/rails/validation_spec.rb +1 -1
- data/spec/rubocop/cop/severity_spec.rb +1 -1
- data/spec/rubocop/cop/style/access_modifier_indentation_spec.rb +1 -1
- data/spec/rubocop/cop/style/accessor_method_name_spec.rb +1 -1
- data/spec/rubocop/cop/style/alias_spec.rb +1 -1
- data/spec/rubocop/cop/style/align_array_spec.rb +33 -1
- data/spec/rubocop/cop/style/align_hash_spec.rb +1 -1
- data/spec/rubocop/cop/style/align_parameters_spec.rb +1 -1
- data/spec/rubocop/cop/style/and_or_spec.rb +1 -1
- data/spec/rubocop/cop/style/array_join_spec.rb +1 -1
- data/spec/rubocop/cop/style/ascii_comments_spec.rb +1 -1
- data/spec/rubocop/cop/style/ascii_identifiers_spec.rb +1 -1
- data/spec/rubocop/cop/style/attr_spec.rb +1 -1
- data/spec/rubocop/cop/style/begin_block_spec.rb +1 -1
- data/spec/rubocop/cop/style/block_comments_spec.rb +25 -1
- data/spec/rubocop/cop/style/block_nesting_spec.rb +1 -1
- data/spec/rubocop/cop/style/blocks_spec.rb +1 -1
- data/spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb +1 -1
- data/spec/rubocop/cop/style/case_equality_spec.rb +1 -1
- data/spec/rubocop/cop/style/case_indentation_spec.rb +4 -4
- data/spec/rubocop/cop/style/character_literal_spec.rb +1 -1
- data/spec/rubocop/cop/style/class_and_module_camel_case_spec.rb +1 -1
- data/spec/rubocop/cop/style/class_and_module_children_spec.rb +1 -1
- data/spec/rubocop/cop/style/class_length_spec.rb +1 -1
- data/spec/rubocop/cop/style/class_methods_spec.rb +1 -1
- data/spec/rubocop/cop/style/class_vars_spec.rb +1 -1
- data/spec/rubocop/cop/style/collection_methods_spec.rb +1 -1
- data/spec/rubocop/cop/style/colon_method_call_spec.rb +1 -1
- data/spec/rubocop/cop/style/comment_annotation_spec.rb +2 -2
- data/spec/rubocop/cop/style/comment_indentation_spec.rb +1 -1
- data/spec/rubocop/cop/style/constant_name_spec.rb +2 -2
- data/spec/rubocop/cop/style/cyclomatic_complexity_spec.rb +1 -1
- data/spec/rubocop/cop/style/def_with_parentheses_spec.rb +1 -1
- data/spec/rubocop/cop/style/deprecated_hash_methods_spec.rb +1 -1
- data/spec/rubocop/cop/style/documentation_spec.rb +26 -2
- data/spec/rubocop/cop/style/dot_position_spec.rb +1 -1
- data/spec/rubocop/cop/style/double_negation_spec.rb +1 -1
- data/spec/rubocop/cop/style/each_with_object_spec.rb +31 -7
- data/spec/rubocop/cop/style/empty_line_between_defs_spec.rb +1 -1
- data/spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb +1 -1
- data/spec/rubocop/cop/style/empty_lines_around_body_spec.rb +1 -1
- data/spec/rubocop/cop/style/empty_lines_spec.rb +1 -1
- data/spec/rubocop/cop/style/empty_literal_spec.rb +1 -1
- data/spec/rubocop/cop/style/encoding_spec.rb +1 -1
- data/spec/rubocop/cop/style/end_block_spec.rb +1 -1
- data/spec/rubocop/cop/style/end_of_line_spec.rb +13 -1
- data/spec/rubocop/cop/style/even_odd_spec.rb +1 -1
- data/spec/rubocop/cop/style/file_name_spec.rb +2 -2
- data/spec/rubocop/cop/style/flip_flop_spec.rb +1 -1
- data/spec/rubocop/cop/style/for_spec.rb +1 -1
- data/spec/rubocop/cop/style/format_string_spec.rb +1 -1
- data/spec/rubocop/cop/style/global_vars_spec.rb +1 -1
- data/spec/rubocop/cop/style/guard_clause_spec.rb +1 -1
- data/spec/rubocop/cop/style/hash_syntax_spec.rb +9 -5
- data/spec/rubocop/cop/style/if_unless_modifier_spec.rb +6 -6
- data/spec/rubocop/cop/style/if_with_semicolon_spec.rb +1 -1
- data/spec/rubocop/cop/style/indent_array_spec.rb +37 -2
- data/spec/rubocop/cop/style/indent_hash_spec.rb +64 -8
- data/spec/rubocop/cop/style/indentation_consistency_spec.rb +1 -1
- data/spec/rubocop/cop/style/indentation_width_spec.rb +84 -21
- data/spec/rubocop/cop/style/inline_comment_spec.rb +13 -0
- data/spec/rubocop/cop/style/lambda_call_spec.rb +1 -1
- data/spec/rubocop/cop/style/lambda_spec.rb +1 -1
- data/spec/rubocop/cop/style/leading_comment_space_spec.rb +1 -1
- data/spec/rubocop/cop/style/line_end_concatenation_spec.rb +1 -1
- data/spec/rubocop/cop/style/line_length_spec.rb +1 -1
- data/spec/rubocop/cop/style/method_call_parentheses_spec.rb +3 -3
- data/spec/rubocop/cop/style/method_called_on_do_end_block_spec.rb +1 -1
- data/spec/rubocop/cop/style/method_def_parentheses_spec.rb +1 -1
- data/spec/rubocop/cop/style/method_length_spec.rb +1 -1
- data/spec/rubocop/cop/style/method_name_spec.rb +1 -1
- data/spec/rubocop/cop/style/module_function_spec.rb +1 -1
- data/spec/rubocop/cop/style/multiline_block_chain_spec.rb +1 -1
- data/spec/rubocop/cop/style/multiline_if_then_spec.rb +1 -1
- data/spec/rubocop/cop/style/multiline_ternary_operator_spec.rb +1 -1
- data/spec/rubocop/cop/style/negated_if_spec.rb +1 -1
- data/spec/rubocop/cop/style/negated_while_spec.rb +1 -1
- data/spec/rubocop/cop/style/nested_ternary_operator_spec.rb +1 -1
- data/spec/rubocop/cop/style/next_spec.rb +10 -1
- data/spec/rubocop/cop/style/nil_comparison_spec.rb +1 -1
- data/spec/rubocop/cop/style/non_nil_check_spec.rb +1 -1
- data/spec/rubocop/cop/style/not_spec.rb +1 -1
- data/spec/rubocop/cop/style/numeric_literals_spec.rb +1 -1
- data/spec/rubocop/cop/style/one_line_conditional_spec.rb +1 -1
- data/spec/rubocop/cop/style/op_method_spec.rb +1 -1
- data/spec/rubocop/cop/style/parameter_lists_spec.rb +1 -1
- data/spec/rubocop/cop/style/parentheses_around_condition_spec.rb +16 -1
- data/spec/rubocop/cop/style/percent_literal_delimiters_spec.rb +1 -1
- data/spec/rubocop/cop/style/perl_backrefs_spec.rb +1 -1
- data/spec/rubocop/cop/style/predicate_name_spec.rb +1 -1
- data/spec/rubocop/cop/style/proc_spec.rb +1 -1
- data/spec/rubocop/cop/style/raise_args_spec.rb +1 -1
- data/spec/rubocop/cop/style/redundant_begin_spec.rb +1 -1
- data/spec/rubocop/cop/style/redundant_exception_spec.rb +1 -1
- data/spec/rubocop/cop/style/redundant_return_spec.rb +1 -1
- data/spec/rubocop/cop/style/redundant_self_spec.rb +1 -1
- data/spec/rubocop/cop/style/regexp_literal_spec.rb +15 -1
- data/spec/rubocop/cop/style/rescue_modifier_spec.rb +1 -1
- data/spec/rubocop/cop/style/self_assignment_spec.rb +1 -1
- data/spec/rubocop/cop/style/semicolon_spec.rb +1 -1
- data/spec/rubocop/cop/style/signal_exception_spec.rb +1 -1
- data/spec/rubocop/cop/style/single_line_block_params_spec.rb +1 -1
- data/spec/rubocop/cop/style/single_line_methods_spec.rb +1 -1
- data/spec/rubocop/cop/style/single_space_before_first_arg_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_after_colon_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_after_comma_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_after_control_keyword_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_after_method_name_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_after_not_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_after_semicolon_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_around_operators_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_before_block_braces_spec.rb +5 -5
- data/spec/rubocop/cop/style/space_before_comment_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_inside_block_braces_spec.rb +7 -7
- data/spec/rubocop/cop/style/space_inside_brackets_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_inside_hash_literal_braces_spec.rb +1 -1
- data/spec/rubocop/cop/style/space_inside_parens_spec.rb +1 -1
- data/spec/rubocop/cop/style/special_global_vars_spec.rb +1 -1
- data/spec/rubocop/cop/style/string_literals_spec.rb +1 -1
- data/spec/rubocop/cop/style/symbol_array_spec.rb +1 -1
- data/spec/rubocop/cop/style/tab_spec.rb +1 -1
- data/spec/rubocop/cop/style/trailing_blank_lines_spec.rb +1 -1
- data/spec/rubocop/cop/style/trailing_comma_spec.rb +36 -10
- data/spec/rubocop/cop/style/trailing_whitespace_spec.rb +1 -1
- data/spec/rubocop/cop/style/trivial_accessors_spec.rb +51 -3
- data/spec/rubocop/cop/style/unless_else_spec.rb +1 -1
- data/spec/rubocop/cop/style/unneeded_capital_w_spec.rb +1 -1
- data/spec/rubocop/cop/style/unneeded_percent_x_spec.rb +1 -1
- data/spec/rubocop/cop/style/variable_interpolation_spec.rb +1 -1
- data/spec/rubocop/cop/style/variable_name_spec.rb +1 -1
- data/spec/rubocop/cop/style/when_then_spec.rb +1 -1
- data/spec/rubocop/cop/style/while_until_do_spec.rb +1 -1
- data/spec/rubocop/cop/style/while_until_modifier_spec.rb +6 -6
- data/spec/rubocop/cop/style/word_array_spec.rb +1 -1
- data/spec/rubocop/cop/team_spec.rb +23 -23
- data/spec/rubocop/cop/util_spec.rb +1 -1
- data/spec/rubocop/cop/variable_force/assignment_spec.rb +4 -4
- data/spec/rubocop/cop/variable_force/locatable_spec.rb +4 -4
- data/spec/rubocop/cop/variable_force/scope_spec.rb +3 -3
- data/spec/rubocop/cop/variable_force/variable_spec.rb +2 -2
- data/spec/rubocop/cop/variable_force/variable_table_spec.rb +1 -1
- data/spec/rubocop/cop/variable_force_spec.rb +1 -1
- data/spec/rubocop/file_inspector_spec.rb +3 -3
- data/spec/rubocop/formatter/base_formatter_spec.rb +2 -2
- data/spec/rubocop/formatter/clang_style_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/colorizable_spec.rb +1 -1
- data/spec/rubocop/formatter/disabled_config_formatter_spec.rb +3 -3
- data/spec/rubocop/formatter/disabled_lines_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/emacs_style_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/file_list_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/formatter_set_spec.rb +5 -5
- data/spec/rubocop/formatter/fuubar_style_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/json_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/offense_count_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/progress_formatter_spec.rb +1 -1
- data/spec/rubocop/formatter/simple_text_formatter_spec.rb +1 -1
- data/spec/rubocop/options_spec.rb +5 -5
- data/spec/rubocop/path_util_spec.rb +1 -1
- data/spec/rubocop/processed_source_spec.rb +1 -1
- data/spec/rubocop/source_parser_spec.rb +3 -3
- data/spec/rubocop/target_finder_spec.rb +2 -2
- data/spec/rubocop/token_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -8
- data/spec/support/isolated_environment.rb +1 -1
- data/spec/support/mri_syntax_checker.rb +1 -1
- data/spec/support/offenses_matcher.rb +30 -0
- data/spec/support/shared_context.rb +3 -3
- metadata +8 -2
data/config/disabled.yml
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# These are all the cops that are disabled in the default configuration.
|
2
2
|
|
3
|
-
|
3
|
+
Style/InlineComment:
|
4
|
+
Description: 'Avoid inline comments.'
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Style/MethodCalledOnDoEndBlock:
|
4
8
|
Description: 'Avoid chaining a method call on a do...end block.'
|
5
9
|
Enabled: false
|
6
10
|
|
7
|
-
SymbolArray:
|
11
|
+
Style/SymbolArray:
|
8
12
|
Description: 'Use %i or %I for arrays of symbols.'
|
9
13
|
Enabled: false
|
data/config/enabled.yml
CHANGED
@@ -1,405 +1,405 @@
|
|
1
1
|
# These are all the cops that are enabled in the default configuration.
|
2
2
|
|
3
|
-
AccessModifierIndentation:
|
3
|
+
Style/AccessModifierIndentation:
|
4
4
|
Description: Check indentation of private/protected visibility modifiers.
|
5
5
|
Enabled: true
|
6
6
|
|
7
|
-
AccessorMethodName:
|
7
|
+
Style/AccessorMethodName:
|
8
8
|
Description: Check the naming of accessor methods for get_/set_.
|
9
9
|
Enabled: true
|
10
10
|
|
11
|
-
Alias:
|
11
|
+
Style/Alias:
|
12
12
|
Description: 'Use alias_method instead of alias.'
|
13
13
|
Enabled: true
|
14
14
|
|
15
|
-
AlignArray:
|
15
|
+
Style/AlignArray:
|
16
16
|
Description: >-
|
17
17
|
Align the elements of an array literal if they span more than
|
18
18
|
one line.
|
19
19
|
Enabled: true
|
20
20
|
|
21
|
-
AlignHash:
|
21
|
+
Style/AlignHash:
|
22
22
|
Description: >-
|
23
23
|
Align the elements of a hash literal if they span more than
|
24
24
|
one line.
|
25
25
|
Enabled: true
|
26
26
|
|
27
|
-
AlignParameters:
|
27
|
+
Style/AlignParameters:
|
28
28
|
Description: >-
|
29
29
|
Align the parameters of a method call if they span more
|
30
30
|
than one line.
|
31
31
|
Enabled: true
|
32
32
|
|
33
|
-
AndOr:
|
33
|
+
Style/AndOr:
|
34
34
|
Description: 'Use &&/|| instead of and/or.'
|
35
35
|
Enabled: true
|
36
36
|
|
37
|
-
ArrayJoin:
|
37
|
+
Style/ArrayJoin:
|
38
38
|
Description: 'Use Array#join instead of Array#*.'
|
39
39
|
Enabled: true
|
40
40
|
|
41
|
-
AsciiComments:
|
41
|
+
Style/AsciiComments:
|
42
42
|
Description: 'Use only ascii symbols in comments.'
|
43
43
|
Enabled: true
|
44
44
|
|
45
|
-
AsciiIdentifiers:
|
45
|
+
Style/AsciiIdentifiers:
|
46
46
|
Description: 'Use only ascii symbols in identifiers.'
|
47
47
|
Enabled: true
|
48
48
|
|
49
|
-
Attr:
|
49
|
+
Style/Attr:
|
50
50
|
Description: 'Checks for uses of Module#attr.'
|
51
51
|
Enabled: true
|
52
52
|
|
53
|
-
BeginBlock:
|
53
|
+
Style/BeginBlock:
|
54
54
|
Description: 'Avoid the use of BEGIN blocks.'
|
55
55
|
Enabled: true
|
56
56
|
|
57
|
-
BlockComments:
|
57
|
+
Style/BlockComments:
|
58
58
|
Description: 'Do not use block comments.'
|
59
59
|
Enabled: true
|
60
60
|
|
61
|
-
BlockNesting:
|
61
|
+
Style/BlockNesting:
|
62
62
|
Description: 'Avoid excessive block nesting'
|
63
63
|
Enabled: true
|
64
64
|
|
65
|
-
Blocks:
|
65
|
+
Style/Blocks:
|
66
66
|
Description: >-
|
67
67
|
Avoid using {...} for multi-line blocks (multiline chaining is
|
68
68
|
always ugly).
|
69
69
|
Prefer {...} over do...end for single-line blocks.
|
70
70
|
Enabled: true
|
71
71
|
|
72
|
-
BracesAroundHashParameters:
|
72
|
+
Style/BracesAroundHashParameters:
|
73
73
|
Description: 'Enforce braces style inside hash parameters.'
|
74
74
|
Enabled: true
|
75
75
|
|
76
|
-
CaseEquality:
|
76
|
+
Style/CaseEquality:
|
77
77
|
Description: 'Avoid explicit use of the case equality operator(===).'
|
78
78
|
Enabled: true
|
79
79
|
|
80
|
-
CaseIndentation:
|
80
|
+
Style/CaseIndentation:
|
81
81
|
Description: 'Indentation of when in a case/when/[else/]end.'
|
82
82
|
Enabled: true
|
83
83
|
|
84
|
-
CharacterLiteral:
|
84
|
+
Style/CharacterLiteral:
|
85
85
|
Description: 'Checks for uses of character literals.'
|
86
86
|
Enabled: true
|
87
87
|
|
88
|
-
ClassAndModuleCamelCase:
|
88
|
+
Style/ClassAndModuleCamelCase:
|
89
89
|
Description: 'Use CamelCase for classes and modules.'
|
90
90
|
Enabled: true
|
91
91
|
|
92
|
-
ClassAndModuleChildren:
|
92
|
+
Style/ClassAndModuleChildren:
|
93
93
|
Description: 'Checks style of children classes and modules.'
|
94
94
|
Enabled: true
|
95
95
|
|
96
|
-
ClassLength:
|
96
|
+
Style/ClassLength:
|
97
97
|
Description: 'Avoid classes longer than 100 lines of code.'
|
98
98
|
Enabled: true
|
99
99
|
|
100
|
-
ClassMethods:
|
100
|
+
Style/ClassMethods:
|
101
101
|
Description: 'Use self when defining module/class methods.'
|
102
102
|
Enabled: true
|
103
103
|
|
104
|
-
ClassVars:
|
104
|
+
Style/ClassVars:
|
105
105
|
Description: 'Avoid the use of class variables.'
|
106
106
|
Enabled: true
|
107
107
|
|
108
|
-
CollectionMethods:
|
108
|
+
Style/CollectionMethods:
|
109
109
|
Description: 'Preferred collection methods.'
|
110
110
|
Enabled: true
|
111
111
|
|
112
|
-
ColonMethodCall:
|
112
|
+
Style/ColonMethodCall:
|
113
113
|
Description: 'Do not use :: for method call.'
|
114
114
|
Enabled: true
|
115
115
|
|
116
|
-
CommentAnnotation:
|
116
|
+
Style/CommentAnnotation:
|
117
117
|
Description: >-
|
118
118
|
Checks formatting of special comments
|
119
119
|
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
120
120
|
Enabled: true
|
121
121
|
|
122
|
-
CommentIndentation:
|
122
|
+
Style/CommentIndentation:
|
123
123
|
Description: 'Indentation of comments.'
|
124
124
|
Enabled: true
|
125
125
|
|
126
|
-
ConstantName:
|
126
|
+
Style/ConstantName:
|
127
127
|
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
128
128
|
Enabled: true
|
129
129
|
|
130
|
-
CyclomaticComplexity:
|
130
|
+
Style/CyclomaticComplexity:
|
131
131
|
Description: 'Avoid complex methods.'
|
132
132
|
Enabled: true
|
133
133
|
|
134
|
-
DefWithParentheses:
|
134
|
+
Style/DefWithParentheses:
|
135
135
|
Description: 'Use def with parentheses when there are arguments.'
|
136
136
|
Enabled: true
|
137
137
|
|
138
|
-
|
139
|
-
Description: 'Prefer delegate method for delegations.'
|
140
|
-
Enabled: true
|
141
|
-
|
142
|
-
DeprecatedHashMethods:
|
138
|
+
Style/DeprecatedHashMethods:
|
143
139
|
Description: 'Checks for use of deprecated Hash methods.'
|
144
140
|
Enabled: true
|
145
141
|
|
146
|
-
Documentation:
|
142
|
+
Style/Documentation:
|
147
143
|
Description: 'Document classes and non-namespace modules.'
|
148
144
|
Enabled: true
|
149
145
|
|
150
|
-
DotPosition:
|
146
|
+
Style/DotPosition:
|
151
147
|
Description: 'Checks the position of the dot in multi-line method calls.'
|
152
148
|
Enabled: true
|
153
149
|
|
154
|
-
DoubleNegation:
|
150
|
+
Style/DoubleNegation:
|
155
151
|
Description: 'Checks for uses of double negation (!!).'
|
156
152
|
Enabled: true
|
157
153
|
|
158
|
-
EachWithObject:
|
154
|
+
Style/EachWithObject:
|
159
155
|
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
160
156
|
Enabled: true
|
161
157
|
|
162
|
-
EmptyLineBetweenDefs:
|
158
|
+
Style/EmptyLineBetweenDefs:
|
163
159
|
Description: 'Use empty lines between defs.'
|
164
160
|
Enabled: true
|
165
161
|
|
166
|
-
EmptyLines:
|
162
|
+
Style/EmptyLines:
|
167
163
|
Description: "Don't use several empty lines in a row."
|
168
164
|
Enabled: true
|
169
165
|
|
170
|
-
EmptyLinesAroundAccessModifier:
|
166
|
+
Style/EmptyLinesAroundAccessModifier:
|
171
167
|
Description: "Keep blank lines around access modifiers."
|
172
168
|
Enabled: true
|
173
169
|
|
174
|
-
EmptyLinesAroundBody:
|
170
|
+
Style/EmptyLinesAroundBody:
|
175
171
|
Description: "Keeps track of empty lines around expression bodies."
|
176
172
|
Enabled: true
|
177
173
|
|
178
|
-
EmptyLiteral:
|
174
|
+
Style/EmptyLiteral:
|
179
175
|
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
180
176
|
Enabled: true
|
181
177
|
|
182
|
-
Encoding:
|
178
|
+
Style/Encoding:
|
183
179
|
Description: 'Use UTF-8 as the source file encoding.'
|
184
180
|
Enabled: true
|
185
181
|
|
186
|
-
EndBlock:
|
182
|
+
Style/EndBlock:
|
187
183
|
Description: 'Avoid the use of END blocks.'
|
188
184
|
Enabled: true
|
189
185
|
|
190
|
-
EndOfLine:
|
186
|
+
Style/EndOfLine:
|
191
187
|
Description: 'Use Unix-style line endings.'
|
192
188
|
Enabled: true
|
193
189
|
|
194
|
-
EvenOdd:
|
190
|
+
Style/EvenOdd:
|
195
191
|
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
196
192
|
Enabled: true
|
197
193
|
|
198
|
-
FileName:
|
194
|
+
Style/FileName:
|
199
195
|
Description: 'Use snake_case for source file names.'
|
200
196
|
Enabled: true
|
201
197
|
|
202
|
-
FlipFlop:
|
198
|
+
Style/FlipFlop:
|
203
199
|
Description: 'Checks for flip flops'
|
204
200
|
Enabled: true
|
205
201
|
|
206
|
-
For:
|
202
|
+
Style/For:
|
207
203
|
Description: 'Checks use of for or each in multiline loops.'
|
208
204
|
Enabled: true
|
209
205
|
|
210
|
-
FormatString:
|
206
|
+
Style/FormatString:
|
211
207
|
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
212
208
|
Enabled: true
|
213
209
|
|
214
|
-
GlobalVars:
|
210
|
+
Style/GlobalVars:
|
215
211
|
Description: 'Do not introduce global variables.'
|
216
212
|
Enabled: true
|
217
213
|
|
218
|
-
|
214
|
+
Style/GuardClause:
|
215
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
216
|
+
Enabled: true
|
217
|
+
|
218
|
+
Style/HashSyntax:
|
219
219
|
Description: >-
|
220
220
|
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
221
221
|
{ :a => 1, :b => 2 }.
|
222
222
|
Enabled: true
|
223
223
|
|
224
|
-
IfUnlessModifier:
|
224
|
+
Style/IfUnlessModifier:
|
225
225
|
Description: >-
|
226
226
|
Favor modifier if/unless usage when you have a
|
227
227
|
single-line body.
|
228
228
|
Enabled: true
|
229
229
|
|
230
|
-
IfWithSemicolon:
|
230
|
+
Style/IfWithSemicolon:
|
231
231
|
Description: 'Never use if x; .... Use the ternary operator instead.'
|
232
232
|
Enabled: true
|
233
233
|
|
234
|
-
IndentationConsistency:
|
234
|
+
Style/IndentationConsistency:
|
235
235
|
Description: 'Keep indentation straight.'
|
236
236
|
Enabled: true
|
237
237
|
|
238
|
-
IndentationWidth:
|
238
|
+
Style/IndentationWidth:
|
239
239
|
Description: 'Use 2 spaces for indentation.'
|
240
240
|
Enabled: true
|
241
241
|
|
242
|
-
IndentArray:
|
242
|
+
Style/IndentArray:
|
243
243
|
Description: >-
|
244
244
|
Checks the indentation of the first element in an array
|
245
245
|
literal.
|
246
246
|
Enabled: true
|
247
247
|
|
248
|
-
IndentHash:
|
248
|
+
Style/IndentHash:
|
249
249
|
Description: 'Checks the indentation of the first key in a hash literal.'
|
250
250
|
Enabled: true
|
251
251
|
|
252
|
-
Lambda:
|
252
|
+
Style/Lambda:
|
253
253
|
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
254
254
|
Enabled: true
|
255
255
|
|
256
|
-
LambdaCall:
|
256
|
+
Style/LambdaCall:
|
257
257
|
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
258
258
|
Enabled: true
|
259
259
|
|
260
|
-
LeadingCommentSpace:
|
260
|
+
Style/LeadingCommentSpace:
|
261
261
|
Description: 'Comments should start with a space.'
|
262
262
|
Enabled: true
|
263
263
|
|
264
|
-
LineEndConcatenation:
|
264
|
+
Style/LineEndConcatenation:
|
265
265
|
Description: >-
|
266
266
|
Use \ instead of + or << to concatenate two string literals at
|
267
267
|
line end.
|
268
268
|
Enabled: true
|
269
269
|
|
270
|
-
LineLength:
|
270
|
+
Style/LineLength:
|
271
271
|
Description: 'Limit lines to 80 characters.'
|
272
272
|
Enabled: true
|
273
273
|
|
274
|
-
MethodCallParentheses:
|
274
|
+
Style/MethodCallParentheses:
|
275
275
|
Description: 'Do not use parentheses for method calls with no arguments.'
|
276
276
|
Enabled: true
|
277
277
|
|
278
|
-
MethodDefParentheses:
|
278
|
+
Style/MethodDefParentheses:
|
279
279
|
Description: >-
|
280
280
|
Checks if the method definitions have or don't have
|
281
281
|
parentheses.
|
282
282
|
Enabled: true
|
283
283
|
|
284
|
-
MethodLength:
|
284
|
+
Style/MethodLength:
|
285
285
|
Description: 'Avoid methods longer than 10 lines of code.'
|
286
286
|
Enabled: true
|
287
287
|
|
288
|
-
MethodName:
|
288
|
+
Style/MethodName:
|
289
289
|
Description: 'Use the configured style when naming methods.'
|
290
290
|
Enabled: true
|
291
291
|
|
292
|
-
ModuleFunction:
|
292
|
+
Style/ModuleFunction:
|
293
293
|
Description: 'Checks for usage of `extend self` in modules.'
|
294
294
|
Enabled: true
|
295
295
|
|
296
|
-
MultilineBlockChain:
|
296
|
+
Style/MultilineBlockChain:
|
297
297
|
Description: 'Avoid multi-line chains of blocks.'
|
298
298
|
Enabled: true
|
299
299
|
|
300
|
-
MultilineIfThen:
|
300
|
+
Style/MultilineIfThen:
|
301
301
|
Description: 'Never use then for multi-line if/unless.'
|
302
302
|
Enabled: true
|
303
303
|
|
304
|
-
MultilineTernaryOperator:
|
304
|
+
Style/MultilineTernaryOperator:
|
305
305
|
Description: >-
|
306
306
|
Avoid multi-line ?: (the ternary operator);
|
307
307
|
use if/unless instead.
|
308
308
|
Enabled: true
|
309
309
|
|
310
|
-
NegatedIf:
|
310
|
+
Style/NegatedIf:
|
311
311
|
Description: >-
|
312
312
|
Favor unless over if for negative conditions
|
313
313
|
(or control flow or).
|
314
314
|
Enabled: true
|
315
315
|
|
316
|
-
NegatedWhile:
|
316
|
+
Style/NegatedWhile:
|
317
317
|
Description: 'Favor until over while for negative conditions.'
|
318
318
|
Enabled: true
|
319
319
|
|
320
|
-
NestedTernaryOperator:
|
320
|
+
Style/NestedTernaryOperator:
|
321
321
|
Description: 'Use one expression per branch in a ternary operator.'
|
322
322
|
Enabled: true
|
323
323
|
|
324
|
-
Next:
|
324
|
+
Style/Next:
|
325
325
|
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
326
326
|
Enabled: true
|
327
327
|
|
328
|
-
NilComparison:
|
328
|
+
Style/NilComparison:
|
329
329
|
Description: 'Prefer x.nil? to x == nil.'
|
330
330
|
Enabled: true
|
331
331
|
|
332
|
-
NonNilCheck:
|
332
|
+
Style/NonNilCheck:
|
333
333
|
Description: 'Checks for redundant nil checks.'
|
334
334
|
Enabled: true
|
335
335
|
|
336
|
-
Not:
|
336
|
+
Style/Not:
|
337
337
|
Description: 'Use ! instead of not.'
|
338
338
|
Enabled: true
|
339
339
|
|
340
|
-
NumericLiterals:
|
340
|
+
Style/NumericLiterals:
|
341
341
|
Description: >-
|
342
342
|
Add underscores to large numeric literals to improve their
|
343
343
|
readability.
|
344
344
|
Enabled: true
|
345
345
|
|
346
|
-
OneLineConditional:
|
346
|
+
Style/OneLineConditional:
|
347
347
|
Description: >-
|
348
348
|
Favor the ternary operator(?:) over
|
349
349
|
if/then/else/end constructs.
|
350
350
|
Enabled: true
|
351
351
|
|
352
|
-
OpMethod:
|
352
|
+
Style/OpMethod:
|
353
353
|
Description: 'When defining binary operators, name the argument other.'
|
354
354
|
Enabled: true
|
355
355
|
|
356
|
-
ParameterLists:
|
356
|
+
Style/ParameterLists:
|
357
357
|
Description: 'Avoid parameter lists longer than three or four parameters.'
|
358
358
|
Enabled: true
|
359
359
|
|
360
|
-
ParenthesesAroundCondition:
|
360
|
+
Style/ParenthesesAroundCondition:
|
361
361
|
Description: >-
|
362
362
|
Don't use parentheses around the condition of an
|
363
363
|
if/unless/while.
|
364
364
|
Enabled: true
|
365
365
|
|
366
|
-
PercentLiteralDelimiters:
|
366
|
+
Style/PercentLiteralDelimiters:
|
367
367
|
Description: 'Use `%`-literal delimiters consistently'
|
368
368
|
Enabled: true
|
369
369
|
|
370
|
-
PerlBackrefs:
|
370
|
+
Style/PerlBackrefs:
|
371
371
|
Description: 'Avoid Perl-style regex back references.'
|
372
372
|
Enabled: true
|
373
373
|
|
374
|
-
PredicateName:
|
374
|
+
Style/PredicateName:
|
375
375
|
Description: 'Check the names of predicate methods.'
|
376
376
|
Enabled: true
|
377
377
|
|
378
|
-
Proc:
|
378
|
+
Style/Proc:
|
379
379
|
Description: 'Use proc instead of Proc.new.'
|
380
380
|
Enabled: true
|
381
381
|
|
382
|
-
RaiseArgs:
|
382
|
+
Style/RaiseArgs:
|
383
383
|
Description: 'Checks the arguments passed to raise/fail.'
|
384
384
|
Enabled: true
|
385
385
|
|
386
|
-
RedundantBegin:
|
386
|
+
Style/RedundantBegin:
|
387
387
|
Description: "Don't use begin blocks when they are not needed."
|
388
388
|
Enabled: true
|
389
389
|
|
390
|
-
RedundantException:
|
390
|
+
Style/RedundantException:
|
391
391
|
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
392
392
|
Enabled: true
|
393
393
|
|
394
|
-
RedundantReturn:
|
394
|
+
Style/RedundantReturn:
|
395
395
|
Description: "Don't use return where it's not required."
|
396
396
|
Enabled: true
|
397
397
|
|
398
|
-
RedundantSelf:
|
398
|
+
Style/RedundantSelf:
|
399
399
|
Description: "Don't use self where it's not needed."
|
400
400
|
Enabled: true
|
401
401
|
|
402
|
-
RegexpLiteral:
|
402
|
+
Style/RegexpLiteral:
|
403
403
|
Description: >-
|
404
404
|
Use %r for regular expressions matching more than
|
405
405
|
`MaxSlashes` '/' characters.
|
@@ -407,367 +407,367 @@ RegexpLiteral:
|
|
407
407
|
`MaxSlashes` '/' character.
|
408
408
|
Enabled: true
|
409
409
|
|
410
|
-
RescueModifier:
|
410
|
+
Style/RescueModifier:
|
411
411
|
Description: 'Avoid using rescue in its modifier form.'
|
412
412
|
Enabled: true
|
413
413
|
|
414
|
-
SelfAssignment:
|
414
|
+
Style/SelfAssignment:
|
415
415
|
Description: 'Checks for places where self-assignment shorthand should have been used.'
|
416
416
|
Enabled: true
|
417
417
|
|
418
|
-
Semicolon:
|
418
|
+
Style/Semicolon:
|
419
419
|
Description: "Don't use semicolons to terminate expressions."
|
420
420
|
Enabled: true
|
421
421
|
|
422
|
-
SignalException:
|
422
|
+
Style/SignalException:
|
423
423
|
Description: 'Checks for proper usage of fail and raise.'
|
424
424
|
Enabled: true
|
425
425
|
|
426
|
-
SingleLineBlockParams:
|
426
|
+
Style/SingleLineBlockParams:
|
427
427
|
Description: 'Enforces the names of some block params.'
|
428
428
|
Enabled: true
|
429
429
|
|
430
|
-
SingleLineMethods:
|
430
|
+
Style/SingleLineMethods:
|
431
431
|
Description: 'Avoid single-line methods.'
|
432
432
|
Enabled: true
|
433
433
|
|
434
|
-
SingleSpaceBeforeFirstArg:
|
434
|
+
Style/SingleSpaceBeforeFirstArg:
|
435
435
|
Description: >-
|
436
436
|
Checks that exactly one space is used between a method name
|
437
437
|
and the first argument for method calls without parentheses.
|
438
438
|
Enabled: true
|
439
439
|
|
440
|
-
SpaceAfterColon:
|
440
|
+
Style/SpaceAfterColon:
|
441
441
|
Description: 'Use spaces after colons.'
|
442
442
|
Enabled: true
|
443
443
|
|
444
|
-
SpaceAfterComma:
|
444
|
+
Style/SpaceAfterComma:
|
445
445
|
Description: 'Use spaces after commas.'
|
446
446
|
Enabled: true
|
447
447
|
|
448
|
-
SpaceAfterControlKeyword:
|
448
|
+
Style/SpaceAfterControlKeyword:
|
449
449
|
Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
|
450
450
|
Enabled: true
|
451
451
|
|
452
|
-
SpaceAfterMethodName:
|
452
|
+
Style/SpaceAfterMethodName:
|
453
453
|
Description: >-
|
454
454
|
Never put a space between a method name and the opening
|
455
455
|
parenthesis in a method definition.
|
456
456
|
Enabled: true
|
457
457
|
|
458
|
-
SpaceAfterNot:
|
458
|
+
Style/SpaceAfterNot:
|
459
459
|
Description: Tracks redundant space after the ! operator.
|
460
460
|
Enabled: true
|
461
461
|
|
462
|
-
SpaceAfterSemicolon:
|
462
|
+
Style/SpaceAfterSemicolon:
|
463
463
|
Description: 'Use spaces after semicolons.'
|
464
464
|
Enabled: true
|
465
465
|
|
466
|
-
SpaceBeforeBlockBraces:
|
466
|
+
Style/SpaceBeforeBlockBraces:
|
467
467
|
Description: >-
|
468
468
|
Checks that the left block brace has or doesn't have space
|
469
469
|
before it.
|
470
470
|
Enabled: true
|
471
471
|
|
472
|
-
SpaceBeforeComment:
|
472
|
+
Style/SpaceBeforeComment:
|
473
473
|
Description: >-
|
474
474
|
Checks for missing space between code and a comment on the
|
475
475
|
same line.
|
476
476
|
Enabled: true
|
477
477
|
|
478
|
-
SpaceInsideBlockBraces:
|
478
|
+
Style/SpaceInsideBlockBraces:
|
479
479
|
Description: >-
|
480
480
|
Checks that block braces have or don't have surrounding space.
|
481
481
|
For blocks taking parameters, checks that the left brace has
|
482
482
|
or doesn't have trailing space.
|
483
483
|
Enabled: true
|
484
484
|
|
485
|
-
SpaceAroundEqualsInParameterDefault:
|
485
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
486
486
|
Description: >-
|
487
487
|
Checks that the equals signs in parameter default assignments
|
488
488
|
have or don't have surrounding space depending on
|
489
489
|
configuration.
|
490
490
|
Enabled: true
|
491
491
|
|
492
|
-
SpaceAroundOperators:
|
492
|
+
Style/SpaceAroundOperators:
|
493
493
|
Description: 'Use spaces around operators.'
|
494
494
|
Enabled: true
|
495
495
|
|
496
|
-
SpaceBeforeModifierKeyword:
|
496
|
+
Style/SpaceBeforeModifierKeyword:
|
497
497
|
Description: 'Put a space before the modifier keyword.'
|
498
498
|
Enabled: true
|
499
499
|
|
500
|
-
SpaceInsideBrackets:
|
500
|
+
Style/SpaceInsideBrackets:
|
501
501
|
Description: 'No spaces after [ or before ].'
|
502
502
|
Enabled: true
|
503
503
|
|
504
|
-
SpaceInsideHashLiteralBraces:
|
504
|
+
Style/SpaceInsideHashLiteralBraces:
|
505
505
|
Description: "Use spaces inside hash literal braces - or don't."
|
506
506
|
Enabled: true
|
507
507
|
|
508
|
-
SpaceInsideParens:
|
508
|
+
Style/SpaceInsideParens:
|
509
509
|
Description: 'No spaces after ( or before ).'
|
510
510
|
Enabled: true
|
511
511
|
|
512
|
-
SpecialGlobalVars:
|
512
|
+
Style/SpecialGlobalVars:
|
513
513
|
Description: 'Avoid Perl-style global variables.'
|
514
514
|
Enabled: true
|
515
515
|
|
516
|
-
StringLiterals:
|
516
|
+
Style/StringLiterals:
|
517
517
|
Description: 'Checks if uses of quotes match the configured preference.'
|
518
518
|
Enabled: true
|
519
519
|
|
520
|
-
Tab:
|
520
|
+
Style/Tab:
|
521
521
|
Description: 'No hard tabs.'
|
522
522
|
Enabled: true
|
523
523
|
|
524
|
-
TrailingBlankLines:
|
524
|
+
Style/TrailingBlankLines:
|
525
525
|
Description: 'Checks trailing blank lines and final newline.'
|
526
526
|
Enabled: true
|
527
527
|
|
528
|
-
TrailingComma:
|
528
|
+
Style/TrailingComma:
|
529
529
|
Description: 'Checks for trailing comma in parameter lists and literals.'
|
530
530
|
Enabled: true
|
531
531
|
|
532
|
-
TrailingWhitespace:
|
532
|
+
Style/TrailingWhitespace:
|
533
533
|
Description: 'Avoid trailing whitespace.'
|
534
534
|
Enabled: true
|
535
535
|
|
536
|
-
TrivialAccessors:
|
536
|
+
Style/TrivialAccessors:
|
537
537
|
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
538
538
|
Enabled: true
|
539
539
|
|
540
|
-
UnlessElse:
|
540
|
+
Style/UnlessElse:
|
541
541
|
Description: >-
|
542
542
|
Never use unless with else. Rewrite these with the positive
|
543
543
|
case first.
|
544
544
|
Enabled: true
|
545
545
|
|
546
|
-
UnneededCapitalW:
|
546
|
+
Style/UnneededCapitalW:
|
547
547
|
Description: 'Checks for %W when interpolation is not needed.'
|
548
548
|
Enabled: true
|
549
549
|
|
550
|
-
UnneededPercentX:
|
550
|
+
Style/UnneededPercentX:
|
551
551
|
Description: 'Checks for %x when `` would do.'
|
552
552
|
Enabled: true
|
553
553
|
|
554
|
-
VariableInterpolation:
|
554
|
+
Style/VariableInterpolation:
|
555
555
|
Description: >-
|
556
556
|
Don't interpolate global, instance and class variables
|
557
557
|
directly in strings.
|
558
558
|
Enabled: true
|
559
559
|
|
560
|
-
VariableName:
|
560
|
+
Style/VariableName:
|
561
561
|
Description: 'Use the configured style when naming variables.'
|
562
562
|
Enabled: true
|
563
563
|
|
564
|
-
WhenThen:
|
564
|
+
Style/WhenThen:
|
565
565
|
Description: 'Use when x then ... for one-line cases.'
|
566
566
|
Enabled: true
|
567
567
|
|
568
|
-
WhileUntilDo:
|
568
|
+
Style/WhileUntilDo:
|
569
569
|
Description: 'Checks for redundant do after while or until.'
|
570
570
|
Enabled: true
|
571
571
|
|
572
|
-
WhileUntilModifier:
|
572
|
+
Style/WhileUntilModifier:
|
573
573
|
Description: >-
|
574
574
|
Favor modifier while/until usage when you have a
|
575
575
|
single-line body.
|
576
576
|
Enabled: true
|
577
577
|
|
578
|
-
WordArray:
|
578
|
+
Style/WordArray:
|
579
579
|
Description: 'Use %w or %W for arrays of words.'
|
580
580
|
Enabled: true
|
581
581
|
|
582
582
|
#################### Lint ################################
|
583
583
|
### Warnings
|
584
584
|
|
585
|
-
AmbiguousOperator:
|
585
|
+
Lint/AmbiguousOperator:
|
586
586
|
Description: >-
|
587
587
|
Checks for ambiguous operators in the first argument of a
|
588
588
|
method invocation without parentheses.
|
589
589
|
Enabled: true
|
590
590
|
|
591
|
-
AmbiguousRegexpLiteral:
|
591
|
+
Lint/AmbiguousRegexpLiteral:
|
592
592
|
Description: >-
|
593
593
|
Checks for ambiguous regexp literals in the first argument of
|
594
594
|
a method invocation without parenthesis.
|
595
595
|
Enabled: true
|
596
596
|
|
597
|
-
AssignmentInCondition:
|
597
|
+
Lint/AssignmentInCondition:
|
598
598
|
Description: "Don't use assignment in conditions."
|
599
599
|
Enabled: true
|
600
600
|
|
601
|
-
BlockAlignment:
|
601
|
+
Lint/BlockAlignment:
|
602
602
|
Description: 'Align block ends correctly.'
|
603
603
|
Enabled: true
|
604
604
|
|
605
|
-
ConditionPosition:
|
605
|
+
Lint/ConditionPosition:
|
606
606
|
Description: 'Checks for condition placed in a confusing position relative to the keyword.'
|
607
607
|
Enabled: true
|
608
608
|
|
609
|
-
Debugger:
|
609
|
+
Lint/Debugger:
|
610
610
|
Description: 'Check for debugger calls.'
|
611
611
|
Enabled: true
|
612
612
|
|
613
|
-
DeprecatedClassMethods:
|
613
|
+
Lint/DeprecatedClassMethods:
|
614
614
|
Description: 'Check for deprecated class method calls.'
|
615
615
|
Enabled: true
|
616
616
|
|
617
|
-
ElseLayout:
|
617
|
+
Lint/ElseLayout:
|
618
618
|
Description: 'Check for odd code arrangement in an else block.'
|
619
619
|
Enabled: true
|
620
620
|
|
621
|
-
EmptyEnsure:
|
621
|
+
Lint/EmptyEnsure:
|
622
622
|
Description: 'Checks for empty ensure block.'
|
623
623
|
Enabled: true
|
624
624
|
|
625
|
-
EmptyInterpolation:
|
625
|
+
Lint/EmptyInterpolation:
|
626
626
|
Description: 'Checks for empty string interpolation.'
|
627
627
|
Enabled: true
|
628
628
|
|
629
|
-
EndAlignment:
|
629
|
+
Lint/EndAlignment:
|
630
630
|
Description: 'Align ends correctly.'
|
631
631
|
Enabled: true
|
632
632
|
|
633
|
-
EndInMethod:
|
633
|
+
Lint/EndInMethod:
|
634
634
|
Description: 'END blocks should not be placed inside method definitions.'
|
635
635
|
Enabled: true
|
636
636
|
|
637
|
-
EnsureReturn:
|
637
|
+
Lint/EnsureReturn:
|
638
638
|
Description: 'Never use return in an ensure block.'
|
639
639
|
Enabled: true
|
640
640
|
|
641
|
-
Eval:
|
641
|
+
Lint/Eval:
|
642
642
|
Description: 'The use of eval represents a serious security risk.'
|
643
643
|
Enabled: true
|
644
644
|
|
645
|
-
|
646
|
-
Description: 'Check for conditionals that can be replaced with guard clauses'
|
647
|
-
Enabled: true
|
648
|
-
|
649
|
-
HandleExceptions:
|
645
|
+
Lint/HandleExceptions:
|
650
646
|
Description: "Don't suppress exception."
|
651
647
|
Enabled: true
|
652
648
|
|
653
|
-
InvalidCharacterLiteral:
|
649
|
+
Lint/InvalidCharacterLiteral:
|
654
650
|
Description: >-
|
655
651
|
Checks for invalid character literals with a non-escaped
|
656
652
|
whitespace character.
|
657
653
|
Enabled: true
|
658
654
|
|
659
|
-
LiteralInCondition:
|
655
|
+
Lint/LiteralInCondition:
|
660
656
|
Description: 'Checks of literals used in conditions.'
|
661
657
|
Enabled: true
|
662
658
|
|
663
|
-
LiteralInInterpolation:
|
659
|
+
Lint/LiteralInInterpolation:
|
664
660
|
Description: 'Checks for literals used in interpolation.'
|
665
661
|
Enabled: true
|
666
662
|
|
667
|
-
Loop:
|
663
|
+
Lint/Loop:
|
668
664
|
Description: >-
|
669
665
|
Use Kernel#loop with break rather than begin/end/until or
|
670
666
|
begin/end/while for post-loop tests.
|
671
667
|
Enabled: true
|
672
668
|
|
673
|
-
ParenthesesAsGroupedExpression:
|
669
|
+
Lint/ParenthesesAsGroupedExpression:
|
674
670
|
Description: >-
|
675
671
|
Checks for method calls with a space before the opening
|
676
672
|
parenthesis.
|
677
673
|
Enabled: true
|
678
674
|
|
679
|
-
RequireParentheses:
|
675
|
+
Lint/RequireParentheses:
|
680
676
|
Description: >-
|
681
677
|
Use parentheses in the method call to avoid confusion
|
682
678
|
about precedence.
|
683
679
|
Enabled: true
|
684
680
|
|
685
|
-
RescueException:
|
681
|
+
Lint/RescueException:
|
686
682
|
Description: 'Avoid rescuing the Exception class.'
|
687
683
|
Enabled: true
|
688
684
|
|
689
|
-
ShadowingOuterLocalVariable:
|
685
|
+
Lint/ShadowingOuterLocalVariable:
|
690
686
|
Description: >-
|
691
687
|
Do not use the same name as outer local variable
|
692
688
|
for block arguments or block local variables.
|
693
689
|
Enabled: true
|
694
690
|
|
695
|
-
SpaceBeforeFirstArg:
|
691
|
+
Lint/SpaceBeforeFirstArg:
|
696
692
|
Description: >-
|
697
693
|
Put a space between a method name and the first argument
|
698
694
|
in a method call without parentheses.
|
699
695
|
Enabled: true
|
700
696
|
|
701
|
-
StringConversionInInterpolation:
|
697
|
+
Lint/StringConversionInInterpolation:
|
702
698
|
Description: 'Checks for Object#to_s usage in string interpolation.'
|
703
699
|
Enabled: true
|
704
700
|
|
705
|
-
UnderscorePrefixedVariableName:
|
701
|
+
Lint/UnderscorePrefixedVariableName:
|
706
702
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
707
703
|
Enabled: true
|
708
704
|
|
709
|
-
UnusedBlockArgument:
|
705
|
+
Lint/UnusedBlockArgument:
|
710
706
|
Description: 'Checks for unused block arguments.'
|
711
707
|
Enabled: true
|
712
708
|
|
713
|
-
UnusedMethodArgument:
|
709
|
+
Lint/UnusedMethodArgument:
|
714
710
|
Description: 'Checks for unused method arguments.'
|
715
711
|
Enabled: true
|
716
712
|
|
717
|
-
UnreachableCode:
|
713
|
+
Lint/UnreachableCode:
|
718
714
|
Description: 'Unreachable code.'
|
719
715
|
Enabled: true
|
720
716
|
|
721
|
-
UselessAccessModifier:
|
717
|
+
Lint/UselessAccessModifier:
|
722
718
|
Description: 'Checks for useless access modifiers.'
|
723
719
|
Enabled: true
|
724
720
|
|
725
|
-
UselessAssignment:
|
721
|
+
Lint/UselessAssignment:
|
726
722
|
Description: 'Checks for useless assignment to a local variable.'
|
727
723
|
Enabled: true
|
728
724
|
|
729
|
-
UselessComparison:
|
725
|
+
Lint/UselessComparison:
|
730
726
|
Description: 'Checks for comparison of something with itself.'
|
731
727
|
Enabled: true
|
732
728
|
|
733
|
-
UselessElseWithoutRescue:
|
729
|
+
Lint/UselessElseWithoutRescue:
|
734
730
|
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
735
731
|
Enabled: true
|
736
732
|
|
737
|
-
UselessSetterCall:
|
733
|
+
Lint/UselessSetterCall:
|
738
734
|
Description: 'Checks for useless setter call to a local variable.'
|
739
735
|
Enabled: true
|
740
736
|
|
741
|
-
Void:
|
737
|
+
Lint/Void:
|
742
738
|
Description: 'Possible use of operator/literal/variable in void context.'
|
743
739
|
Enabled: true
|
744
740
|
|
745
741
|
##################### Rails ##################################
|
746
742
|
|
747
|
-
ActionFilter:
|
743
|
+
Rails/ActionFilter:
|
748
744
|
Description: 'Enforces consistent use of action filter methods.'
|
749
745
|
Enabled: true
|
750
746
|
|
751
|
-
DefaultScope:
|
747
|
+
Rails/DefaultScope:
|
752
748
|
Description: 'Checks if the argument passed to default_scope is a block.'
|
753
749
|
Enabled: true
|
754
750
|
|
755
|
-
|
751
|
+
Rails/Delegate:
|
752
|
+
Description: 'Prefer delegate method for delegations.'
|
753
|
+
Enabled: true
|
754
|
+
|
755
|
+
Rails/HasAndBelongsToMany:
|
756
756
|
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
757
757
|
Enabled: true
|
758
758
|
|
759
|
-
Output:
|
759
|
+
Rails/Output:
|
760
760
|
Description: 'Checks for calls to puts, print, etc.'
|
761
761
|
Enabled: true
|
762
762
|
|
763
|
-
ReadWriteAttribute:
|
763
|
+
Rails/ReadWriteAttribute:
|
764
764
|
Description: 'Checks for read_attribute(:attr) and write_attribute(:attr, val).'
|
765
765
|
Enabled: true
|
766
766
|
|
767
|
-
ScopeArgs:
|
767
|
+
Rails/ScopeArgs:
|
768
768
|
Description: 'Checks the arguments of ActiveRecord scopes.'
|
769
769
|
Enabled: true
|
770
770
|
|
771
|
-
Validation:
|
771
|
+
Rails/Validation:
|
772
772
|
Description: 'Use sexy validations.'
|
773
773
|
Enabled: true
|