rubocop 0.29.1 → 0.30.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/CHANGELOG.md +73 -1
- data/README.md +11 -2
- data/config/default.yml +194 -6
- data/config/disabled.yml +25 -1
- data/config/enabled.yml +74 -12
- data/lib/rubocop.rb +19 -2
- data/lib/rubocop/config.rb +23 -3
- data/lib/rubocop/config_loader.rb +9 -1
- data/lib/rubocop/cop/autocorrect_logic.rb +26 -0
- data/lib/rubocop/cop/cop.rb +33 -17
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +16 -4
- data/lib/rubocop/cop/lint/block_alignment.rb +5 -14
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +1 -1
- data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +61 -0
- data/lib/rubocop/cop/lint/void.rb +11 -3
- data/lib/rubocop/cop/mixin/on_normal_if_unless.rb +17 -0
- data/lib/rubocop/cop/performance/detect.rb +72 -0
- data/lib/rubocop/cop/performance/flat_map.rb +64 -0
- data/lib/rubocop/cop/performance/reverse_each.rb +43 -0
- data/lib/rubocop/cop/performance/sample.rb +58 -0
- data/lib/rubocop/cop/performance/size.rb +64 -0
- data/lib/rubocop/cop/rails/date.rb +121 -0
- data/lib/rubocop/cop/rails/find_by.rb +52 -0
- data/lib/rubocop/cop/rails/find_each.rb +41 -0
- data/lib/rubocop/cop/rails/time_zone.rb +93 -0
- data/lib/rubocop/cop/style/auto_resource_cleanup.rb +45 -0
- data/lib/rubocop/cop/style/block_delimiters.rb +186 -0
- data/lib/rubocop/cop/style/closing_parenthesis_indentation.rb +76 -0
- data/lib/rubocop/cop/style/command_literal.rb +120 -0
- data/lib/rubocop/cop/style/copyright.rb +87 -0
- data/lib/rubocop/cop/style/documentation.rb +32 -0
- data/lib/rubocop/cop/style/empty_else.rb +85 -16
- data/lib/rubocop/cop/style/encoding.rb +14 -2
- data/lib/rubocop/cop/style/end_of_line.rb +5 -0
- data/lib/rubocop/cop/style/hash_syntax.rb +86 -23
- data/lib/rubocop/cop/style/if_unless_modifier.rb +15 -0
- data/lib/rubocop/cop/style/indentation_consistency.rb +13 -6
- data/lib/rubocop/cop/style/indentation_width.rb +34 -10
- data/lib/rubocop/cop/style/lambda.rb +32 -17
- data/lib/rubocop/cop/style/line_end_concatenation.rb +4 -0
- data/lib/rubocop/cop/style/missing_else.rb +72 -0
- data/lib/rubocop/cop/style/regexp_literal.rb +89 -58
- data/lib/rubocop/cop/style/space_around_operators.rb +13 -2
- data/lib/rubocop/cop/style/space_before_block_braces.rb +3 -3
- data/lib/rubocop/cop/style/space_inside_block_braces.rb +9 -5
- data/lib/rubocop/cop/style/symbol_literal.rb +36 -0
- data/lib/rubocop/cop/style/trailing_blank_lines.rb +7 -0
- data/lib/rubocop/cop/style/trailing_comma.rb +21 -7
- data/lib/rubocop/cop/style/trivial_accessors.rb +17 -3
- data/lib/rubocop/cop/style/unneeded_capital_w.rb +4 -6
- data/lib/rubocop/cop/style/while_until_modifier.rb +10 -0
- data/lib/rubocop/cop/util.rb +24 -19
- data/lib/rubocop/cop/variable_force.rb +14 -0
- data/lib/rubocop/cop/variable_force/reference.rb +10 -4
- data/lib/rubocop/formatter/html_formatter.rb +10 -4
- data/lib/rubocop/formatter/text_util.rb +5 -7
- data/lib/rubocop/options.rb +47 -45
- data/lib/rubocop/path_util.rb +12 -8
- data/lib/rubocop/processed_source.rb +12 -1
- data/lib/rubocop/rake_task.rb +2 -2
- data/lib/rubocop/version.rb +1 -1
- data/relnotes/v0.30.0.md +145 -0
- data/rubocop.gemspec +15 -3
- metadata +22 -545
- data/.gitignore +0 -54
- data/.rspec +0 -1
- data/.rubocop.yml +0 -11
- data/.rubocop_todo.yml +0 -28
- data/.travis.yml +0 -22
- data/Gemfile +0 -15
- data/Rakefile +0 -41
- data/lib/rubocop/cop/style/blocks.rb +0 -80
- data/lib/rubocop/cop/style/unneeded_percent_x.rb +0 -25
- data/logo/rubocop-final-logo.eps +0 -0
- data/spec/.rubocop.yml +0 -5
- data/spec/fixtures/html_formatter/expected.html +0 -495
- data/spec/fixtures/html_formatter/project/app/controllers/application_controller.rb +0 -5
- data/spec/fixtures/html_formatter/project/app/controllers/books_controller.rb +0 -74
- data/spec/fixtures/html_formatter/project/app/models/book.rb +0 -5
- data/spec/isolated_environment_spec.rb +0 -24
- data/spec/project_spec.rb +0 -119
- data/spec/rubocop/cli_spec.rb +0 -2740
- data/spec/rubocop/comment_config_spec.rb +0 -105
- data/spec/rubocop/config_loader_spec.rb +0 -377
- data/spec/rubocop/config_spec.rb +0 -235
- data/spec/rubocop/config_store_spec.rb +0 -53
- data/spec/rubocop/cop/commissioner_spec.rb +0 -85
- data/spec/rubocop/cop/cop_spec.rb +0 -135
- data/spec/rubocop/cop/corrector_spec.rb +0 -59
- data/spec/rubocop/cop/force_spec.rb +0 -29
- data/spec/rubocop/cop/lint/ambiguous_operator_spec.rb +0 -113
- data/spec/rubocop/cop/lint/ambiguous_regexp_literal_spec.rb +0 -35
- data/spec/rubocop/cop/lint/assignment_in_condition_spec.rb +0 -130
- data/spec/rubocop/cop/lint/block_alignment_spec.rb +0 -533
- data/spec/rubocop/cop/lint/condition_position_spec.rb +0 -51
- data/spec/rubocop/cop/lint/debugger_spec.rb +0 -73
- data/spec/rubocop/cop/lint/def_end_alignment_spec.rb +0 -108
- data/spec/rubocop/cop/lint/deprecated_class_methods_spec.rb +0 -38
- data/spec/rubocop/cop/lint/duplicate_methods_spec.rb +0 -189
- data/spec/rubocop/cop/lint/else_layout_spec.rb +0 -65
- data/spec/rubocop/cop/lint/empty_ensure_spec.rb +0 -27
- data/spec/rubocop/cop/lint/empty_interpolation_spec.rb +0 -18
- data/spec/rubocop/cop/lint/end_alignment_spec.rb +0 -91
- data/spec/rubocop/cop/lint/end_in_method_spec.rb +0 -29
- data/spec/rubocop/cop/lint/ensure_return_spec.rb +0 -39
- data/spec/rubocop/cop/lint/eval_spec.rb +0 -33
- data/spec/rubocop/cop/lint/handle_exceptions_spec.rb +0 -30
- data/spec/rubocop/cop/lint/invalid_character_literal_spec.rb +0 -33
- data/spec/rubocop/cop/lint/literal_in_condition_spec.rb +0 -172
- data/spec/rubocop/cop/lint/literal_in_interpolation_spec.rb +0 -31
- data/spec/rubocop/cop/lint/loop_spec.rb +0 -27
- data/spec/rubocop/cop/lint/parentheses_as_grouped_expression_spec.rb +0 -57
- data/spec/rubocop/cop/lint/require_parentheses_spec.rb +0 -82
- data/spec/rubocop/cop/lint/rescue_exception_spec.rb +0 -123
- data/spec/rubocop/cop/lint/shadowing_outer_local_variable_spec.rb +0 -237
- data/spec/rubocop/cop/lint/space_before_first_arg_spec.rb +0 -66
- data/spec/rubocop/cop/lint/string_conversion_in_interpolation_spec.rb +0 -51
- data/spec/rubocop/cop/lint/syntax_spec.rb +0 -34
- data/spec/rubocop/cop/lint/underscore_prefixed_variable_name_spec.rb +0 -179
- data/spec/rubocop/cop/lint/unreachable_code_spec.rb +0 -63
- data/spec/rubocop/cop/lint/unused_block_argument_spec.rb +0 -231
- data/spec/rubocop/cop/lint/unused_method_argument_spec.rb +0 -278
- data/spec/rubocop/cop/lint/useless_access_modifier_spec.rb +0 -192
- data/spec/rubocop/cop/lint/useless_assignment_spec.rb +0 -1778
- data/spec/rubocop/cop/lint/useless_comparison_spec.rb +0 -30
- data/spec/rubocop/cop/lint/useless_else_without_rescue_spec.rb +0 -48
- data/spec/rubocop/cop/lint/useless_setter_call_spec.rb +0 -211
- data/spec/rubocop/cop/lint/void_spec.rb +0 -64
- data/spec/rubocop/cop/metrics/abc_size_spec.rb +0 -109
- data/spec/rubocop/cop/metrics/block_nesting_spec.rb +0 -156
- data/spec/rubocop/cop/metrics/class_length_spec.rb +0 -131
- data/spec/rubocop/cop/metrics/cyclomatic_complexity_spec.rb +0 -204
- data/spec/rubocop/cop/metrics/line_length_spec.rb +0 -136
- data/spec/rubocop/cop/metrics/method_length_spec.rb +0 -147
- data/spec/rubocop/cop/metrics/parameter_lists_spec.rb +0 -44
- data/spec/rubocop/cop/metrics/perceived_complexity_spec.rb +0 -222
- data/spec/rubocop/cop/offense_spec.rb +0 -133
- data/spec/rubocop/cop/rails/action_filter_spec.rb +0 -64
- data/spec/rubocop/cop/rails/default_scope_spec.rb +0 -37
- data/spec/rubocop/cop/rails/delegate_spec.rb +0 -177
- data/spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb +0 -13
- data/spec/rubocop/cop/rails/output_spec.rb +0 -37
- data/spec/rubocop/cop/rails/read_write_attribute_spec.rb +0 -130
- data/spec/rubocop/cop/rails/scope_args_spec.rb +0 -25
- data/spec/rubocop/cop/rails/validation_spec.rb +0 -28
- data/spec/rubocop/cop/severity_spec.rb +0 -113
- data/spec/rubocop/cop/style/access_modifier_indentation_spec.rb +0 -421
- data/spec/rubocop/cop/style/accessor_method_name_spec.rb +0 -81
- data/spec/rubocop/cop/style/alias_spec.rb +0 -59
- data/spec/rubocop/cop/style/align_array_spec.rb +0 -123
- data/spec/rubocop/cop/style/align_hash_spec.rb +0 -411
- data/spec/rubocop/cop/style/align_parameters_spec.rb +0 -431
- data/spec/rubocop/cop/style/and_or_spec.rb +0 -235
- data/spec/rubocop/cop/style/array_join_spec.rb +0 -29
- data/spec/rubocop/cop/style/ascii_comments_spec.rb +0 -21
- data/spec/rubocop/cop/style/ascii_identifiers_spec.rb +0 -36
- data/spec/rubocop/cop/style/attr_spec.rb +0 -29
- data/spec/rubocop/cop/style/bare_percent_literals_spec.rb +0 -132
- data/spec/rubocop/cop/style/begin_block_spec.rb +0 -13
- data/spec/rubocop/cop/style/block_comments_spec.rb +0 -45
- data/spec/rubocop/cop/style/block_end_newline_spec.rb +0 -61
- data/spec/rubocop/cop/style/blocks_spec.rb +0 -121
- data/spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb +0 -288
- data/spec/rubocop/cop/style/case_equality_spec.rb +0 -13
- data/spec/rubocop/cop/style/case_indentation_spec.rb +0 -293
- data/spec/rubocop/cop/style/character_literal_spec.rb +0 -37
- data/spec/rubocop/cop/style/class_and_module_camel_case_spec.rb +0 -40
- data/spec/rubocop/cop/style/class_and_module_children_spec.rb +0 -133
- data/spec/rubocop/cop/style/class_check_spec.rb +0 -41
- data/spec/rubocop/cop/style/class_methods_spec.rb +0 -80
- data/spec/rubocop/cop/style/class_vars_spec.rb +0 -19
- data/spec/rubocop/cop/style/collection_methods_spec.rb +0 -48
- data/spec/rubocop/cop/style/colon_method_call_spec.rb +0 -65
- data/spec/rubocop/cop/style/comment_annotation_spec.rb +0 -86
- data/spec/rubocop/cop/style/comment_indentation_spec.rb +0 -179
- data/spec/rubocop/cop/style/constant_name_spec.rb +0 -65
- data/spec/rubocop/cop/style/def_with_parentheses_spec.rb +0 -43
- data/spec/rubocop/cop/style/deprecated_hash_methods_spec.rb +0 -45
- data/spec/rubocop/cop/style/documentation_spec.rb +0 -146
- data/spec/rubocop/cop/style/dot_position_spec.rb +0 -132
- data/spec/rubocop/cop/style/double_negation_spec.rb +0 -22
- data/spec/rubocop/cop/style/each_with_object_spec.rb +0 -73
- data/spec/rubocop/cop/style/else_alignment_spec.rb +0 -506
- data/spec/rubocop/cop/style/empty_else_spec.rb +0 -100
- data/spec/rubocop/cop/style/empty_line_between_defs_spec.rb +0 -135
- data/spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb +0 -178
- data/spec/rubocop/cop/style/empty_lines_around_block_body_spec.rb +0 -103
- data/spec/rubocop/cop/style/empty_lines_around_class_body_spec.rb +0 -135
- data/spec/rubocop/cop/style/empty_lines_around_method_body_spec.rb +0 -90
- data/spec/rubocop/cop/style/empty_lines_around_module_body_spec.rb +0 -79
- data/spec/rubocop/cop/style/empty_lines_spec.rb +0 -51
- data/spec/rubocop/cop/style/empty_literal_spec.rb +0 -117
- data/spec/rubocop/cop/style/encoding_spec.rb +0 -139
- data/spec/rubocop/cop/style/end_block_spec.rb +0 -13
- data/spec/rubocop/cop/style/end_of_line_spec.rb +0 -65
- data/spec/rubocop/cop/style/even_odd_spec.rb +0 -164
- data/spec/rubocop/cop/style/extra_spacing_spec.rb +0 -68
- data/spec/rubocop/cop/style/file_name_spec.rb +0 -84
- data/spec/rubocop/cop/style/first_parameter_indentation_spec.rb +0 -304
- data/spec/rubocop/cop/style/flip_flop_spec.rb +0 -23
- data/spec/rubocop/cop/style/for_spec.rb +0 -105
- data/spec/rubocop/cop/style/format_string_spec.rb +0 -184
- data/spec/rubocop/cop/style/global_vars_spec.rb +0 -34
- data/spec/rubocop/cop/style/guard_clause_spec.rb +0 -172
- data/spec/rubocop/cop/style/hash_syntax_spec.rb +0 -137
- data/spec/rubocop/cop/style/if_unless_modifier_spec.rb +0 -146
- data/spec/rubocop/cop/style/if_with_semicolon_spec.rb +0 -24
- data/spec/rubocop/cop/style/indent_array_spec.rb +0 -173
- data/spec/rubocop/cop/style/indent_hash_spec.rb +0 -367
- data/spec/rubocop/cop/style/indentation_consistency_spec.rb +0 -509
- data/spec/rubocop/cop/style/indentation_width_spec.rb +0 -885
- data/spec/rubocop/cop/style/infinite_loop_spec.rb +0 -48
- data/spec/rubocop/cop/style/inline_comment_spec.rb +0 -13
- data/spec/rubocop/cop/style/lambda_call_spec.rb +0 -65
- data/spec/rubocop/cop/style/lambda_spec.rb +0 -76
- data/spec/rubocop/cop/style/leading_comment_space_spec.rb +0 -64
- data/spec/rubocop/cop/style/line_end_concatenation_spec.rb +0 -184
- data/spec/rubocop/cop/style/method_call_parentheses_spec.rb +0 -59
- data/spec/rubocop/cop/style/method_called_on_do_end_block_spec.rb +0 -60
- data/spec/rubocop/cop/style/method_def_parentheses_spec.rb +0 -108
- data/spec/rubocop/cop/style/method_name_spec.rb +0 -125
- data/spec/rubocop/cop/style/module_function_spec.rb +0 -24
- data/spec/rubocop/cop/style/multiline_block_chain_spec.rb +0 -78
- data/spec/rubocop/cop/style/multiline_block_layout_spec.rb +0 -199
- data/spec/rubocop/cop/style/multiline_if_then_spec.rb +0 -134
- data/spec/rubocop/cop/style/multiline_operation_indentation_spec.rb +0 -464
- data/spec/rubocop/cop/style/multiline_ternary_operator_spec.rb +0 -18
- data/spec/rubocop/cop/style/negated_if_spec.rb +0 -102
- data/spec/rubocop/cop/style/negated_while_spec.rb +0 -64
- data/spec/rubocop/cop/style/nested_ternary_operator_spec.rb +0 -21
- data/spec/rubocop/cop/style/next_spec.rb +0 -301
- data/spec/rubocop/cop/style/nil_comparison_spec.rb +0 -29
- data/spec/rubocop/cop/style/non_nil_check_spec.rb +0 -132
- data/spec/rubocop/cop/style/not_spec.rb +0 -28
- data/spec/rubocop/cop/style/numeric_literals_spec.rb +0 -80
- data/spec/rubocop/cop/style/one_line_conditional_spec.rb +0 -13
- data/spec/rubocop/cop/style/op_method_spec.rb +0 -85
- data/spec/rubocop/cop/style/parentheses_around_condition_spec.rb +0 -161
- data/spec/rubocop/cop/style/percent_literal_delimiters_spec.rb +0 -316
- data/spec/rubocop/cop/style/percent_q_literals_spec.rb +0 -122
- data/spec/rubocop/cop/style/perl_backrefs_spec.rb +0 -22
- data/spec/rubocop/cop/style/predicate_name_spec.rb +0 -57
- data/spec/rubocop/cop/style/proc_spec.rb +0 -27
- data/spec/rubocop/cop/style/raise_args_spec.rb +0 -87
- data/spec/rubocop/cop/style/redundant_begin_spec.rb +0 -121
- data/spec/rubocop/cop/style/redundant_exception_spec.rb +0 -59
- data/spec/rubocop/cop/style/redundant_return_spec.rb +0 -171
- data/spec/rubocop/cop/style/redundant_self_spec.rb +0 -186
- data/spec/rubocop/cop/style/regexp_literal_spec.rb +0 -188
- data/spec/rubocop/cop/style/rescue_modifier_spec.rb +0 -116
- data/spec/rubocop/cop/style/self_assignment_spec.rb +0 -49
- data/spec/rubocop/cop/style/semicolon_spec.rb +0 -114
- data/spec/rubocop/cop/style/signal_exception_spec.rb +0 -289
- data/spec/rubocop/cop/style/single_line_block_params_spec.rb +0 -82
- data/spec/rubocop/cop/style/single_line_methods_spec.rb +0 -94
- data/spec/rubocop/cop/style/single_space_before_first_arg_spec.rb +0 -63
- data/spec/rubocop/cop/style/space_after_colon_spec.rb +0 -55
- data/spec/rubocop/cop/style/space_after_comma_spec.rb +0 -30
- data/spec/rubocop/cop/style/space_after_control_keyword_spec.rb +0 -84
- data/spec/rubocop/cop/style/space_after_method_name_spec.rb +0 -70
- data/spec/rubocop/cop/style/space_after_not_spec.rb +0 -22
- data/spec/rubocop/cop/style/space_after_semicolon_spec.rb +0 -23
- data/spec/rubocop/cop/style/space_around_block_parameters_spec.rb +0 -155
- data/spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb +0 -95
- data/spec/rubocop/cop/style/space_around_operators_spec.rb +0 -330
- data/spec/rubocop/cop/style/space_before_block_braces_spec.rb +0 -73
- data/spec/rubocop/cop/style/space_before_comma_spec.rb +0 -42
- data/spec/rubocop/cop/style/space_before_comment_spec.rb +0 -34
- data/spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb +0 -70
- data/spec/rubocop/cop/style/space_before_semicolon_spec.rb +0 -28
- data/spec/rubocop/cop/style/space_inside_block_braces_spec.rb +0 -317
- data/spec/rubocop/cop/style/space_inside_brackets_spec.rb +0 -83
- data/spec/rubocop/cop/style/space_inside_hash_literal_braces_spec.rb +0 -147
- data/spec/rubocop/cop/style/space_inside_parens_spec.rb +0 -44
- data/spec/rubocop/cop/style/space_inside_range_literal_spec.rb +0 -64
- data/spec/rubocop/cop/style/special_global_vars_spec.rb +0 -62
- data/spec/rubocop/cop/style/string_literals_in_interpolation_spec.rb +0 -99
- data/spec/rubocop/cop/style/string_literals_spec.rb +0 -228
- data/spec/rubocop/cop/style/struct_inheritance_spec.rb +0 -44
- data/spec/rubocop/cop/style/symbol_array_spec.rb +0 -37
- data/spec/rubocop/cop/style/symbol_proc_spec.rb +0 -100
- data/spec/rubocop/cop/style/tab_spec.rb +0 -47
- data/spec/rubocop/cop/style/trailing_blank_lines_spec.rb +0 -83
- data/spec/rubocop/cop/style/trailing_comma_spec.rb +0 -390
- data/spec/rubocop/cop/style/trailing_whitespace_spec.rb +0 -31
- data/spec/rubocop/cop/style/trivial_accessors_spec.rb +0 -558
- data/spec/rubocop/cop/style/unless_else_spec.rb +0 -23
- data/spec/rubocop/cop/style/unneeded_capital_w_spec.rb +0 -90
- data/spec/rubocop/cop/style/unneeded_percent_q_spec.rb +0 -127
- data/spec/rubocop/cop/style/unneeded_percent_x_spec.rb +0 -34
- data/spec/rubocop/cop/style/variable_interpolation_spec.rb +0 -76
- data/spec/rubocop/cop/style/variable_name_spec.rb +0 -107
- data/spec/rubocop/cop/style/when_then_spec.rb +0 -42
- data/spec/rubocop/cop/style/while_until_do_spec.rb +0 -55
- data/spec/rubocop/cop/style/while_until_modifier_spec.rb +0 -93
- data/spec/rubocop/cop/style/word_array_spec.rb +0 -117
- data/spec/rubocop/cop/team_spec.rb +0 -190
- data/spec/rubocop/cop/util_spec.rb +0 -102
- data/spec/rubocop/cop/variable_force/assignment_spec.rb +0 -200
- data/spec/rubocop/cop/variable_force/locatable_spec.rb +0 -699
- data/spec/rubocop/cop/variable_force/reference_spec.rb +0 -19
- data/spec/rubocop/cop/variable_force/scope_spec.rb +0 -319
- data/spec/rubocop/cop/variable_force/variable_spec.rb +0 -59
- data/spec/rubocop/cop/variable_force/variable_table_spec.rb +0 -276
- data/spec/rubocop/cop/variable_force_spec.rb +0 -26
- data/spec/rubocop/formatter/base_formatter_spec.rb +0 -191
- data/spec/rubocop/formatter/clang_style_formatter_spec.rb +0 -114
- data/spec/rubocop/formatter/colorizable_spec.rb +0 -107
- data/spec/rubocop/formatter/disabled_config_formatter_spec.rb +0 -50
- data/spec/rubocop/formatter/disabled_lines_formatter_spec.rb +0 -67
- data/spec/rubocop/formatter/emacs_style_formatter_spec.rb +0 -63
- data/spec/rubocop/formatter/file_list_formatter_spec.rb +0 -33
- data/spec/rubocop/formatter/formatter_set_spec.rb +0 -141
- data/spec/rubocop/formatter/fuubar_style_formatter_spec.rb +0 -129
- data/spec/rubocop/formatter/html_formatter_spec.rb +0 -48
- data/spec/rubocop/formatter/json_formatter_spec.rb +0 -152
- data/spec/rubocop/formatter/offense_count_formatter_spec.rb +0 -75
- data/spec/rubocop/formatter/progress_formatter_spec.rb +0 -182
- data/spec/rubocop/formatter/simple_text_formatter_spec.rb +0 -135
- data/spec/rubocop/formatter/text_util_spec.rb +0 -55
- data/spec/rubocop/options_spec.rb +0 -181
- data/spec/rubocop/path_util_spec.rb +0 -77
- data/spec/rubocop/processed_source_spec.rb +0 -184
- data/spec/rubocop/rake_task_spec.rb +0 -122
- data/spec/rubocop/runner_spec.rb +0 -99
- data/spec/rubocop/string_util_spec.rb +0 -46
- data/spec/rubocop/target_finder_spec.rb +0 -245
- data/spec/rubocop/token_spec.rb +0 -29
- data/spec/spec_helper.rb +0 -39
- data/spec/support/cop_helper.rb +0 -75
- data/spec/support/cops/class_must_be_a_module_cop.rb +0 -19
- data/spec/support/cops/module_must_be_a_class_cop.rb +0 -19
- data/spec/support/coverage.rb +0 -15
- data/spec/support/custom_matchers.rb +0 -58
- data/spec/support/file_helper.rb +0 -23
- data/spec/support/jruby_workaround.rb +0 -15
- data/spec/support/mri_syntax_checker.rb +0 -73
- data/spec/support/shared_contexts.rb +0 -53
- data/spec/support/shared_examples.rb +0 -55
- data/spec/support/statement_modifier_helper.rb +0 -41
data/.gitignore
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# rcov generated
|
2
|
-
coverage
|
3
|
-
coverage.data
|
4
|
-
|
5
|
-
# rdoc generated
|
6
|
-
rdoc
|
7
|
-
|
8
|
-
# yard generated
|
9
|
-
doc
|
10
|
-
.yardoc
|
11
|
-
|
12
|
-
# bundler
|
13
|
-
.bundle
|
14
|
-
Gemfile.lock
|
15
|
-
Gemfile.local
|
16
|
-
|
17
|
-
# jeweler generated
|
18
|
-
pkg
|
19
|
-
|
20
|
-
# etags
|
21
|
-
TAGS
|
22
|
-
|
23
|
-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
24
|
-
#
|
25
|
-
# * Create a file at ~/.gitignore
|
26
|
-
# * Include files you want ignored
|
27
|
-
# * Run: git config --global core.excludesfile ~/.gitignore
|
28
|
-
#
|
29
|
-
# After doing this, these files will be ignored in all your git projects,
|
30
|
-
# saving you from having to 'pollute' every project you touch with them
|
31
|
-
#
|
32
|
-
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
33
|
-
#
|
34
|
-
# For MacOS:
|
35
|
-
#
|
36
|
-
#.DS_Store
|
37
|
-
|
38
|
-
# For TextMate
|
39
|
-
#*.tmproj
|
40
|
-
#tmtags
|
41
|
-
|
42
|
-
# For emacs:
|
43
|
-
#*~
|
44
|
-
#\#*
|
45
|
-
#.\#*
|
46
|
-
|
47
|
-
# For vim:
|
48
|
-
#*.swp
|
49
|
-
|
50
|
-
# For redcar:
|
51
|
-
#.redcar
|
52
|
-
|
53
|
-
# For rubinius:
|
54
|
-
#*.rbc
|
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
data/.rubocop.yml
DELETED
data/.rubocop_todo.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2014-12-19 23:52:21 +0100 using RuboCop version 0.28.0.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
# Offense count: 122
|
9
|
-
Metrics/AbcSize:
|
10
|
-
Max: 38
|
11
|
-
|
12
|
-
# Offense count: 9
|
13
|
-
# Configuration parameters: CountComments.
|
14
|
-
Metrics/ClassLength:
|
15
|
-
Max: 138
|
16
|
-
|
17
|
-
# Offense count: 28
|
18
|
-
Metrics/CyclomaticComplexity:
|
19
|
-
Max: 10
|
20
|
-
|
21
|
-
# Offense count: 130
|
22
|
-
# Configuration parameters: CountComments.
|
23
|
-
Metrics/MethodLength:
|
24
|
-
Max: 16
|
25
|
-
|
26
|
-
# Offense count: 18
|
27
|
-
Metrics/PerceivedComplexity:
|
28
|
-
Max: 11
|
data/.travis.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
cache: bundler
|
3
|
-
language: ruby
|
4
|
-
rvm:
|
5
|
-
- 1.9.3
|
6
|
-
- 2.0.0
|
7
|
-
- 2.1
|
8
|
-
- 2.2
|
9
|
-
- ruby-head
|
10
|
-
- jruby-19mode
|
11
|
-
- rbx-2
|
12
|
-
matrix:
|
13
|
-
allow_failures:
|
14
|
-
- rvm: ruby-head
|
15
|
-
- rvm: jruby-19mode
|
16
|
-
- rvm: rbx-2
|
17
|
-
before_install: gem update --remote bundler
|
18
|
-
install:
|
19
|
-
- bundle install --retry=3
|
20
|
-
script:
|
21
|
-
- bundle exec rspec
|
22
|
-
- bundle exec rubocop
|
data/Gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
gemspec
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem 'coveralls', require: false
|
9
|
-
end
|
10
|
-
|
11
|
-
local_gemfile = 'Gemfile.local'
|
12
|
-
|
13
|
-
if File.exist?(local_gemfile)
|
14
|
-
eval(File.read(local_gemfile)) # rubocop:disable Lint/Eval
|
15
|
-
end
|
data/Rakefile
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
|
-
require 'bundler/gem_tasks'
|
6
|
-
begin
|
7
|
-
Bundler.setup(:default, :development)
|
8
|
-
rescue Bundler::BundlerError => e
|
9
|
-
$stderr.puts e.message
|
10
|
-
$stderr.puts 'Run `bundle install` to install missing gems'
|
11
|
-
exit e.status_code
|
12
|
-
end
|
13
|
-
require 'rake'
|
14
|
-
require 'rspec/core'
|
15
|
-
require 'rspec/core/rake_task'
|
16
|
-
require 'rubocop/rake_task'
|
17
|
-
RSpec::Core::RakeTask.new(:spec)
|
18
|
-
|
19
|
-
desc 'Run RSpec with code coverage'
|
20
|
-
task :coverage do
|
21
|
-
ENV['COVERAGE'] = 'true'
|
22
|
-
Rake::Task['spec'].execute
|
23
|
-
end
|
24
|
-
|
25
|
-
desc 'Run RuboCop over itself'
|
26
|
-
RuboCop::RakeTask.new(:internal_investigation)
|
27
|
-
|
28
|
-
task default: [:spec, :internal_investigation]
|
29
|
-
|
30
|
-
require 'yard'
|
31
|
-
YARD::Rake::YardocTask.new
|
32
|
-
|
33
|
-
RuboCop::RakeTask.new
|
34
|
-
|
35
|
-
task :console do
|
36
|
-
require 'irb'
|
37
|
-
require 'irb/completion'
|
38
|
-
require 'rubocop'
|
39
|
-
ARGV.clear
|
40
|
-
IRB.start
|
41
|
-
end
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module Cop
|
5
|
-
module Style
|
6
|
-
# Check for uses of braces or do/end around single line or
|
7
|
-
# multi-line blocks.
|
8
|
-
class Blocks < Cop
|
9
|
-
include AutocorrectUnlessChangingAST
|
10
|
-
|
11
|
-
MULTI_LINE_MSG = 'Avoid using {...} for multi-line blocks.'
|
12
|
-
SINGLE_LINE_MSG = 'Prefer {...} over do...end for single-line blocks.'
|
13
|
-
|
14
|
-
def on_send(node)
|
15
|
-
_receiver, method_name, *args = *node
|
16
|
-
return unless args.any?
|
17
|
-
|
18
|
-
block = get_block(args.last)
|
19
|
-
return unless block && !parentheses?(node) && !operator?(method_name)
|
20
|
-
|
21
|
-
# If there are no parentheses around the arguments, then braces and
|
22
|
-
# do-end have different meaning due to how they bind, so we allow
|
23
|
-
# either.
|
24
|
-
ignore_node(block)
|
25
|
-
end
|
26
|
-
|
27
|
-
def on_block(node)
|
28
|
-
return if ignored_node?(node)
|
29
|
-
|
30
|
-
block_length = Util.block_length(node)
|
31
|
-
block_begin = node.loc.begin.source
|
32
|
-
|
33
|
-
if block_length > 0 && block_begin == '{'
|
34
|
-
add_offense(node, :begin, MULTI_LINE_MSG)
|
35
|
-
elsif block_length == 0 && block_begin != '{'
|
36
|
-
add_offense(node, :begin, SINGLE_LINE_MSG)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
private
|
41
|
-
|
42
|
-
def correction(node)
|
43
|
-
lambda do |corrector|
|
44
|
-
b, e = node.loc.begin, node.loc.end
|
45
|
-
if b.is?('{')
|
46
|
-
# If the left brace is immediately preceded by a word character,
|
47
|
-
# then we need a space before `do` to get valid Ruby code.
|
48
|
-
if b.source_buffer.source[b.begin_pos - 1, 1] =~ /\w/
|
49
|
-
corrector.insert_before(b, ' ')
|
50
|
-
end
|
51
|
-
corrector.replace(b, 'do')
|
52
|
-
corrector.replace(e, 'end')
|
53
|
-
else
|
54
|
-
corrector.replace(b, '{')
|
55
|
-
corrector.replace(e, '}')
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def get_block(node)
|
61
|
-
case node.type
|
62
|
-
when :block
|
63
|
-
node
|
64
|
-
when :send
|
65
|
-
receiver, _method_name, *_args = *node
|
66
|
-
get_block(receiver) if receiver
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def parentheses?(send_node)
|
71
|
-
send_node.loc.begin
|
72
|
-
end
|
73
|
-
|
74
|
-
def operator?(method_name)
|
75
|
-
method_name =~ /^\W/
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module Cop
|
5
|
-
module Style
|
6
|
-
# This cop checks for usage of the %x() syntax when `` would do.
|
7
|
-
class UnneededPercentX < Cop
|
8
|
-
MSG = 'Do not use `%x` unless the command string contains backquotes.'
|
9
|
-
|
10
|
-
def on_xstr(node)
|
11
|
-
add_offense(node, :expression) if node.loc.expression.source !~ /`/
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def autocorrect(node)
|
17
|
-
@corrections << lambda do |corrector|
|
18
|
-
corrector.replace(node.loc.begin, '`')
|
19
|
-
corrector.replace(node.loc.end, '`')
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/logo/rubocop-final-logo.eps
DELETED
Binary file
|
data/spec/.rubocop.yml
DELETED
@@ -1,495 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset='UTF-8' />
|
5
|
-
<title>RuboCop Inspection Report</title>
|
6
|
-
|
7
|
-
<style>
|
8
|
-
* {
|
9
|
-
-webkit-box-sizing: border-box;
|
10
|
-
-moz-box-sizing: border-box;
|
11
|
-
box-sizing: border-box;
|
12
|
-
}
|
13
|
-
|
14
|
-
body, html {
|
15
|
-
font-size: 62.5%;
|
16
|
-
}
|
17
|
-
body {
|
18
|
-
background-color: #ecedf0;
|
19
|
-
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
20
|
-
margin: 0;
|
21
|
-
}
|
22
|
-
code {
|
23
|
-
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
24
|
-
font-size: 85%;
|
25
|
-
}
|
26
|
-
#header {
|
27
|
-
background: #f9f9f9;
|
28
|
-
color: #333;
|
29
|
-
border-bottom: 3px solid #ccc;
|
30
|
-
height: 50px;
|
31
|
-
padding: 0;
|
32
|
-
}
|
33
|
-
#header .logo {
|
34
|
-
float: left;
|
35
|
-
margin: 5px 12px 7px 20px;
|
36
|
-
width: 38px;
|
37
|
-
height: 38px;
|
38
|
-
}
|
39
|
-
#header .title {
|
40
|
-
display: inline-block;
|
41
|
-
float: left;
|
42
|
-
height: 50px;
|
43
|
-
font-size: 2.4rem;
|
44
|
-
letter-spacing: normal;
|
45
|
-
line-height: 50px;
|
46
|
-
margin: 0;
|
47
|
-
}
|
48
|
-
|
49
|
-
.information, #offenses {
|
50
|
-
width: 100%;
|
51
|
-
padding: 20px;
|
52
|
-
color: #333;
|
53
|
-
}
|
54
|
-
#offenses {
|
55
|
-
padding: 0 20px;
|
56
|
-
}
|
57
|
-
|
58
|
-
.information .infobox {
|
59
|
-
border-left: 3px solid;
|
60
|
-
border-radius: 4px;
|
61
|
-
background-color: #fff;
|
62
|
-
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
63
|
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
64
|
-
padding: 15px;
|
65
|
-
border-color: #0088cc;
|
66
|
-
font-size: 1.4rem;
|
67
|
-
}
|
68
|
-
.information .infobox .info-title {
|
69
|
-
font-size: 1.8rem;
|
70
|
-
line-height: 2.2rem;
|
71
|
-
margin: 0 0 0.5em;
|
72
|
-
}
|
73
|
-
.information .infobox ul {
|
74
|
-
list-style: none;
|
75
|
-
margin: 0;
|
76
|
-
padding: 0;
|
77
|
-
}
|
78
|
-
.information .infobox ul li {
|
79
|
-
line-height: 1.8rem
|
80
|
-
}
|
81
|
-
|
82
|
-
#offenses .offense-box {
|
83
|
-
border-radius: 4px;
|
84
|
-
margin-bottom: 20px;
|
85
|
-
background-color: #fff;
|
86
|
-
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
87
|
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
88
|
-
}
|
89
|
-
#offenses .offense-box .box-title h3 {
|
90
|
-
color: #33353f;
|
91
|
-
background-color: #f6f6f6;
|
92
|
-
font-size: 2rem;
|
93
|
-
line-height: 2rem;
|
94
|
-
display: block;
|
95
|
-
padding: 15px;
|
96
|
-
border-radius: 5px;
|
97
|
-
margin: 0;
|
98
|
-
}
|
99
|
-
#offenses .offense-box .offense-reports {
|
100
|
-
padding: 0 15px;
|
101
|
-
}
|
102
|
-
#offenses .offense-box .offense-reports .report {
|
103
|
-
border-bottom: 1px dotted #ddd;
|
104
|
-
padding: 15px 0px;
|
105
|
-
position: relative;
|
106
|
-
font-size: 1.3rem;
|
107
|
-
}
|
108
|
-
#offenses .offense-box .offense-reports .report:last-child {
|
109
|
-
border-bottom: none;
|
110
|
-
}
|
111
|
-
#offenses .offense-box .offense-reports .report pre code {
|
112
|
-
display: block;
|
113
|
-
background: #000;
|
114
|
-
color: #fff;
|
115
|
-
padding: 10px 15px;
|
116
|
-
border-radius: 5px;
|
117
|
-
line-height: 1.6rem;
|
118
|
-
}
|
119
|
-
#offenses .offense-box .offense-reports .report .location {
|
120
|
-
font-weight: bold;
|
121
|
-
}
|
122
|
-
#offenses .offense-box .offense-reports .report .message code {
|
123
|
-
padding: 0.3em;
|
124
|
-
background-color: rgba(0,0,0,0.07);
|
125
|
-
border-radius: 3px;
|
126
|
-
}
|
127
|
-
.severity {
|
128
|
-
text-transform: capitalize;
|
129
|
-
font-weight: bold;
|
130
|
-
}
|
131
|
-
.highlight {
|
132
|
-
padding: 2px;
|
133
|
-
border-radius: 2px;
|
134
|
-
font-weight: bold;
|
135
|
-
}
|
136
|
-
|
137
|
-
.severity.refactor {
|
138
|
-
color: rgba(237, 156, 40, 1.0);
|
139
|
-
}
|
140
|
-
.highlight.refactor {
|
141
|
-
background-color: rgba(237, 156, 40, 0.6);
|
142
|
-
border: 1px solid rgba(237, 156, 40, 0.4);
|
143
|
-
}
|
144
|
-
|
145
|
-
.severity.convention {
|
146
|
-
color: rgba(237, 156, 40, 1.0);
|
147
|
-
}
|
148
|
-
.highlight.convention {
|
149
|
-
background-color: rgba(237, 156, 40, 0.6);
|
150
|
-
border: 1px solid rgba(237, 156, 40, 0.4);
|
151
|
-
}
|
152
|
-
|
153
|
-
.severity.warning {
|
154
|
-
color: rgba(150, 40, 239, 1.0);
|
155
|
-
}
|
156
|
-
.highlight.warning {
|
157
|
-
background-color: rgba(150, 40, 239, 0.6);
|
158
|
-
border: 1px solid rgba(150, 40, 239, 0.4);
|
159
|
-
}
|
160
|
-
|
161
|
-
.severity.error {
|
162
|
-
color: rgba(210, 50, 45, 1.0);
|
163
|
-
}
|
164
|
-
.highlight.error {
|
165
|
-
background-color: rgba(210, 50, 45, 0.6);
|
166
|
-
border: 1px solid rgba(210, 50, 45, 0.4);
|
167
|
-
}
|
168
|
-
|
169
|
-
.severity.fatal {
|
170
|
-
color: rgba(210, 50, 45, 1.0);
|
171
|
-
}
|
172
|
-
.highlight.fatal {
|
173
|
-
background-color: rgba(210, 50, 45, 0.6);
|
174
|
-
border: 1px solid rgba(210, 50, 45, 0.4);
|
175
|
-
}
|
176
|
-
|
177
|
-
footer {
|
178
|
-
margin-bottom: 20px;
|
179
|
-
margin-right: 20px;
|
180
|
-
font-size: 1.3rem;
|
181
|
-
color: #777;
|
182
|
-
text-align: right;
|
183
|
-
}
|
184
|
-
</style>
|
185
|
-
</head>
|
186
|
-
<body>
|
187
|
-
<div id="header">
|
188
|
-
<img class="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAKQWlDQ1BJQ0Mg
|
189
|
-
UHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKG
|
190
|
-
hCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a
|
191
|
-
/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA
|
192
|
-
4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8
|
193
|
-
fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnO
|
194
|
-
Gbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcm
|
195
|
-
oWyJMkUUGe6J8gI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Sna6wrt7LgZevXvG5
|
242
|
-
cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+
|
243
|
-
BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j
|
244
|
-
7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0
|
245
|
-
RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K
|
246
|
-
3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn8
|
247
|
-
8ngmbWbm3/eE8/syOll+AAAACXBIWXMAAAsTAAALEwEAmpwYAAAEJGlUWHRY
|
248
|
-
TUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9i
|
249
|
-
ZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRm
|
250
|
-
OlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjIt
|
251
|
-
cmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjph
|
252
|
-
Ym91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRv
|
253
|
-
YmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0
|
254
|
-
cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICAgICAgICAgIHhtbG5z
|
255
|
-
OmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAg
|
256
|
-
ICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAv
|
257
|
-
Ij4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVua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cUCuVaJG8Q0cVDB/hQpDKiJ/C/K
|
305
|
-
tmQ/1f7NovNXdeqTGu5SJB6RmI5gkdvQjPZc8KyyFrk4Jm1ozhXPKTvPzE3i
|
306
|
-
itSGRrQWAo9LxR9ikQrUrAVtaCwUOMm+KB4Vm8Xm+RotaLJdALQ7Xwwq/b3i
|
307
|
-
TvFXMeuCkZPcaEBLqvgPBhCuiZo8+sAAAAAASUVORK5CYII=
|
308
|
-
" alt="">
|
309
|
-
<h1 class="title">RuboCop Inspection Report</h1>
|
310
|
-
</div>
|
311
|
-
<div class="information">
|
312
|
-
<div class="infobox">
|
313
|
-
3 files inspected,
|
314
|
-
13 offenses detected
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
<div id="offenses">
|
318
|
-
|
319
|
-
|
320
|
-
<div class="offense-box">
|
321
|
-
<div class="box-title"><h3>app/controllers/application_controller.rb - 1 offense</h3></div>
|
322
|
-
<div class="offense-reports">
|
323
|
-
|
324
|
-
<div class="report">
|
325
|
-
<div class="meta">
|
326
|
-
<span class="location">Line #1</span> –
|
327
|
-
<span class="severity convention">convention:</span>
|
328
|
-
<span class="message">Missing top-level class documentation comment.</span>
|
329
|
-
</div>
|
330
|
-
|
331
|
-
<pre><code><span class="highlight convention">class</span> ApplicationController < ActionController::Base</code></pre>
|
332
|
-
|
333
|
-
</div>
|
334
|
-
|
335
|
-
</div>
|
336
|
-
</div>
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
<div class="offense-box">
|
341
|
-
<div class="box-title"><h3>app/controllers/books_controller.rb - 8 offenses</h3></div>
|
342
|
-
<div class="offense-reports">
|
343
|
-
|
344
|
-
<div class="report">
|
345
|
-
<div class="meta">
|
346
|
-
<span class="location">Line #1</span> –
|
347
|
-
<span class="severity convention">convention:</span>
|
348
|
-
<span class="message">Missing top-level class documentation comment.</span>
|
349
|
-
</div>
|
350
|
-
|
351
|
-
<pre><code><span class="highlight convention">class</span> BooksController < ApplicationController</code></pre>
|
352
|
-
|
353
|
-
</div>
|
354
|
-
|
355
|
-
<div class="report">
|
356
|
-
<div class="meta">
|
357
|
-
<span class="location">Line #31</span> –
|
358
|
-
<span class="severity convention">convention:</span>
|
359
|
-
<span class="message">Line is too long. [83/80]</span>
|
360
|
-
</div>
|
361
|
-
|
362
|
-
<pre><code> format.html { redirect_to @book, notice: 'Book was successfully created.<span class="highlight convention">' }</span></code></pre>
|
363
|
-
|
364
|
-
</div>
|
365
|
-
|
366
|
-
<div class="report">
|
367
|
-
<div class="meta">
|
368
|
-
<span class="location">Line #45</span> –
|
369
|
-
<span class="severity convention">convention:</span>
|
370
|
-
<span class="message">Line is too long. [83/80]</span>
|
371
|
-
</div>
|
372
|
-
|
373
|
-
<pre><code> format.html { redirect_to @book, notice: 'Book was successfully updated.<span class="highlight convention">' }</span></code></pre>
|
374
|
-
|
375
|
-
</div>
|
376
|
-
|
377
|
-
<div class="report">
|
378
|
-
<div class="meta">
|
379
|
-
<span class="location">Line #59</span> –
|
380
|
-
<span class="severity convention">convention:</span>
|
381
|
-
<span class="message">Line is too long. [87/80]</span>
|
382
|
-
</div>
|
383
|
-
|
384
|
-
<pre><code> format.html { redirect_to books_url, notice: 'Book was successfully destro<span class="highlight convention">yed.' }</span></code></pre>
|
385
|
-
|
386
|
-
</div>
|
387
|
-
|
388
|
-
<div class="report">
|
389
|
-
<div class="meta">
|
390
|
-
<span class="location">Line #64</span> –
|
391
|
-
<span class="severity convention">convention:</span>
|
392
|
-
<span class="message">Keep a blank line before and after <code>private</code>.</span>
|
393
|
-
</div>
|
394
|
-
|
395
|
-
<pre><code> <span class="highlight convention">private</span></code></pre>
|
396
|
-
|
397
|
-
</div>
|
398
|
-
|
399
|
-
<div class="report">
|
400
|
-
<div class="meta">
|
401
|
-
<span class="location">Line #66</span> –
|
402
|
-
<span class="severity convention">convention:</span>
|
403
|
-
<span class="message">Inconsistent indentation detected.</span>
|
404
|
-
</div>
|
405
|
-
|
406
|
-
<pre><code> <span class="highlight convention">def set_book</span></code></pre>
|
407
|
-
|
408
|
-
</div>
|
409
|
-
|
410
|
-
<div class="report">
|
411
|
-
<div class="meta">
|
412
|
-
<span class="location">Line #70</span> –
|
413
|
-
<span class="severity convention">convention:</span>
|
414
|
-
<span class="message">Line is too long. [88/80]</span>
|
415
|
-
</div>
|
416
|
-
|
417
|
-
<pre><code> # Never trust parameters from the scary internet, only allow the white list <span class="highlight convention">through.</span></code></pre>
|
418
|
-
|
419
|
-
</div>
|
420
|
-
|
421
|
-
<div class="report">
|
422
|
-
<div class="meta">
|
423
|
-
<span class="location">Line #71</span> –
|
424
|
-
<span class="severity convention">convention:</span>
|
425
|
-
<span class="message">Inconsistent indentation detected.</span>
|
426
|
-
</div>
|
427
|
-
|
428
|
-
<pre><code> <span class="highlight convention">def book_params</span></code></pre>
|
429
|
-
|
430
|
-
</div>
|
431
|
-
|
432
|
-
</div>
|
433
|
-
</div>
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
<div class="offense-box">
|
438
|
-
<div class="box-title"><h3>app/models/book.rb - 4 offenses</h3></div>
|
439
|
-
<div class="offense-reports">
|
440
|
-
|
441
|
-
<div class="report">
|
442
|
-
<div class="meta">
|
443
|
-
<span class="location">Line #1</span> –
|
444
|
-
<span class="severity convention">convention:</span>
|
445
|
-
<span class="message">Missing top-level class documentation comment.</span>
|
446
|
-
</div>
|
447
|
-
|
448
|
-
<pre><code><span class="highlight convention">class</span> Book < ActiveRecord::Base</code></pre>
|
449
|
-
|
450
|
-
</div>
|
451
|
-
|
452
|
-
<div class="report">
|
453
|
-
<div class="meta">
|
454
|
-
<span class="location">Line #2</span> –
|
455
|
-
<span class="severity convention">convention:</span>
|
456
|
-
<span class="message">Use snake_case for method names.</span>
|
457
|
-
</div>
|
458
|
-
|
459
|
-
<pre><code> def <span class="highlight convention">someMethod</span></code></pre>
|
460
|
-
|
461
|
-
</div>
|
462
|
-
|
463
|
-
<div class="report">
|
464
|
-
<div class="meta">
|
465
|
-
<span class="location">Line #3</span> –
|
466
|
-
<span class="severity warning">warning:</span>
|
467
|
-
<span class="message">Useless assignment to variable - <code>foo</code>.</span>
|
468
|
-
</div>
|
469
|
-
|
470
|
-
<pre><code> <span class="highlight warning">foo</span> = bar = baz</code></pre>
|
471
|
-
|
472
|
-
</div>
|
473
|
-
|
474
|
-
<div class="report">
|
475
|
-
<div class="meta">
|
476
|
-
<span class="location">Line #3</span> –
|
477
|
-
<span class="severity warning">warning:</span>
|
478
|
-
<span class="message">Useless assignment to variable - <code>bar</code>.</span>
|
479
|
-
</div>
|
480
|
-
|
481
|
-
<pre><code> foo = <span class="highlight warning">bar</span> = baz</code></pre>
|
482
|
-
|
483
|
-
</div>
|
484
|
-
|
485
|
-
</div>
|
486
|
-
</div>
|
487
|
-
|
488
|
-
|
489
|
-
</div>
|
490
|
-
<footer>
|
491
|
-
Generated by <a href="https://github.com/bbatsov/rubocop">RuboCop</a>
|
492
|
-
<span class="version">0.26.1</span>
|
493
|
-
</footer>
|
494
|
-
</body>
|
495
|
-
</html>
|