rubocop 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubocop might be problematic. Click here for more details.

Files changed (484) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rubocop_todo.yml +7 -7
  4. data/CHANGELOG.md +34 -1
  5. data/Gemfile +1 -1
  6. data/README.md +86 -47
  7. data/Rakefile +2 -2
  8. data/bin/rubocop +1 -1
  9. data/config/default.yml +76 -74
  10. data/config/disabled.yml +6 -2
  11. data/config/enabled.yml +180 -180
  12. data/lib/rubocop.rb +1 -0
  13. data/lib/rubocop/cli.rb +7 -3
  14. data/lib/rubocop/comment_config.rb +4 -2
  15. data/lib/rubocop/config.rb +15 -3
  16. data/lib/rubocop/config_loader.rb +8 -3
  17. data/lib/rubocop/config_store.rb +1 -1
  18. data/lib/rubocop/cop/commissioner.rb +1 -1
  19. data/lib/rubocop/cop/cop.rb +16 -2
  20. data/lib/rubocop/cop/corrector.rb +1 -1
  21. data/lib/rubocop/cop/force.rb +1 -1
  22. data/lib/rubocop/cop/ignored_node.rb +1 -1
  23. data/lib/rubocop/cop/lint/ambiguous_operator.rb +1 -1
  24. data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +1 -1
  25. data/lib/rubocop/cop/lint/assignment_in_condition.rb +1 -1
  26. data/lib/rubocop/cop/lint/block_alignment.rb +1 -1
  27. data/lib/rubocop/cop/lint/condition_position.rb +1 -1
  28. data/lib/rubocop/cop/lint/debugger.rb +1 -1
  29. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +1 -1
  30. data/lib/rubocop/cop/lint/else_layout.rb +1 -1
  31. data/lib/rubocop/cop/lint/empty_ensure.rb +1 -1
  32. data/lib/rubocop/cop/lint/empty_interpolation.rb +1 -1
  33. data/lib/rubocop/cop/lint/end_alignment.rb +1 -1
  34. data/lib/rubocop/cop/lint/end_in_method.rb +1 -1
  35. data/lib/rubocop/cop/lint/ensure_return.rb +1 -1
  36. data/lib/rubocop/cop/lint/eval.rb +1 -1
  37. data/lib/rubocop/cop/lint/handle_exceptions.rb +1 -1
  38. data/lib/rubocop/cop/lint/invalid_character_literal.rb +1 -1
  39. data/lib/rubocop/cop/lint/literal_in_condition.rb +1 -1
  40. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +1 -1
  41. data/lib/rubocop/cop/lint/loop.rb +1 -1
  42. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +1 -1
  43. data/lib/rubocop/cop/lint/require_parentheses.rb +1 -1
  44. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
  45. data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +1 -1
  46. data/lib/rubocop/cop/lint/space_before_first_arg.rb +1 -1
  47. data/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +1 -1
  48. data/lib/rubocop/cop/lint/syntax.rb +1 -1
  49. data/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +1 -1
  50. data/lib/rubocop/cop/lint/unreachable_code.rb +1 -1
  51. data/lib/rubocop/cop/lint/unused_block_argument.rb +1 -1
  52. data/lib/rubocop/cop/lint/unused_method_argument.rb +1 -1
  53. data/lib/rubocop/cop/lint/useless_access_modifier.rb +1 -1
  54. data/lib/rubocop/cop/lint/useless_assignment.rb +1 -1
  55. data/lib/rubocop/cop/lint/useless_comparison.rb +1 -1
  56. data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +1 -1
  57. data/lib/rubocop/cop/lint/useless_setter_call.rb +1 -1
  58. data/lib/rubocop/cop/lint/void.rb +1 -1
  59. data/lib/rubocop/cop/mixin/annotation_comment.rb +2 -2
  60. data/lib/rubocop/cop/mixin/array_syntax.rb +1 -1
  61. data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +32 -3
  62. data/lib/rubocop/cop/mixin/autocorrect_unless_changing_ast.rb +1 -1
  63. data/lib/rubocop/cop/mixin/check_assignment.rb +1 -1
  64. data/lib/rubocop/cop/mixin/check_methods.rb +1 -1
  65. data/lib/rubocop/cop/mixin/code_length.rb +1 -1
  66. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +1 -1
  67. data/lib/rubocop/cop/mixin/configurable_max.rb +1 -1
  68. data/lib/rubocop/cop/mixin/configurable_naming.rb +1 -1
  69. data/lib/rubocop/cop/mixin/if_node.rb +1 -1
  70. data/lib/rubocop/cop/mixin/if_then_else.rb +1 -1
  71. data/lib/rubocop/cop/mixin/negative_conditional.rb +1 -1
  72. data/lib/rubocop/cop/mixin/parser_diagnostic.rb +1 -1
  73. data/lib/rubocop/cop/mixin/percent_literal.rb +1 -1
  74. data/lib/rubocop/cop/mixin/safe_assignment.rb +14 -3
  75. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +1 -1
  76. data/lib/rubocop/cop/mixin/space_inside.rb +1 -1
  77. data/lib/rubocop/cop/mixin/statement_modifier.rb +2 -2
  78. data/lib/rubocop/cop/mixin/string_help.rb +1 -1
  79. data/lib/rubocop/cop/mixin/surrounding_space.rb +1 -1
  80. data/lib/rubocop/cop/mixin/unused_argument.rb +1 -1
  81. data/lib/rubocop/cop/offense.rb +3 -3
  82. data/lib/rubocop/cop/rails/action_filter.rb +1 -1
  83. data/lib/rubocop/cop/rails/default_scope.rb +1 -1
  84. data/lib/rubocop/cop/rails/delegate.rb +1 -1
  85. data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +1 -1
  86. data/lib/rubocop/cop/rails/output.rb +1 -1
  87. data/lib/rubocop/cop/rails/read_write_attribute.rb +1 -1
  88. data/lib/rubocop/cop/rails/scope_args.rb +1 -1
  89. data/lib/rubocop/cop/rails/validation.rb +1 -1
  90. data/lib/rubocop/cop/severity.rb +1 -1
  91. data/lib/rubocop/cop/style/access_modifier_indentation.rb +1 -1
  92. data/lib/rubocop/cop/style/accessor_method_name.rb +1 -1
  93. data/lib/rubocop/cop/style/alias.rb +1 -1
  94. data/lib/rubocop/cop/style/align_array.rb +1 -1
  95. data/lib/rubocop/cop/style/align_hash.rb +1 -1
  96. data/lib/rubocop/cop/style/align_parameters.rb +1 -1
  97. data/lib/rubocop/cop/style/and_or.rb +1 -1
  98. data/lib/rubocop/cop/style/array_join.rb +1 -1
  99. data/lib/rubocop/cop/style/ascii_comments.rb +1 -1
  100. data/lib/rubocop/cop/style/ascii_identifiers.rb +1 -1
  101. data/lib/rubocop/cop/style/attr.rb +1 -1
  102. data/lib/rubocop/cop/style/begin_block.rb +1 -1
  103. data/lib/rubocop/cop/style/block_comments.rb +24 -3
  104. data/lib/rubocop/cop/style/block_nesting.rb +1 -1
  105. data/lib/rubocop/cop/style/blocks.rb +1 -1
  106. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +1 -1
  107. data/lib/rubocop/cop/style/case_equality.rb +1 -1
  108. data/lib/rubocop/cop/style/case_indentation.rb +1 -1
  109. data/lib/rubocop/cop/style/character_literal.rb +1 -1
  110. data/lib/rubocop/cop/style/class_and_module_camel_case.rb +1 -1
  111. data/lib/rubocop/cop/style/class_and_module_children.rb +1 -1
  112. data/lib/rubocop/cop/style/class_length.rb +1 -1
  113. data/lib/rubocop/cop/style/class_methods.rb +1 -1
  114. data/lib/rubocop/cop/style/class_vars.rb +1 -1
  115. data/lib/rubocop/cop/style/collection_methods.rb +1 -1
  116. data/lib/rubocop/cop/style/colon_method_call.rb +1 -1
  117. data/lib/rubocop/cop/style/comment_annotation.rb +1 -1
  118. data/lib/rubocop/cop/style/comment_indentation.rb +1 -1
  119. data/lib/rubocop/cop/style/constant_name.rb +1 -1
  120. data/lib/rubocop/cop/style/cyclomatic_complexity.rb +1 -1
  121. data/lib/rubocop/cop/style/def_with_parentheses.rb +1 -1
  122. data/lib/rubocop/cop/style/deprecated_hash_methods.rb +1 -1
  123. data/lib/rubocop/cop/style/documentation.rb +4 -2
  124. data/lib/rubocop/cop/style/dot_position.rb +1 -1
  125. data/lib/rubocop/cop/style/double_negation.rb +1 -1
  126. data/lib/rubocop/cop/style/each_with_object.rb +21 -5
  127. data/lib/rubocop/cop/style/empty_line_between_defs.rb +1 -1
  128. data/lib/rubocop/cop/style/empty_lines.rb +1 -1
  129. data/lib/rubocop/cop/style/empty_lines_around_access_modifier.rb +1 -1
  130. data/lib/rubocop/cop/style/empty_lines_around_body.rb +1 -1
  131. data/lib/rubocop/cop/style/empty_literal.rb +1 -1
  132. data/lib/rubocop/cop/style/encoding.rb +1 -1
  133. data/lib/rubocop/cop/style/end_block.rb +1 -1
  134. data/lib/rubocop/cop/style/end_of_line.rb +12 -3
  135. data/lib/rubocop/cop/style/even_odd.rb +1 -1
  136. data/lib/rubocop/cop/style/file_name.rb +1 -1
  137. data/lib/rubocop/cop/style/flip_flop.rb +1 -1
  138. data/lib/rubocop/cop/style/for.rb +1 -1
  139. data/lib/rubocop/cop/style/format_string.rb +1 -1
  140. data/lib/rubocop/cop/style/global_vars.rb +1 -1
  141. data/lib/rubocop/cop/style/guard_clause.rb +1 -1
  142. data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
  143. data/lib/rubocop/cop/style/if_unless_modifier.rb +1 -1
  144. data/lib/rubocop/cop/style/if_with_semicolon.rb +1 -1
  145. data/lib/rubocop/cop/style/indent_array.rb +35 -12
  146. data/lib/rubocop/cop/style/indent_hash.rb +39 -23
  147. data/lib/rubocop/cop/style/indentation_consistency.rb +1 -1
  148. data/lib/rubocop/cop/style/indentation_width.rb +2 -2
  149. data/lib/rubocop/cop/style/inline_comment.rb +19 -0
  150. data/lib/rubocop/cop/style/lambda.rb +1 -1
  151. data/lib/rubocop/cop/style/lambda_call.rb +1 -1
  152. data/lib/rubocop/cop/style/leading_comment_space.rb +1 -1
  153. data/lib/rubocop/cop/style/line_end_concatenation.rb +1 -1
  154. data/lib/rubocop/cop/style/line_length.rb +1 -1
  155. data/lib/rubocop/cop/style/method_call_parentheses.rb +2 -2
  156. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +1 -1
  157. data/lib/rubocop/cop/style/method_def_parentheses.rb +1 -1
  158. data/lib/rubocop/cop/style/method_length.rb +1 -1
  159. data/lib/rubocop/cop/style/method_name.rb +1 -1
  160. data/lib/rubocop/cop/style/module_function.rb +1 -1
  161. data/lib/rubocop/cop/style/multiline_block_chain.rb +1 -1
  162. data/lib/rubocop/cop/style/multiline_if_then.rb +1 -1
  163. data/lib/rubocop/cop/style/multiline_ternary_operator.rb +1 -1
  164. data/lib/rubocop/cop/style/negated_if.rb +1 -1
  165. data/lib/rubocop/cop/style/negated_while.rb +1 -1
  166. data/lib/rubocop/cop/style/nested_ternary_operator.rb +1 -1
  167. data/lib/rubocop/cop/style/next.rb +2 -1
  168. data/lib/rubocop/cop/style/nil_comparison.rb +1 -1
  169. data/lib/rubocop/cop/style/non_nil_check.rb +1 -1
  170. data/lib/rubocop/cop/style/not.rb +1 -1
  171. data/lib/rubocop/cop/style/numeric_literals.rb +1 -1
  172. data/lib/rubocop/cop/style/one_line_conditional.rb +1 -1
  173. data/lib/rubocop/cop/style/op_method.rb +1 -1
  174. data/lib/rubocop/cop/style/parameter_lists.rb +1 -1
  175. data/lib/rubocop/cop/style/parentheses_around_condition.rb +11 -1
  176. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +1 -1
  177. data/lib/rubocop/cop/style/perl_backrefs.rb +1 -1
  178. data/lib/rubocop/cop/style/predicate_name.rb +1 -1
  179. data/lib/rubocop/cop/style/proc.rb +1 -1
  180. data/lib/rubocop/cop/style/raise_args.rb +1 -1
  181. data/lib/rubocop/cop/style/redundant_begin.rb +1 -1
  182. data/lib/rubocop/cop/style/redundant_exception.rb +1 -1
  183. data/lib/rubocop/cop/style/redundant_return.rb +1 -1
  184. data/lib/rubocop/cop/style/redundant_self.rb +1 -1
  185. data/lib/rubocop/cop/style/regexp_literal.rb +13 -5
  186. data/lib/rubocop/cop/style/rescue_modifier.rb +1 -1
  187. data/lib/rubocop/cop/style/self_assignment.rb +1 -1
  188. data/lib/rubocop/cop/style/semicolon.rb +1 -1
  189. data/lib/rubocop/cop/style/signal_exception.rb +1 -1
  190. data/lib/rubocop/cop/style/single_line_block_params.rb +1 -1
  191. data/lib/rubocop/cop/style/single_line_methods.rb +1 -1
  192. data/lib/rubocop/cop/style/single_space_before_first_arg.rb +1 -1
  193. data/lib/rubocop/cop/style/space_after_colon.rb +1 -1
  194. data/lib/rubocop/cop/style/space_after_comma.rb +1 -1
  195. data/lib/rubocop/cop/style/space_after_control_keyword.rb +1 -1
  196. data/lib/rubocop/cop/style/space_after_method_name.rb +1 -1
  197. data/lib/rubocop/cop/style/space_after_not.rb +1 -1
  198. data/lib/rubocop/cop/style/space_after_semicolon.rb +1 -1
  199. data/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb +1 -1
  200. data/lib/rubocop/cop/style/space_around_operators.rb +1 -1
  201. data/lib/rubocop/cop/style/space_before_block_braces.rb +3 -2
  202. data/lib/rubocop/cop/style/space_before_comment.rb +1 -1
  203. data/lib/rubocop/cop/style/space_before_modifier_keyword.rb +1 -1
  204. data/lib/rubocop/cop/style/space_inside_block_braces.rb +3 -2
  205. data/lib/rubocop/cop/style/space_inside_brackets.rb +1 -1
  206. data/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +1 -1
  207. data/lib/rubocop/cop/style/space_inside_parens.rb +1 -1
  208. data/lib/rubocop/cop/style/special_global_vars.rb +1 -1
  209. data/lib/rubocop/cop/style/string_literals.rb +1 -1
  210. data/lib/rubocop/cop/style/symbol_array.rb +1 -1
  211. data/lib/rubocop/cop/style/tab.rb +1 -1
  212. data/lib/rubocop/cop/style/trailing_blank_lines.rb +1 -1
  213. data/lib/rubocop/cop/style/trailing_comma.rb +16 -3
  214. data/lib/rubocop/cop/style/trailing_whitespace.rb +1 -1
  215. data/lib/rubocop/cop/style/trivial_accessors.rb +40 -9
  216. data/lib/rubocop/cop/style/unless_else.rb +1 -1
  217. data/lib/rubocop/cop/style/unneeded_capital_w.rb +1 -1
  218. data/lib/rubocop/cop/style/unneeded_percent_x.rb +1 -1
  219. data/lib/rubocop/cop/style/variable_interpolation.rb +1 -1
  220. data/lib/rubocop/cop/style/variable_name.rb +1 -1
  221. data/lib/rubocop/cop/style/when_then.rb +1 -1
  222. data/lib/rubocop/cop/style/while_until_do.rb +1 -1
  223. data/lib/rubocop/cop/style/while_until_modifier.rb +1 -1
  224. data/lib/rubocop/cop/style/word_array.rb +1 -1
  225. data/lib/rubocop/cop/team.rb +12 -2
  226. data/lib/rubocop/cop/util.rb +1 -1
  227. data/lib/rubocop/cop/variable_force.rb +4 -4
  228. data/lib/rubocop/cop/variable_force/assignment.rb +1 -1
  229. data/lib/rubocop/cop/variable_force/locatable.rb +1 -1
  230. data/lib/rubocop/cop/variable_force/reference.rb +1 -1
  231. data/lib/rubocop/cop/variable_force/scope.rb +1 -1
  232. data/lib/rubocop/cop/variable_force/variable.rb +1 -1
  233. data/lib/rubocop/cop/variable_force/variable_table.rb +1 -1
  234. data/lib/rubocop/file_inspector.rb +3 -3
  235. data/lib/rubocop/formatter/base_formatter.rb +6 -6
  236. data/lib/rubocop/formatter/clang_style_formatter.rb +1 -1
  237. data/lib/rubocop/formatter/colorizable.rb +1 -1
  238. data/lib/rubocop/formatter/disabled_config_formatter.rb +2 -2
  239. data/lib/rubocop/formatter/disabled_lines_formatter.rb +1 -1
  240. data/lib/rubocop/formatter/emacs_style_formatter.rb +1 -1
  241. data/lib/rubocop/formatter/file_list_formatter.rb +1 -1
  242. data/lib/rubocop/formatter/formatter_set.rb +1 -1
  243. data/lib/rubocop/formatter/fuubar_style_formatter.rb +1 -1
  244. data/lib/rubocop/formatter/json_formatter.rb +2 -2
  245. data/lib/rubocop/formatter/offense_count_formatter.rb +1 -1
  246. data/lib/rubocop/formatter/progress_formatter.rb +1 -1
  247. data/lib/rubocop/formatter/simple_text_formatter.rb +1 -1
  248. data/lib/rubocop/options.rb +6 -4
  249. data/lib/rubocop/path_util.rb +1 -1
  250. data/lib/rubocop/processed_source.rb +1 -1
  251. data/lib/rubocop/rake_task.rb +3 -3
  252. data/lib/rubocop/source_parser.rb +2 -2
  253. data/lib/rubocop/target_finder.rb +2 -6
  254. data/lib/rubocop/token.rb +1 -1
  255. data/lib/rubocop/version.rb +2 -2
  256. data/relnotes/v0.21.0.md +1 -1
  257. data/relnotes/v0.23.0.md +79 -0
  258. data/rubocop.gemspec +1 -1
  259. data/spec/.rubocop.yml +1 -1
  260. data/spec/isolated_environment_spec.rb +1 -1
  261. data/spec/project_spec.rb +3 -3
  262. data/spec/rubocop/cli_spec.rb +242 -94
  263. data/spec/rubocop/comment_config_spec.rb +17 -15
  264. data/spec/rubocop/config_loader_spec.rb +51 -34
  265. data/spec/rubocop/config_spec.rb +5 -5
  266. data/spec/rubocop/config_store_spec.rb +11 -11
  267. data/spec/rubocop/cop/commissioner_spec.rb +4 -4
  268. data/spec/rubocop/cop/cop_spec.rb +33 -10
  269. data/spec/rubocop/cop/corrector_spec.rb +1 -1
  270. data/spec/rubocop/cop/force_spec.rb +2 -2
  271. data/spec/rubocop/cop/lint/ambiguous_operator_spec.rb +1 -1
  272. data/spec/rubocop/cop/lint/ambiguous_regexp_literal_spec.rb +1 -1
  273. data/spec/rubocop/cop/lint/assignment_in_condition_spec.rb +1 -1
  274. data/spec/rubocop/cop/lint/block_alignment_spec.rb +2 -2
  275. data/spec/rubocop/cop/lint/condition_position_spec.rb +4 -4
  276. data/spec/rubocop/cop/lint/debugger_spec.rb +1 -1
  277. data/spec/rubocop/cop/lint/deprecated_class_methods_spec.rb +1 -1
  278. data/spec/rubocop/cop/lint/else_layout_spec.rb +5 -5
  279. data/spec/rubocop/cop/lint/empty_ensure_spec.rb +1 -1
  280. data/spec/rubocop/cop/lint/empty_interpolation_spec.rb +1 -1
  281. data/spec/rubocop/cop/lint/end_alignment_spec.rb +1 -1
  282. data/spec/rubocop/cop/lint/end_in_method_spec.rb +1 -1
  283. data/spec/rubocop/cop/lint/ensure_return_spec.rb +1 -1
  284. data/spec/rubocop/cop/lint/eval_spec.rb +1 -1
  285. data/spec/rubocop/cop/lint/handle_exceptions_spec.rb +1 -1
  286. data/spec/rubocop/cop/lint/invalid_character_literal_spec.rb +1 -1
  287. data/spec/rubocop/cop/lint/literal_in_condition_spec.rb +1 -1
  288. data/spec/rubocop/cop/lint/literal_in_interpolation_spec.rb +1 -1
  289. data/spec/rubocop/cop/lint/loop_spec.rb +1 -1
  290. data/spec/rubocop/cop/lint/parentheses_as_grouped_expression_spec.rb +1 -1
  291. data/spec/rubocop/cop/lint/require_parentheses_spec.rb +1 -1
  292. data/spec/rubocop/cop/lint/rescue_exception_spec.rb +2 -2
  293. data/spec/rubocop/cop/lint/shadowing_outer_local_variable_spec.rb +1 -1
  294. data/spec/rubocop/cop/lint/space_before_first_arg_spec.rb +1 -1
  295. data/spec/rubocop/cop/lint/string_conversion_in_interpolation_spec.rb +1 -1
  296. data/spec/rubocop/cop/lint/syntax_spec.rb +2 -2
  297. data/spec/rubocop/cop/lint/underscore_prefixed_variable_name_spec.rb +1 -1
  298. data/spec/rubocop/cop/lint/unreachable_code_spec.rb +1 -1
  299. data/spec/rubocop/cop/lint/unused_block_argument_spec.rb +1 -1
  300. data/spec/rubocop/cop/lint/unused_method_argument_spec.rb +1 -1
  301. data/spec/rubocop/cop/lint/useless_access_modifier_spec.rb +1 -1
  302. data/spec/rubocop/cop/lint/useless_assignment_spec.rb +1 -1
  303. data/spec/rubocop/cop/lint/useless_comparison_spec.rb +1 -1
  304. data/spec/rubocop/cop/lint/useless_else_without_rescue_spec.rb +1 -1
  305. data/spec/rubocop/cop/lint/useless_setter_call_spec.rb +1 -1
  306. data/spec/rubocop/cop/lint/void_spec.rb +1 -1
  307. data/spec/rubocop/cop/offense_spec.rb +2 -2
  308. data/spec/rubocop/cop/rails/action_filter_spec.rb +1 -1
  309. data/spec/rubocop/cop/rails/default_scope_spec.rb +1 -1
  310. data/spec/rubocop/cop/rails/delegate_spec.rb +1 -1
  311. data/spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb +1 -1
  312. data/spec/rubocop/cop/rails/output_spec.rb +1 -1
  313. data/spec/rubocop/cop/rails/read_write_attribute_spec.rb +1 -1
  314. data/spec/rubocop/cop/rails/scope_args_spec.rb +1 -1
  315. data/spec/rubocop/cop/rails/validation_spec.rb +1 -1
  316. data/spec/rubocop/cop/severity_spec.rb +1 -1
  317. data/spec/rubocop/cop/style/access_modifier_indentation_spec.rb +1 -1
  318. data/spec/rubocop/cop/style/accessor_method_name_spec.rb +1 -1
  319. data/spec/rubocop/cop/style/alias_spec.rb +1 -1
  320. data/spec/rubocop/cop/style/align_array_spec.rb +33 -1
  321. data/spec/rubocop/cop/style/align_hash_spec.rb +1 -1
  322. data/spec/rubocop/cop/style/align_parameters_spec.rb +1 -1
  323. data/spec/rubocop/cop/style/and_or_spec.rb +1 -1
  324. data/spec/rubocop/cop/style/array_join_spec.rb +1 -1
  325. data/spec/rubocop/cop/style/ascii_comments_spec.rb +1 -1
  326. data/spec/rubocop/cop/style/ascii_identifiers_spec.rb +1 -1
  327. data/spec/rubocop/cop/style/attr_spec.rb +1 -1
  328. data/spec/rubocop/cop/style/begin_block_spec.rb +1 -1
  329. data/spec/rubocop/cop/style/block_comments_spec.rb +25 -1
  330. data/spec/rubocop/cop/style/block_nesting_spec.rb +1 -1
  331. data/spec/rubocop/cop/style/blocks_spec.rb +1 -1
  332. data/spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb +1 -1
  333. data/spec/rubocop/cop/style/case_equality_spec.rb +1 -1
  334. data/spec/rubocop/cop/style/case_indentation_spec.rb +4 -4
  335. data/spec/rubocop/cop/style/character_literal_spec.rb +1 -1
  336. data/spec/rubocop/cop/style/class_and_module_camel_case_spec.rb +1 -1
  337. data/spec/rubocop/cop/style/class_and_module_children_spec.rb +1 -1
  338. data/spec/rubocop/cop/style/class_length_spec.rb +1 -1
  339. data/spec/rubocop/cop/style/class_methods_spec.rb +1 -1
  340. data/spec/rubocop/cop/style/class_vars_spec.rb +1 -1
  341. data/spec/rubocop/cop/style/collection_methods_spec.rb +1 -1
  342. data/spec/rubocop/cop/style/colon_method_call_spec.rb +1 -1
  343. data/spec/rubocop/cop/style/comment_annotation_spec.rb +2 -2
  344. data/spec/rubocop/cop/style/comment_indentation_spec.rb +1 -1
  345. data/spec/rubocop/cop/style/constant_name_spec.rb +2 -2
  346. data/spec/rubocop/cop/style/cyclomatic_complexity_spec.rb +1 -1
  347. data/spec/rubocop/cop/style/def_with_parentheses_spec.rb +1 -1
  348. data/spec/rubocop/cop/style/deprecated_hash_methods_spec.rb +1 -1
  349. data/spec/rubocop/cop/style/documentation_spec.rb +26 -2
  350. data/spec/rubocop/cop/style/dot_position_spec.rb +1 -1
  351. data/spec/rubocop/cop/style/double_negation_spec.rb +1 -1
  352. data/spec/rubocop/cop/style/each_with_object_spec.rb +31 -7
  353. data/spec/rubocop/cop/style/empty_line_between_defs_spec.rb +1 -1
  354. data/spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb +1 -1
  355. data/spec/rubocop/cop/style/empty_lines_around_body_spec.rb +1 -1
  356. data/spec/rubocop/cop/style/empty_lines_spec.rb +1 -1
  357. data/spec/rubocop/cop/style/empty_literal_spec.rb +1 -1
  358. data/spec/rubocop/cop/style/encoding_spec.rb +1 -1
  359. data/spec/rubocop/cop/style/end_block_spec.rb +1 -1
  360. data/spec/rubocop/cop/style/end_of_line_spec.rb +13 -1
  361. data/spec/rubocop/cop/style/even_odd_spec.rb +1 -1
  362. data/spec/rubocop/cop/style/file_name_spec.rb +2 -2
  363. data/spec/rubocop/cop/style/flip_flop_spec.rb +1 -1
  364. data/spec/rubocop/cop/style/for_spec.rb +1 -1
  365. data/spec/rubocop/cop/style/format_string_spec.rb +1 -1
  366. data/spec/rubocop/cop/style/global_vars_spec.rb +1 -1
  367. data/spec/rubocop/cop/style/guard_clause_spec.rb +1 -1
  368. data/spec/rubocop/cop/style/hash_syntax_spec.rb +9 -5
  369. data/spec/rubocop/cop/style/if_unless_modifier_spec.rb +6 -6
  370. data/spec/rubocop/cop/style/if_with_semicolon_spec.rb +1 -1
  371. data/spec/rubocop/cop/style/indent_array_spec.rb +37 -2
  372. data/spec/rubocop/cop/style/indent_hash_spec.rb +64 -8
  373. data/spec/rubocop/cop/style/indentation_consistency_spec.rb +1 -1
  374. data/spec/rubocop/cop/style/indentation_width_spec.rb +84 -21
  375. data/spec/rubocop/cop/style/inline_comment_spec.rb +13 -0
  376. data/spec/rubocop/cop/style/lambda_call_spec.rb +1 -1
  377. data/spec/rubocop/cop/style/lambda_spec.rb +1 -1
  378. data/spec/rubocop/cop/style/leading_comment_space_spec.rb +1 -1
  379. data/spec/rubocop/cop/style/line_end_concatenation_spec.rb +1 -1
  380. data/spec/rubocop/cop/style/line_length_spec.rb +1 -1
  381. data/spec/rubocop/cop/style/method_call_parentheses_spec.rb +3 -3
  382. data/spec/rubocop/cop/style/method_called_on_do_end_block_spec.rb +1 -1
  383. data/spec/rubocop/cop/style/method_def_parentheses_spec.rb +1 -1
  384. data/spec/rubocop/cop/style/method_length_spec.rb +1 -1
  385. data/spec/rubocop/cop/style/method_name_spec.rb +1 -1
  386. data/spec/rubocop/cop/style/module_function_spec.rb +1 -1
  387. data/spec/rubocop/cop/style/multiline_block_chain_spec.rb +1 -1
  388. data/spec/rubocop/cop/style/multiline_if_then_spec.rb +1 -1
  389. data/spec/rubocop/cop/style/multiline_ternary_operator_spec.rb +1 -1
  390. data/spec/rubocop/cop/style/negated_if_spec.rb +1 -1
  391. data/spec/rubocop/cop/style/negated_while_spec.rb +1 -1
  392. data/spec/rubocop/cop/style/nested_ternary_operator_spec.rb +1 -1
  393. data/spec/rubocop/cop/style/next_spec.rb +10 -1
  394. data/spec/rubocop/cop/style/nil_comparison_spec.rb +1 -1
  395. data/spec/rubocop/cop/style/non_nil_check_spec.rb +1 -1
  396. data/spec/rubocop/cop/style/not_spec.rb +1 -1
  397. data/spec/rubocop/cop/style/numeric_literals_spec.rb +1 -1
  398. data/spec/rubocop/cop/style/one_line_conditional_spec.rb +1 -1
  399. data/spec/rubocop/cop/style/op_method_spec.rb +1 -1
  400. data/spec/rubocop/cop/style/parameter_lists_spec.rb +1 -1
  401. data/spec/rubocop/cop/style/parentheses_around_condition_spec.rb +16 -1
  402. data/spec/rubocop/cop/style/percent_literal_delimiters_spec.rb +1 -1
  403. data/spec/rubocop/cop/style/perl_backrefs_spec.rb +1 -1
  404. data/spec/rubocop/cop/style/predicate_name_spec.rb +1 -1
  405. data/spec/rubocop/cop/style/proc_spec.rb +1 -1
  406. data/spec/rubocop/cop/style/raise_args_spec.rb +1 -1
  407. data/spec/rubocop/cop/style/redundant_begin_spec.rb +1 -1
  408. data/spec/rubocop/cop/style/redundant_exception_spec.rb +1 -1
  409. data/spec/rubocop/cop/style/redundant_return_spec.rb +1 -1
  410. data/spec/rubocop/cop/style/redundant_self_spec.rb +1 -1
  411. data/spec/rubocop/cop/style/regexp_literal_spec.rb +15 -1
  412. data/spec/rubocop/cop/style/rescue_modifier_spec.rb +1 -1
  413. data/spec/rubocop/cop/style/self_assignment_spec.rb +1 -1
  414. data/spec/rubocop/cop/style/semicolon_spec.rb +1 -1
  415. data/spec/rubocop/cop/style/signal_exception_spec.rb +1 -1
  416. data/spec/rubocop/cop/style/single_line_block_params_spec.rb +1 -1
  417. data/spec/rubocop/cop/style/single_line_methods_spec.rb +1 -1
  418. data/spec/rubocop/cop/style/single_space_before_first_arg_spec.rb +1 -1
  419. data/spec/rubocop/cop/style/space_after_colon_spec.rb +1 -1
  420. data/spec/rubocop/cop/style/space_after_comma_spec.rb +1 -1
  421. data/spec/rubocop/cop/style/space_after_control_keyword_spec.rb +1 -1
  422. data/spec/rubocop/cop/style/space_after_method_name_spec.rb +1 -1
  423. data/spec/rubocop/cop/style/space_after_not_spec.rb +1 -1
  424. data/spec/rubocop/cop/style/space_after_semicolon_spec.rb +1 -1
  425. data/spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb +1 -1
  426. data/spec/rubocop/cop/style/space_around_operators_spec.rb +1 -1
  427. data/spec/rubocop/cop/style/space_before_block_braces_spec.rb +5 -5
  428. data/spec/rubocop/cop/style/space_before_comment_spec.rb +1 -1
  429. data/spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb +1 -1
  430. data/spec/rubocop/cop/style/space_inside_block_braces_spec.rb +7 -7
  431. data/spec/rubocop/cop/style/space_inside_brackets_spec.rb +1 -1
  432. data/spec/rubocop/cop/style/space_inside_hash_literal_braces_spec.rb +1 -1
  433. data/spec/rubocop/cop/style/space_inside_parens_spec.rb +1 -1
  434. data/spec/rubocop/cop/style/special_global_vars_spec.rb +1 -1
  435. data/spec/rubocop/cop/style/string_literals_spec.rb +1 -1
  436. data/spec/rubocop/cop/style/symbol_array_spec.rb +1 -1
  437. data/spec/rubocop/cop/style/tab_spec.rb +1 -1
  438. data/spec/rubocop/cop/style/trailing_blank_lines_spec.rb +1 -1
  439. data/spec/rubocop/cop/style/trailing_comma_spec.rb +36 -10
  440. data/spec/rubocop/cop/style/trailing_whitespace_spec.rb +1 -1
  441. data/spec/rubocop/cop/style/trivial_accessors_spec.rb +51 -3
  442. data/spec/rubocop/cop/style/unless_else_spec.rb +1 -1
  443. data/spec/rubocop/cop/style/unneeded_capital_w_spec.rb +1 -1
  444. data/spec/rubocop/cop/style/unneeded_percent_x_spec.rb +1 -1
  445. data/spec/rubocop/cop/style/variable_interpolation_spec.rb +1 -1
  446. data/spec/rubocop/cop/style/variable_name_spec.rb +1 -1
  447. data/spec/rubocop/cop/style/when_then_spec.rb +1 -1
  448. data/spec/rubocop/cop/style/while_until_do_spec.rb +1 -1
  449. data/spec/rubocop/cop/style/while_until_modifier_spec.rb +6 -6
  450. data/spec/rubocop/cop/style/word_array_spec.rb +1 -1
  451. data/spec/rubocop/cop/team_spec.rb +23 -23
  452. data/spec/rubocop/cop/util_spec.rb +1 -1
  453. data/spec/rubocop/cop/variable_force/assignment_spec.rb +4 -4
  454. data/spec/rubocop/cop/variable_force/locatable_spec.rb +4 -4
  455. data/spec/rubocop/cop/variable_force/scope_spec.rb +3 -3
  456. data/spec/rubocop/cop/variable_force/variable_spec.rb +2 -2
  457. data/spec/rubocop/cop/variable_force/variable_table_spec.rb +1 -1
  458. data/spec/rubocop/cop/variable_force_spec.rb +1 -1
  459. data/spec/rubocop/file_inspector_spec.rb +3 -3
  460. data/spec/rubocop/formatter/base_formatter_spec.rb +2 -2
  461. data/spec/rubocop/formatter/clang_style_formatter_spec.rb +1 -1
  462. data/spec/rubocop/formatter/colorizable_spec.rb +1 -1
  463. data/spec/rubocop/formatter/disabled_config_formatter_spec.rb +3 -3
  464. data/spec/rubocop/formatter/disabled_lines_formatter_spec.rb +1 -1
  465. data/spec/rubocop/formatter/emacs_style_formatter_spec.rb +1 -1
  466. data/spec/rubocop/formatter/file_list_formatter_spec.rb +1 -1
  467. data/spec/rubocop/formatter/formatter_set_spec.rb +5 -5
  468. data/spec/rubocop/formatter/fuubar_style_formatter_spec.rb +1 -1
  469. data/spec/rubocop/formatter/json_formatter_spec.rb +1 -1
  470. data/spec/rubocop/formatter/offense_count_formatter_spec.rb +1 -1
  471. data/spec/rubocop/formatter/progress_formatter_spec.rb +1 -1
  472. data/spec/rubocop/formatter/simple_text_formatter_spec.rb +1 -1
  473. data/spec/rubocop/options_spec.rb +5 -5
  474. data/spec/rubocop/path_util_spec.rb +1 -1
  475. data/spec/rubocop/processed_source_spec.rb +1 -1
  476. data/spec/rubocop/source_parser_spec.rb +3 -3
  477. data/spec/rubocop/target_finder_spec.rb +2 -2
  478. data/spec/rubocop/token_spec.rb +1 -1
  479. data/spec/spec_helper.rb +8 -8
  480. data/spec/support/isolated_environment.rb +1 -1
  481. data/spec/support/mri_syntax_checker.rb +1 -1
  482. data/spec/support/offenses_matcher.rb +30 -0
  483. data/spec/support/shared_context.rb +3 -3
  484. metadata +8 -2
@@ -163,6 +163,7 @@ require 'rubocop/cop/style/indent_array'
163
163
  require 'rubocop/cop/style/indent_hash'
164
164
  require 'rubocop/cop/style/indentation_consistency'
165
165
  require 'rubocop/cop/style/indentation_width'
166
+ require 'rubocop/cop/style/inline_comment'
166
167
  require 'rubocop/cop/style/lambda'
167
168
  require 'rubocop/cop/style/lambda_call'
168
169
  require 'rubocop/cop/style/leading_comment_space'
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  # The CLI is a class responsible of handling all the command line interface
5
5
  # logic.
6
6
  class CLI
@@ -34,6 +34,10 @@ module Rubocop
34
34
  inspector.display_error_summary
35
35
 
36
36
  !any_failed && !wants_to_quit ? 0 : 1
37
+ rescue Cop::AmbiguousCopName => e
38
+ $stderr.puts "Ambiguous cop name #{e.message} needs namespace " \
39
+ 'qualifier.'
40
+ return 1
37
41
  rescue => e
38
42
  $stderr.puts e.message
39
43
  $stderr.puts e.backtrace
@@ -65,8 +69,8 @@ module Rubocop
65
69
  def handle_exiting_options
66
70
  return unless Options::EXITING_OPTIONS.any? { |o| @options.key? o }
67
71
 
68
- puts Rubocop::Version.version(false) if @options[:version]
69
- puts Rubocop::Version.version(true) if @options[:verbose_version]
72
+ puts RuboCop::Version.version(false) if @options[:version]
73
+ puts RuboCop::Version.version(true) if @options[:verbose_version]
70
74
  print_available_cops if @options[:show_cops]
71
75
  exit(0)
72
76
  end
@@ -1,11 +1,11 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  # This class parses the special `rubocop:disable` comments in a source
5
5
  # and provides a way to check if each cop is enabled at arbitrary line.
6
6
  class CommentConfig
7
7
  COMMENT_DIRECTIVE_REGEXP = Regexp.new(
8
- '\A# rubocop : ((?:dis|en)able)\b ((?:\w+,? )+)'.gsub(' ', '\s*')
8
+ '\A# rubocop : ((?:dis|en)able)\b ((?:[\w/]+,? )+)'.gsub(' ', '\s*')
9
9
  )
10
10
 
11
11
  attr_reader :processed_source
@@ -75,6 +75,8 @@ module Rubocop
75
75
  single_line = !comment_only_line?(comment_line_number)
76
76
 
77
77
  cop_names.each do |cop_name|
78
+ cop_name = Cop::Cop.qualified_cop_name(cop_name,
79
+ processed_source.buffer.name)
78
80
  yield cop_name, disabled, comment_line_number, single_line
79
81
  end
80
82
  end
@@ -3,7 +3,7 @@
3
3
  require 'delegate'
4
4
  require 'pathname'
5
5
 
6
- module Rubocop
6
+ module RuboCop
7
7
  # This class represents the configuration of the RuboCop application
8
8
  # and all its cops. A Config is associated with a YAML configuration
9
9
  # file from which it was read. Several different Configs can be used
@@ -66,7 +66,8 @@ module Rubocop
66
66
 
67
67
  def for_cop(cop)
68
68
  cop = cop.cop_name if cop.respond_to?(:cop_name)
69
- self[cop]
69
+ @for_cop ||= {}
70
+ @for_cop[cop] ||= self[Cop::Cop.qualified_cop_name(cop, loaded_path)]
70
71
  end
71
72
 
72
73
  def cop_enabled?(cop)
@@ -79,10 +80,21 @@ module Rubocop
79
80
  warn "Warning: #{e.message}".color(:red)
80
81
  end
81
82
 
83
+ def add_missing_namespaces
84
+ keys.each do |k|
85
+ q = Cop::Cop.qualified_cop_name(k, loaded_path)
86
+ next if q == k
87
+
88
+ self[q] = self[k]
89
+ delete(k)
90
+ end
91
+ end
92
+
82
93
  # TODO: This should be a private method
83
94
  def validate
84
95
  # Don't validate RuboCop's own files. Avoids inifinite recursion.
85
- return if @loaded_path.start_with?(ConfigLoader::RUBOCOP_HOME)
96
+ return if @loaded_path.start_with?(File.join(ConfigLoader::RUBOCOP_HOME,
97
+ 'config'))
86
98
 
87
99
  default_config = ConfigLoader.default_configuration
88
100
 
@@ -5,10 +5,12 @@ require 'pathname'
5
5
 
6
6
  # Psych can give an error when reading an empty file, so we use syck in Ruby
7
7
  # versions where it's available. Also, the problem with empty files does not
8
- # appear in Ruby 2.
9
- YAML::ENGINE.yamler = 'syck' if RUBY_VERSION < '2.0.0'
8
+ # appear in Ruby 2 or in JRuby 1.9 mode.
9
+ if RUBY_VERSION < '2.0.0' && RUBY_PLATFORM != 'java'
10
+ YAML::ENGINE.yamler = 'syck'
11
+ end
10
12
 
11
- module Rubocop
13
+ module RuboCop
12
14
  # This class represents the configuration of the RuboCop application
13
15
  # and all its cops. A Config is associated with a YAML configuration
14
16
  # file from which it was read. Several different Configs can be used
@@ -34,6 +36,8 @@ module Rubocop
34
36
 
35
37
  resolve_inheritance(path, hash)
36
38
 
39
+ Array(hash.delete('require')).each { |r| require(r) }
40
+
37
41
  hash.delete('inherit_from')
38
42
  config = Config.new(hash, path)
39
43
 
@@ -41,6 +45,7 @@ module Rubocop
41
45
  warn("#{path} - #{deprecation_message}")
42
46
  end
43
47
 
48
+ config.add_missing_namespaces
44
49
  config.warn_unless_valid
45
50
  config.make_excludes_absolute
46
51
  config
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  # Handles caching of configurations and association of inspected
5
5
  # ruby files to configurations.
6
6
  class ConfigStore
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  # Commissioner class is responsible for processing the AST and delegating
6
6
  # work to the specified cops.
@@ -1,8 +1,9 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  class CorrectionNotPossible < Exception; end
6
+ class AmbiguousCopName < Exception; end
6
7
 
7
8
  # Store for all cops with helper functions
8
9
  class CopStore < ::Array
@@ -56,6 +57,19 @@ module Rubocop
56
57
  @all.clone
57
58
  end
58
59
 
60
+ def self.qualified_cop_name(name, origin)
61
+ return name if name.include?('/')
62
+ found_ns = @all.types.map(&:capitalize).select do |ns|
63
+ @all.map(&:cop_name).include?("#{ns}/#{name}")
64
+ end
65
+
66
+ case found_ns.size
67
+ when 0 then name # No namespace found. Deal with it later in caller.
68
+ when 1 then "#{found_ns.first}/#{name}"
69
+ else fail AmbiguousCopName, "`#{name}` used in #{origin}"
70
+ end
71
+ end
72
+
59
73
  def self.non_rails
60
74
  @all.without_type(:rails)
61
75
  end
@@ -65,7 +79,7 @@ module Rubocop
65
79
  end
66
80
 
67
81
  def self.cop_name
68
- name.to_s.split('::').last
82
+ @cop_name ||= name.to_s.split('::').last(2).join('/')
69
83
  end
70
84
 
71
85
  def self.cop_type
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  # This class takes a source buffer and rewrite its source
6
6
  # based on the different correction rules supplied.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  # A scaffold for concrete forces.
6
6
  class Force
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  # Handles adding and checking ignored nodes.
6
6
  module IgnoredNode
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for ambiguous operators in the first argument of a
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for ambiguous regexp literals in the first argument of
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for assignments in the conditions of
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks whether the end keywords are aligned properly for do
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for conditions that are not on the same line as
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for calls to debugger or pry.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for uses of the deprecated class method usages.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for odd else block layout - like
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for empty `ensure` blocks
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for empty interpolation.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks whether the end keywords are aligned properly.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for END blocks in method definitions.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for *return* from an *ensure* block.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for the use of *Kernel#eval*.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for *rescue* blocks with no body.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for invalid character literals with a non-escaped
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for literals used as the conditions or as
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for interpolated literals.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for uses of *begin...end while/until something*.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # Checks for space between a the name of a called method and a left
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for expressions where there is a call to a predicate
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for *rescue* blocks targeting the Exception class.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop looks for use of the same name as outer local variables
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # Checks for space between a method name and the first argument for
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This cop checks for string conversion in string interpolation,
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Cop
5
5
  module Lint
6
6
  # This is actually not a cop and inspects nothing. It just provides