rubocop 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            # encoding: utf-8
         | 
| 2 2 |  | 
| 3 | 
            -
            module  | 
| 3 | 
            +
            module RuboCop
         | 
| 4 4 | 
             
              # This class handles the processing of files, which includes dealing with
         | 
| 5 5 | 
             
              # formatters and letting cops inspect the files.
         | 
| 6 6 | 
             
              class FileInspector
         | 
| @@ -43,7 +43,7 @@ module Rubocop | |
| 43 43 | 
             
                  warn 'Errors are usually caused by RuboCop bugs.'
         | 
| 44 44 | 
             
                  warn 'Please, report your problems to RuboCop\'s issue tracker.'
         | 
| 45 45 | 
             
                  warn 'Mention the following information in the issue report:'
         | 
| 46 | 
            -
                  warn  | 
| 46 | 
            +
                  warn RuboCop::Version.version(true)
         | 
| 47 47 | 
             
                end
         | 
| 48 48 |  | 
| 49 49 | 
             
                private
         | 
| @@ -149,7 +149,7 @@ module Rubocop | |
| 149 149 | 
             
                end
         | 
| 150 150 |  | 
| 151 151 | 
             
                def fail_level
         | 
| 152 | 
            -
                  @fail_level ||=  | 
| 152 | 
            +
                  @fail_level ||= RuboCop::Cop::Severity.new(
         | 
| 153 153 | 
             
                    @options[:fail_level] || :refactor)
         | 
| 154 154 | 
             
                end
         | 
| 155 155 | 
             
              end
         | 
| @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            # encoding: utf-8
         | 
| 2 2 |  | 
| 3 | 
            -
            # rubocop:disable LineLength, UnusedMethodArgument
         | 
| 3 | 
            +
            # rubocop:disable Style/LineLength, Lint/UnusedMethodArgument
         | 
| 4 4 |  | 
| 5 | 
            -
            module  | 
| 5 | 
            +
            module RuboCop
         | 
| 6 6 | 
             
              module Formatter
         | 
| 7 7 | 
             
                # Abstract base class for formatter, implements all public API methods.
         | 
| 8 8 | 
             
                #
         | 
| 9 9 | 
             
                # ## Creating Custom Formatter
         | 
| 10 10 | 
             
                #
         | 
| 11 11 | 
             
                # You can create a custom formatter by subclassing
         | 
| 12 | 
            -
                # ` | 
| 12 | 
            +
                # `RuboCop::Formatter::BaseFormatter` and overriding some methods,
         | 
| 13 13 | 
             
                # or by implementing all the methods by duck typing.
         | 
| 14 14 | 
             
                #
         | 
| 15 15 | 
             
                # ## Using Custom Formatter in Command Line
         | 
| @@ -41,7 +41,7 @@ module Rubocop | |
| 41 41 | 
             
                # * `#finished`
         | 
| 42 42 | 
             
                #
         | 
| 43 43 | 
             
                class BaseFormatter
         | 
| 44 | 
            -
                  # rubocop:enable LineLength
         | 
| 44 | 
            +
                  # rubocop:enable Style/LineLength
         | 
| 45 45 |  | 
| 46 46 | 
             
                  # @api public
         | 
| 47 47 | 
             
                  #
         | 
| @@ -93,12 +93,12 @@ module Rubocop | |
| 93 93 | 
             
                  # @param file [String]
         | 
| 94 94 | 
             
                  #   the file path
         | 
| 95 95 | 
             
                  #
         | 
| 96 | 
            -
                  # @param offenses [Array( | 
| 96 | 
            +
                  # @param offenses [Array(RuboCop::Cop::Offense)]
         | 
| 97 97 | 
             
                  #   all detected offenses for the file
         | 
| 98 98 | 
             
                  #
         | 
| 99 99 | 
             
                  # @return [void]
         | 
| 100 100 | 
             
                  #
         | 
| 101 | 
            -
                  # @see  | 
| 101 | 
            +
                  # @see RuboCop::Cop::Offense
         | 
| 102 102 | 
             
                  def file_finished(file, offenses)
         | 
| 103 103 | 
             
                  end
         | 
| 104 104 |  | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            # encoding: utf-8
         | 
| 2 2 |  | 
| 3 | 
            -
            module  | 
| 3 | 
            +
            module RuboCop
         | 
| 4 4 | 
             
              module Formatter
         | 
| 5 5 | 
             
                # This formatter displays a YAML configuration file where all cops that
         | 
| 6 6 | 
             
                # detected any offenses are configured to not detect the offense.
         | 
| @@ -52,7 +52,7 @@ module Rubocop | |
| 52 52 | 
             
                      output.puts '# Cop supports --auto-correct.'
         | 
| 53 53 | 
             
                    end
         | 
| 54 54 |  | 
| 55 | 
            -
                    default_cfg =  | 
| 55 | 
            +
                    default_cfg = RuboCop::ConfigLoader.default_configuration[cop_name]
         | 
| 56 56 | 
             
                    return unless default_cfg
         | 
| 57 57 |  | 
| 58 58 | 
             
                    params = default_cfg.keys - %w(Description Enabled) - cfg.keys
         | 
| @@ -3,7 +3,7 @@ | |
| 3 3 | 
             
            require 'json'
         | 
| 4 4 | 
             
            require 'pathname'
         | 
| 5 5 |  | 
| 6 | 
            -
            module  | 
| 6 | 
            +
            module RuboCop
         | 
| 7 7 | 
             
              module Formatter
         | 
| 8 8 | 
             
                # This formatter formats the report data in JSON format.
         | 
| 9 9 | 
             
                class JSONFormatter < BaseFormatter
         | 
| @@ -36,7 +36,7 @@ module Rubocop | |
| 36 36 |  | 
| 37 37 | 
             
                  def metadata_hash
         | 
| 38 38 | 
             
                    {
         | 
| 39 | 
            -
                      rubocop_version:  | 
| 39 | 
            +
                      rubocop_version: RuboCop::Version::STRING,
         | 
| 40 40 | 
             
                      ruby_engine:     RUBY_ENGINE,
         | 
| 41 41 | 
             
                      ruby_version:    RUBY_VERSION,
         | 
| 42 42 | 
             
                      ruby_patchlevel: RUBY_PATCHLEVEL.to_s,
         | 
    
        data/lib/rubocop/options.rb
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            require 'optparse'
         | 
| 4 4 |  | 
| 5 | 
            -
            module  | 
| 5 | 
            +
            module RuboCop
         | 
| 6 6 | 
             
              # This module contains help texts for command line options.
         | 
| 7 7 | 
             
              module OptionsHelp
         | 
| 8 8 | 
             
                TEXT = {
         | 
| @@ -66,7 +66,9 @@ module Rubocop | |
| 66 66 | 
             
                    opts.banner = 'Usage: rubocop [options] [file1, file2, ...]'
         | 
| 67 67 |  | 
| 68 68 | 
             
                    option(opts, '--only [COP1,COP2,...]') do |list|
         | 
| 69 | 
            -
                      @options[:only] = list.split(',')
         | 
| 69 | 
            +
                      @options[:only] = list.split(',').map do |c|
         | 
| 70 | 
            +
                        Cop::Cop.qualified_cop_name(c, '--only option')
         | 
| 71 | 
            +
                      end
         | 
| 70 72 | 
             
                      validate_only_option
         | 
| 71 73 | 
             
                    end
         | 
| 72 74 |  | 
| @@ -116,8 +118,8 @@ module Rubocop | |
| 116 118 |  | 
| 117 119 | 
             
                def add_severity_option(opts)
         | 
| 118 120 | 
             
                  option(opts, '--fail-level SEVERITY',
         | 
| 119 | 
            -
                          | 
| 120 | 
            -
                          | 
| 121 | 
            +
                         RuboCop::Cop::Severity::NAMES,
         | 
| 122 | 
            +
                         RuboCop::Cop::Severity::CODE_TABLE) do |severity|
         | 
| 121 123 | 
             
                    @options[:fail_level] = severity
         | 
| 122 124 | 
             
                  end
         | 
| 123 125 | 
             
                end
         | 
    
        data/lib/rubocop/path_util.rb
    CHANGED
    
    
    
        data/lib/rubocop/rake_task.rb
    CHANGED
    
    | @@ -3,11 +3,11 @@ | |
| 3 3 | 
             
            require 'rake'
         | 
| 4 4 | 
             
            require 'rake/tasklib'
         | 
| 5 5 |  | 
| 6 | 
            -
            module  | 
| 6 | 
            +
            module RuboCop
         | 
| 7 7 | 
             
              # Provides a custom rake task.
         | 
| 8 8 | 
             
              #
         | 
| 9 9 | 
             
              # require 'rubocop/rake_task'
         | 
| 10 | 
            -
              #  | 
| 10 | 
            +
              # RuboCop::RakeTask.new
         | 
| 11 11 | 
             
              class RakeTask < Rake::TaskLib
         | 
| 12 12 | 
             
                attr_accessor :name
         | 
| 13 13 | 
             
                attr_accessor :verbose
         | 
| @@ -70,7 +70,7 @@ module Rubocop | |
| 70 70 | 
             
                  @patterns = []
         | 
| 71 71 | 
             
                  @requires = []
         | 
| 72 72 | 
             
                  @options = []
         | 
| 73 | 
            -
                  @formatters = [ | 
| 73 | 
            +
                  @formatters = [RuboCop::Options::DEFAULT_FORMATTER]
         | 
| 74 74 | 
             
                end
         | 
| 75 75 |  | 
| 76 76 | 
             
                def setup_subtasks(name)
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            # encoding: utf-8
         | 
| 2 2 |  | 
| 3 | 
            -
            module  | 
| 3 | 
            +
            module RuboCop
         | 
| 4 4 | 
             
              # SourceParser provides a way to parse Ruby source with Parser gem
         | 
| 5 5 | 
             
              # and also parses comment directives which disable arbitrary cops.
         | 
| 6 6 | 
             
              module SourceParser
         | 
| @@ -22,7 +22,7 @@ module Rubocop | |
| 22 22 |  | 
| 23 23 | 
             
                  begin
         | 
| 24 24 | 
             
                    ast, comments, tokens = parser.tokenize(source_buffer)
         | 
| 25 | 
            -
                  rescue Parser::SyntaxError # rubocop:disable HandleExceptions
         | 
| 25 | 
            +
                  rescue Parser::SyntaxError # rubocop:disable Lint/HandleExceptions
         | 
| 26 26 | 
             
                    # All errors are in diagnostics. No need to handle exception.
         | 
| 27 27 | 
             
                  end
         | 
| 28 28 |  | 
| @@ -1,16 +1,12 @@ | |
| 1 1 | 
             
            # encoding: utf-8
         | 
| 2 2 |  | 
| 3 | 
            -
            module  | 
| 3 | 
            +
            module RuboCop
         | 
| 4 4 | 
             
              # This class finds target files to inspect by scanning the directory tree
         | 
| 5 5 | 
             
              # and picking ruby files.
         | 
| 6 6 | 
             
              class TargetFinder
         | 
| 7 7 | 
             
                def initialize(config_store, options = {})
         | 
| 8 8 | 
             
                  @config_store = config_store
         | 
| 9 | 
            -
                  @options =  | 
| 10 | 
            -
                    force_exclusion: false,
         | 
| 11 | 
            -
                    debug: false,
         | 
| 12 | 
            -
                    fail_level: false
         | 
| 13 | 
            -
                  }.merge(options)
         | 
| 9 | 
            +
                  @options = options
         | 
| 14 10 | 
             
                end
         | 
| 15 11 |  | 
| 16 12 | 
             
                def force_exclusion?
         | 
    
        data/lib/rubocop/token.rb
    CHANGED
    
    
    
        data/lib/rubocop/version.rb
    CHANGED
    
    
    
        data/relnotes/v0.21.0.md
    CHANGED
    
    | @@ -34,7 +34,7 @@ Below is the list of all the gory details. Enjoy! | |
| 34 34 | 
             
            * [#976](https://github.com/bbatsov/rubocop/issues/976): Fix `EndAlignment` not handling element assignment correctly. ([@tamird][])
         | 
| 35 35 | 
             
            * [#976](https://github.com/bbatsov/rubocop/issues/976): Fix `IndentationWidth` not handling element assignment correctly. ([@tamird][])
         | 
| 36 36 | 
             
            * [#800](https://github.com/bbatsov/rubocop/issues/800): Do not report `[Corrected]` in `--auto-correct` mode if correction wasn't done. ([@jonas054][])
         | 
| 37 | 
            -
            * [#968](https://github.com/bbatsov/rubocop/issues/968): Fix bug when running  | 
| 37 | 
            +
            * [#968](https://github.com/bbatsov/rubocop/issues/968): Fix bug when running RuboCop with `-c .rubocop.yml`. ([@bquorning][])
         | 
| 38 38 | 
             
            * [#975](https://github.com/bbatsov/rubocop/pull/975): Fix infinite correction in `IndentationWidth`. ([@jonas054][])
         | 
| 39 39 | 
             
            * [#986](https://github.com/bbatsov/rubocop/issues/986): When `--lint` is used together with `--only`, all lint cops are run in addition to the given cops. ([@jonas054][])
         | 
| 40 40 | 
             
            * [#997](https://github.com/bbatsov/rubocop/issues/997): Fix handling of file paths for matching against `Exclude` property when `rubocop .` is called. ([@jonas054][])
         | 
    
        data/relnotes/v0.23.0.md
    ADDED
    
    | @@ -0,0 +1,79 @@ | |
| 1 | 
            +
            This release is mostly about fixing bugs, but it also features a few prominent changes:
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            * Cops are now namespace aware, which would it make it simpler to write RuboCop extensions without
         | 
| 4 | 
            +
            worrying about name collisions (e.g. you can now have `Style/Filename` and `RSpec/Filename` cops).
         | 
| 5 | 
            +
            * There's now logic which prevents auto-corrections from generated invalid Ruby code.
         | 
| 6 | 
            +
            * The `Rubocop` module was renamed to `RuboCop`, which will affect packages relying on RuboCop's public API.
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            Below is the list of all the gory details. Enjoy!
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
| 11 | 
            +
            ### New features
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            * [#1117](https://github.com/bbatsov/rubocop/issues/1117): `BlockComments` cop does auto-correction. ([@jonas054][])
         | 
| 14 | 
            +
            * [#1124](https://github.com/bbatsov/rubocop/pull/1124): `TrivialAccessors` cop auto-corrects class-level accessors. ([@ggilder][])
         | 
| 15 | 
            +
            * [#1062](https://github.com/bbatsov/rubocop/pull/1062): New cop `InlineComment` checks for inline comments. ([@salbertson][])
         | 
| 16 | 
            +
            * [#1118](https://github.com/bbatsov/rubocop/issues/1118): Add checking and auto-correction of right brackets in `IndentArray` and `IndentHash`. ([@jonas054][])
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            ### Changes
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            * [#1097](https://github.com/bbatsov/rubocop/issues/1097): Add optional namespace prefix to cop names: `Style/LineLength` instead of `LineLength` in config files, `--only` argument, `--show-cops` output, and `# rubocop:disable`. ([@jonas054][])
         | 
| 21 | 
            +
            * [#1075](https://github.com/bbatsov/rubocop/issues/1075): More strict limits on when to require trailing comma. ([@jonas054][])
         | 
| 22 | 
            +
            * Renamed `Rubocop` module to `RuboCop`. ([@bbatsov][])
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            ### Bugs fixed
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            * [#1126](https://github.com/bbatsov/rubocop/pull/1126): Fix `--auto-gen-config` bug with `RegexpLiteral` where only the last file's results would be used. ([@ggilder][])
         | 
| 27 | 
            +
            * [#1104](https://github.com/bbatsov/rubocop/issues/1104): Fix `EachWithObject` with modifier if as body. ([@geniou][])
         | 
| 28 | 
            +
            * [#1106](https://github.com/bbatsov/rubocop/issues/1106): Fix `EachWithObject` with single method call as body. ([@geniou][])
         | 
| 29 | 
            +
            * Avoid the warning about ignoring syck YAML engine from JRuby. ([@jonas054][])
         | 
| 30 | 
            +
            * [#1111](https://github.com/bbatsov/rubocop/issues/1111): Fix problem in `EndOfLine` with reading non-UTF-8 encoded files. ([@jonas054][])
         | 
| 31 | 
            +
            * [#1115](https://github.com/bbatsov/rubocop/issues/1115): Fix `Next` to ignore super nodes. ([@geniou][])
         | 
| 32 | 
            +
            * [#1117](https://github.com/bbatsov/rubocop/issues/1117): Don't auto-correct indentation in scopes that contain block comments (`=begin`..`=end`). ([@jonas054][])
         | 
| 33 | 
            +
            * [#1123](https://github.com/bbatsov/rubocop/pull/1123): Support setter calls in safe assignment in `ParenthesesAroundCondition`. ([@jonas054][])
         | 
| 34 | 
            +
            * [#1090](https://github.com/bbatsov/rubocop/issues/1090): Correct handling of documentation vs annotation comment. ([@jonas054][])
         | 
| 35 | 
            +
            * [#1118](https://github.com/bbatsov/rubocop/issues/1118): Never write invalid ruby to a file in auto-correct. ([@jonas054][])
         | 
| 36 | 
            +
            * [#1120](https://github.com/bbatsov/rubocop/issues/1120): Don't change indentation of heredoc strings in auto-correct. ([@jonas054][])
         | 
| 37 | 
            +
            * [#1109](https://github.com/bbatsov/rubocop/issues/1109): Handle conditions with modifier ops in them in `ParenthesesAroundCondition`. ([@bbatsov][])
         | 
| 38 | 
            +
             | 
| 39 | 
            +
            [@bbatsov]: https://github.com/bbatsov
         | 
| 40 | 
            +
            [@jonas054]: https://github.com/jonas054
         | 
| 41 | 
            +
            [@yujinakayama]: https://github.com/yujinakayama
         | 
| 42 | 
            +
            [@dblock]: https://github.com/dblock
         | 
| 43 | 
            +
            [@nevir]: https://github.com/nevir
         | 
| 44 | 
            +
            [@daviddavis]: https://github.com/daviddavis
         | 
| 45 | 
            +
            [@sds]: https://github.com/sds
         | 
| 46 | 
            +
            [@fancyremarker]: https://github.com/fancyremarker
         | 
| 47 | 
            +
            [@sinisterchipmunk]: https://github.com/sinisterchipmunk
         | 
| 48 | 
            +
            [@vonTronje]: https://github.com/vonTronje
         | 
| 49 | 
            +
            [@agrimm]: https://github.com/agrimm
         | 
| 50 | 
            +
            [@pmenglund]: https://github.com/pmenglund
         | 
| 51 | 
            +
            [@chulkilee]: https://github.com/chulkilee
         | 
| 52 | 
            +
            [@codez]: https://github.com/codez
         | 
| 53 | 
            +
            [@emou]: https://github.com/emou
         | 
| 54 | 
            +
            [@skanev]: http://github.com/skanev
         | 
| 55 | 
            +
            [@claco]: http://github.com/claco
         | 
| 56 | 
            +
            [@rifraf]: http://github.com/rifraf
         | 
| 57 | 
            +
            [@scottmatthewman]: https://github.com/scottmatthewman
         | 
| 58 | 
            +
            [@ma2gedev]: http://github.com/ma2gedev
         | 
| 59 | 
            +
            [@jeremyolliver]: https://github.com/jeremyolliver
         | 
| 60 | 
            +
            [@hannestyden]: https://github.com/hannestyden
         | 
| 61 | 
            +
            [@geniou]: https://github.com/geniou
         | 
| 62 | 
            +
            [@jkogara]: https://github.com/jkogara
         | 
| 63 | 
            +
            [@tmorris-fiksu]: https://github.com/tmorris-fiksu
         | 
| 64 | 
            +
            [@mockdeep]: https://github.com/mockdeep
         | 
| 65 | 
            +
            [@hiroponz]: https://github.com/hiroponz
         | 
| 66 | 
            +
            [@tamird]: https://github.com/tamird
         | 
| 67 | 
            +
            [@fshowalter]: https://github.com/fshowalter
         | 
| 68 | 
            +
            [@cschramm]: https://github.com/cschramm
         | 
| 69 | 
            +
            [@bquorning]: https://github.com/bquorning
         | 
| 70 | 
            +
            [@bcobb]: https://github.com/bcobb
         | 
| 71 | 
            +
            [@irrationalfab]: https://github.com/irrationalfab
         | 
| 72 | 
            +
            [@tommeier]: https://github.com/tommeier
         | 
| 73 | 
            +
            [@sfeldon]: https://github.com/sfeldon
         | 
| 74 | 
            +
            [@biinari]: https://github.com/biinari
         | 
| 75 | 
            +
            [@barunio]: https://github.com/barunio
         | 
| 76 | 
            +
            [@molawson]: https://github.com/molawson
         | 
| 77 | 
            +
            [@wndhydrnt]: https://github.com/wndhydrnt
         | 
| 78 | 
            +
            [@ggilder]: https://github.com/ggilder
         | 
| 79 | 
            +
            [@salbertson]: https://github.com/salbertson
         | 
    
        data/rubocop.gemspec
    CHANGED
    
    
    
        data/spec/.rubocop.yml
    CHANGED
    
    
    
        data/spec/project_spec.rb
    CHANGED
    
    | @@ -4,10 +4,10 @@ require 'spec_helper' | |
| 4 4 |  | 
| 5 5 | 
             
            describe 'RuboCop Project' do
         | 
| 6 6 | 
             
              describe 'default configuration file' do
         | 
| 7 | 
            -
                let(:cop_names) {  | 
| 7 | 
            +
                let(:cop_names) { RuboCop::Cop::Cop.all.map(&:cop_name) }
         | 
| 8 8 |  | 
| 9 9 | 
             
                subject(:default_config) do
         | 
| 10 | 
            -
                   | 
| 10 | 
            +
                  RuboCop::ConfigLoader.load_file('config/default.yml')
         | 
| 11 11 | 
             
                end
         | 
| 12 12 |  | 
| 13 13 | 
             
                it 'has configuration for all cops' do
         | 
| @@ -76,7 +76,7 @@ describe 'RuboCop Project' do | |
| 76 76 | 
             
                    it 'has a valid URL' do
         | 
| 77 77 | 
             
                      issues.each do |issue|
         | 
| 78 78 | 
             
                        number = issue[:number].gsub(/\D/, '')
         | 
| 79 | 
            -
                        pattern = %r{^https://github\.com/bbatsov/rubocop/(?:issues|pull)/#{number}$} # rubocop:disable LineLength
         | 
| 79 | 
            +
                        pattern = %r{^https://github\.com/bbatsov/rubocop/(?:issues|pull)/#{number}$} # rubocop:disable Style/LineLength
         | 
| 80 80 | 
             
                        expect(issue[:url]).to match(pattern)
         | 
| 81 81 | 
             
                      end
         | 
| 82 82 | 
             
                    end
         |