rubocop 0.18.1 → 0.19.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 (398) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +65 -1
  4. data/Gemfile +0 -3
  5. data/LICENSE.txt +1 -1
  6. data/README.md +179 -77
  7. data/Rakefile +8 -0
  8. data/config/default.yml +151 -14
  9. data/config/enabled.yml +65 -8
  10. data/lib/rubocop.rb +19 -4
  11. data/lib/rubocop/cli.rb +2 -1
  12. data/lib/rubocop/comment_config.rb +97 -0
  13. data/lib/rubocop/config.rb +1 -1
  14. data/lib/rubocop/config_loader.rb +3 -2
  15. data/lib/rubocop/config_store.rb +6 -2
  16. data/lib/rubocop/cop/commissioner.rb +2 -2
  17. data/lib/rubocop/cop/cop.rb +22 -26
  18. data/lib/rubocop/cop/lint/ambiguous_operator.rb +2 -2
  19. data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +1 -1
  20. data/lib/rubocop/cop/lint/assignment_in_condition.rb +1 -1
  21. data/lib/rubocop/cop/lint/block_alignment.rb +6 -6
  22. data/lib/rubocop/cop/lint/condition_position.rb +1 -1
  23. data/lib/rubocop/cop/lint/debugger.rb +1 -1
  24. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +60 -0
  25. data/lib/rubocop/cop/lint/else_layout.rb +1 -1
  26. data/lib/rubocop/cop/lint/empty_ensure.rb +1 -1
  27. data/lib/rubocop/cop/lint/end_alignment.rb +14 -12
  28. data/lib/rubocop/cop/lint/end_in_method.rb +1 -1
  29. data/lib/rubocop/cop/lint/ensure_return.rb +1 -1
  30. data/lib/rubocop/cop/lint/eval.rb +1 -1
  31. data/lib/rubocop/cop/lint/handle_exceptions.rb +1 -1
  32. data/lib/rubocop/cop/lint/literal_in_condition.rb +13 -2
  33. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +28 -0
  34. data/lib/rubocop/cop/lint/loop.rb +4 -4
  35. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +1 -1
  36. data/lib/rubocop/cop/lint/require_parentheses.rb +6 -6
  37. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
  38. data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +2 -2
  39. data/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +30 -0
  40. data/lib/rubocop/cop/lint/syntax.rb +5 -5
  41. data/lib/rubocop/cop/lint/unreachable_code.rb +1 -1
  42. data/lib/rubocop/cop/lint/useless_assignment.rb +5 -5
  43. data/lib/rubocop/cop/lint/useless_comparison.rb +1 -1
  44. data/lib/rubocop/cop/lint/useless_setter_call.rb +1 -1
  45. data/lib/rubocop/cop/lint/void.rb +5 -5
  46. data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +8 -5
  47. data/lib/rubocop/cop/mixin/code_length.rb +2 -2
  48. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +7 -7
  49. data/lib/rubocop/cop/mixin/configurable_max.rb +1 -1
  50. data/lib/rubocop/cop/mixin/configurable_naming.rb +1 -1
  51. data/lib/rubocop/cop/mixin/if_then_else.rb +1 -1
  52. data/lib/rubocop/cop/mixin/negative_conditional.rb +1 -1
  53. data/lib/rubocop/cop/mixin/parser_diagnostic.rb +2 -2
  54. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +3 -2
  55. data/lib/rubocop/cop/mixin/space_inside.rb +1 -1
  56. data/lib/rubocop/cop/mixin/statement_modifier.rb +1 -0
  57. data/lib/rubocop/cop/mixin/string_help.rb +4 -4
  58. data/lib/rubocop/cop/{offence.rb → offense.rb} +7 -7
  59. data/lib/rubocop/cop/rails/action_filter.rb +73 -0
  60. data/lib/rubocop/cop/rails/default_scope.rb +1 -1
  61. data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +1 -1
  62. data/lib/rubocop/cop/rails/output.rb +1 -10
  63. data/lib/rubocop/cop/rails/read_attribute.rb +1 -1
  64. data/lib/rubocop/cop/rails/scope_args.rb +33 -0
  65. data/lib/rubocop/cop/rails/validation.rb +1 -1
  66. data/lib/rubocop/cop/style/access_modifier_indentation.rb +1 -1
  67. data/lib/rubocop/cop/style/accessor_method_name.rb +2 -2
  68. data/lib/rubocop/cop/style/alias.rb +2 -2
  69. data/lib/rubocop/cop/style/align_array.rb +1 -1
  70. data/lib/rubocop/cop/style/align_hash.rb +29 -2
  71. data/lib/rubocop/cop/style/align_parameters.rb +16 -2
  72. data/lib/rubocop/cop/style/and_or.rb +2 -2
  73. data/lib/rubocop/cop/style/ascii_comments.rb +1 -1
  74. data/lib/rubocop/cop/style/ascii_identifiers.rb +1 -1
  75. data/lib/rubocop/cop/style/attr.rb +1 -1
  76. data/lib/rubocop/cop/style/begin_block.rb +1 -1
  77. data/lib/rubocop/cop/style/block_comments.rb +1 -1
  78. data/lib/rubocop/cop/style/block_nesting.rb +1 -1
  79. data/lib/rubocop/cop/style/blocks.rb +2 -2
  80. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +2 -2
  81. data/lib/rubocop/cop/style/case_equality.rb +1 -1
  82. data/lib/rubocop/cop/style/case_indentation.rb +2 -2
  83. data/lib/rubocop/cop/style/character_literal.rb +2 -2
  84. data/lib/rubocop/cop/style/class_and_module_camel_case.rb +1 -1
  85. data/lib/rubocop/cop/style/class_and_module_children.rb +69 -0
  86. data/lib/rubocop/cop/style/class_methods.rb +1 -1
  87. data/lib/rubocop/cop/style/class_vars.rb +3 -3
  88. data/lib/rubocop/cop/style/collection_methods.rb +4 -4
  89. data/lib/rubocop/cop/style/colon_method_call.rb +1 -1
  90. data/lib/rubocop/cop/style/comment_annotation.rb +1 -1
  91. data/lib/rubocop/cop/style/constant_name.rb +1 -1
  92. data/lib/rubocop/cop/style/cyclomatic_complexity.rb +2 -2
  93. data/lib/rubocop/cop/style/def_parentheses.rb +2 -2
  94. data/lib/rubocop/cop/style/documentation.rb +1 -1
  95. data/lib/rubocop/cop/style/dot_position.rb +10 -11
  96. data/lib/rubocop/cop/style/double_negation.rb +40 -0
  97. data/lib/rubocop/cop/style/empty_line_between_defs.rb +8 -1
  98. data/lib/rubocop/cop/style/empty_lines.rb +3 -2
  99. data/lib/rubocop/cop/style/empty_lines_around_access_modifier.rb +1 -1
  100. data/lib/rubocop/cop/style/empty_lines_around_body.rb +1 -1
  101. data/lib/rubocop/cop/style/empty_literal.rb +3 -3
  102. data/lib/rubocop/cop/style/encoding.rb +1 -1
  103. data/lib/rubocop/cop/style/end_block.rb +1 -1
  104. data/lib/rubocop/cop/style/end_of_line.rb +2 -2
  105. data/lib/rubocop/cop/style/even_odd.rb +2 -2
  106. data/lib/rubocop/cop/style/favor_join.rb +1 -1
  107. data/lib/rubocop/cop/style/file_name.rb +29 -0
  108. data/lib/rubocop/cop/style/final_newline.rb +1 -1
  109. data/lib/rubocop/cop/style/flip_flop.rb +2 -2
  110. data/lib/rubocop/cop/style/for.rb +2 -2
  111. data/lib/rubocop/cop/style/format_string.rb +66 -0
  112. data/lib/rubocop/cop/style/global_vars.rb +2 -2
  113. data/lib/rubocop/cop/style/hash_methods.rb +1 -1
  114. data/lib/rubocop/cop/style/hash_syntax.rb +3 -3
  115. data/lib/rubocop/cop/style/if_unless_modifier.rb +2 -1
  116. data/lib/rubocop/cop/style/indent_array.rb +41 -0
  117. data/lib/rubocop/cop/style/indent_hash.rb +119 -0
  118. data/lib/rubocop/cop/style/indentation_consistency.rb +3 -11
  119. data/lib/rubocop/cop/style/indentation_width.rb +44 -23
  120. data/lib/rubocop/cop/style/lambda.rb +2 -2
  121. data/lib/rubocop/cop/style/lambda_call.rb +3 -3
  122. data/lib/rubocop/cop/style/leading_comment_space.rb +1 -1
  123. data/lib/rubocop/cop/style/line_end_concatenation.rb +7 -3
  124. data/lib/rubocop/cop/style/line_length.rb +2 -2
  125. data/lib/rubocop/cop/style/method_call_parentheses.rb +2 -2
  126. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +2 -2
  127. data/lib/rubocop/cop/style/method_def_parentheses.rb +9 -7
  128. data/lib/rubocop/cop/style/module_function.rb +1 -1
  129. data/lib/rubocop/cop/style/multiline_block_chain.rb +1 -1
  130. data/lib/rubocop/cop/style/multiline_ternary_operator.rb +1 -1
  131. data/lib/rubocop/cop/style/nested_ternary_operator.rb +2 -2
  132. data/lib/rubocop/cop/style/nil_comparison.rb +1 -1
  133. data/lib/rubocop/cop/style/not.rb +1 -1
  134. data/lib/rubocop/cop/style/numeric_literals.rb +5 -5
  135. data/lib/rubocop/cop/style/op_method.rb +2 -2
  136. data/lib/rubocop/cop/style/parameter_lists.rb +1 -1
  137. data/lib/rubocop/cop/style/parentheses_around_condition.rb +5 -4
  138. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +143 -0
  139. data/lib/rubocop/cop/style/perl_backrefs.rb +1 -1
  140. data/lib/rubocop/cop/style/predicate_name.rb +1 -1
  141. data/lib/rubocop/cop/style/proc.rb +1 -1
  142. data/lib/rubocop/cop/style/raise_args.rb +2 -2
  143. data/lib/rubocop/cop/style/redundant_begin.rb +1 -1
  144. data/lib/rubocop/cop/style/redundant_exception.rb +1 -1
  145. data/lib/rubocop/cop/style/redundant_return.rb +1 -1
  146. data/lib/rubocop/cop/style/redundant_self.rb +2 -2
  147. data/lib/rubocop/cop/style/regexp_literal.rb +45 -19
  148. data/lib/rubocop/cop/style/rescue_modifier.rb +1 -1
  149. data/lib/rubocop/cop/style/self_assignment.rb +73 -0
  150. data/lib/rubocop/cop/style/semicolon.rb +12 -8
  151. data/lib/rubocop/cop/style/signal_exception.rb +2 -2
  152. data/lib/rubocop/cop/style/single_line_block_params.rb +1 -1
  153. data/lib/rubocop/cop/style/single_line_methods.rb +38 -1
  154. data/lib/rubocop/cop/style/space_after_colon.rb +3 -3
  155. data/lib/rubocop/cop/style/space_after_comma.rb +1 -1
  156. data/lib/rubocop/cop/style/space_after_control_keyword.rb +1 -1
  157. data/lib/rubocop/cop/style/space_after_method_name.rb +11 -3
  158. data/lib/rubocop/cop/style/space_after_not.rb +1 -1
  159. data/lib/rubocop/cop/style/space_after_semicolon.rb +1 -1
  160. data/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb +41 -6
  161. data/lib/rubocop/cop/style/space_around_operators.rb +4 -4
  162. data/lib/rubocop/cop/style/space_before_block_braces.rb +63 -0
  163. data/lib/rubocop/cop/style/space_before_modifier_keyword.rb +1 -1
  164. data/lib/rubocop/cop/style/{space_around_block_braces.rb → space_inside_block_braces.rb} +15 -24
  165. data/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +14 -7
  166. data/lib/rubocop/cop/style/special_global_vars.rb +1 -1
  167. data/lib/rubocop/cop/style/string_literals.rb +1 -1
  168. data/lib/rubocop/cop/style/symbol_array.rb +1 -1
  169. data/lib/rubocop/cop/style/tab.rb +1 -1
  170. data/lib/rubocop/cop/style/trailing_blank_lines.rb +2 -2
  171. data/lib/rubocop/cop/style/trailing_comma.rb +4 -4
  172. data/lib/rubocop/cop/style/trailing_whitespace.rb +1 -1
  173. data/lib/rubocop/cop/style/trivial_accessors.rb +2 -2
  174. data/lib/rubocop/cop/style/unless_else.rb +1 -1
  175. data/lib/rubocop/cop/style/variable_interpolation.rb +1 -1
  176. data/lib/rubocop/cop/style/when_then.rb +1 -1
  177. data/lib/rubocop/cop/style/while_until_do.rb +1 -1
  178. data/lib/rubocop/cop/style/while_until_modifier.rb +2 -1
  179. data/lib/rubocop/cop/style/word_array.rb +2 -2
  180. data/lib/rubocop/cop/team.rb +24 -7
  181. data/lib/rubocop/cop/util.rb +3 -3
  182. data/lib/rubocop/cop/variable_inspector.rb +25 -13
  183. data/lib/rubocop/cop/variable_inspector/assignment.rb +1 -1
  184. data/lib/rubocop/cop/variable_inspector/reference.rb +1 -1
  185. data/lib/rubocop/cop/variable_inspector/scope.rb +1 -1
  186. data/lib/rubocop/cop/variable_inspector/variable.rb +2 -2
  187. data/lib/rubocop/cop/variable_inspector/variable_table.rb +1 -1
  188. data/lib/rubocop/file_inspector.rb +12 -13
  189. data/lib/rubocop/formatter/base_formatter.rb +4 -4
  190. data/lib/rubocop/formatter/clang_style_formatter.rb +2 -2
  191. data/lib/rubocop/formatter/disabled_config_formatter.rb +12 -12
  192. data/lib/rubocop/formatter/emacs_style_formatter.rb +3 -2
  193. data/lib/rubocop/formatter/file_list_formatter.rb +4 -4
  194. data/lib/rubocop/formatter/formatter_set.rb +2 -1
  195. data/lib/rubocop/formatter/fuubar_style_formatter.rb +76 -0
  196. data/lib/rubocop/formatter/json_formatter.rb +17 -16
  197. data/lib/rubocop/formatter/offense_count_formatter.rb +54 -0
  198. data/lib/rubocop/formatter/progress_formatter.rb +16 -16
  199. data/lib/rubocop/formatter/simple_text_formatter.rb +25 -25
  200. data/lib/rubocop/options.rb +8 -7
  201. data/lib/rubocop/processed_source.rb +3 -2
  202. data/lib/rubocop/source_parser.rb +1 -59
  203. data/lib/rubocop/version.rb +3 -3
  204. data/relnotes/0.19.0.md +70 -0
  205. data/rubocop-todo.yml +6 -6
  206. data/rubocop.gemspec +2 -1
  207. data/spec/rubocop/cli_spec.rb +431 -268
  208. data/spec/rubocop/comment_config_spec.rb +103 -0
  209. data/spec/rubocop/config_loader_spec.rb +4 -4
  210. data/spec/rubocop/cop/commissioner_spec.rb +7 -7
  211. data/spec/rubocop/cop/cop_spec.rb +17 -17
  212. data/spec/rubocop/cop/lint/ambiguous_operator_spec.rb +16 -16
  213. data/spec/rubocop/cop/lint/ambiguous_regexp_literal_spec.rb +5 -5
  214. data/spec/rubocop/cop/lint/assignment_in_condition_spec.rb +19 -19
  215. data/spec/rubocop/cop/lint/block_alignment_spec.rb +52 -52
  216. data/spec/rubocop/cop/lint/condition_position_spec.rb +7 -7
  217. data/spec/rubocop/cop/lint/debugger_spec.rb +10 -10
  218. data/spec/rubocop/cop/lint/deprecated_class_methods_spec.rb +33 -0
  219. data/spec/rubocop/cop/lint/else_layout_spec.rb +7 -7
  220. data/spec/rubocop/cop/lint/empty_ensure_spec.rb +4 -4
  221. data/spec/rubocop/cop/lint/end_alignment_spec.rb +33 -34
  222. data/spec/rubocop/cop/lint/end_in_method_spec.rb +5 -5
  223. data/spec/rubocop/cop/lint/ensure_return_spec.rb +4 -4
  224. data/spec/rubocop/cop/lint/eval_spec.rb +8 -8
  225. data/spec/rubocop/cop/lint/handle_exceptions_spec.rb +4 -4
  226. data/spec/rubocop/cop/lint/invalid_character_literal_spec.rb +3 -3
  227. data/spec/rubocop/cop/lint/literal_in_condition_spec.rb +65 -10
  228. data/spec/rubocop/cop/lint/literal_in_interpolation_spec.rb +21 -0
  229. data/spec/rubocop/cop/lint/loop_spec.rb +6 -6
  230. data/spec/rubocop/cop/lint/parentheses_as_grouped_expression_spec.rb +14 -14
  231. data/spec/rubocop/cop/lint/require_parentheses_spec.rb +15 -15
  232. data/spec/rubocop/cop/lint/rescue_exception_spec.rb +21 -21
  233. data/spec/rubocop/cop/lint/shadowing_outer_local_variable_spec.rb +16 -16
  234. data/spec/rubocop/cop/lint/string_conversion_in_interpolation_spec.rb +27 -0
  235. data/spec/rubocop/cop/lint/syntax_spec.rb +11 -11
  236. data/spec/rubocop/cop/lint/unreachable_code_spec.rb +8 -8
  237. data/spec/rubocop/cop/lint/useless_assignment_spec.rb +207 -169
  238. data/spec/rubocop/cop/lint/useless_comparison_spec.rb +5 -5
  239. data/spec/rubocop/cop/lint/useless_else_without_rescue_spec.rb +4 -4
  240. data/spec/rubocop/cop/lint/useless_setter_call_spec.rb +17 -17
  241. data/spec/rubocop/cop/lint/void_spec.rb +8 -8
  242. data/spec/rubocop/cop/{offence_spec.rb → offense_spec.rb} +17 -17
  243. data/spec/rubocop/cop/rails/action_filter_spec.rb +69 -0
  244. data/spec/rubocop/cop/rails/default_scope_spec.rb +9 -9
  245. data/spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb +2 -2
  246. data/spec/rubocop/cop/rails/output_spec.rb +8 -18
  247. data/spec/rubocop/cop/rails/read_attribute_spec.rb +2 -2
  248. data/spec/rubocop/cop/rails/scope_args_spec.rb +25 -0
  249. data/spec/rubocop/cop/rails/validation_spec.rb +3 -3
  250. data/spec/rubocop/cop/style/access_modifier_indentation_spec.rb +38 -38
  251. data/spec/rubocop/cop/style/accessor_method_name_spec.rb +14 -14
  252. data/spec/rubocop/cop/style/alias_spec.rb +11 -11
  253. data/spec/rubocop/cop/style/align_array_spec.rb +23 -7
  254. data/spec/rubocop/cop/style/align_hash_spec.rb +111 -30
  255. data/spec/rubocop/cop/style/align_parameters_spec.rb +260 -187
  256. data/spec/rubocop/cop/style/and_or_spec.rb +6 -6
  257. data/spec/rubocop/cop/style/ascii_comments_spec.rb +3 -3
  258. data/spec/rubocop/cop/style/ascii_identifiers_spec.rb +5 -5
  259. data/spec/rubocop/cop/style/attr_spec.rb +2 -2
  260. data/spec/rubocop/cop/style/begin_block_spec.rb +2 -2
  261. data/spec/rubocop/cop/style/block_comments_spec.rb +3 -3
  262. data/spec/rubocop/cop/style/block_nesting_spec.rb +26 -26
  263. data/spec/rubocop/cop/style/blocks_spec.rb +8 -8
  264. data/spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb +8 -8
  265. data/spec/rubocop/cop/style/case_equality_spec.rb +2 -2
  266. data/spec/rubocop/cop/style/case_indentation_spec.rb +21 -21
  267. data/spec/rubocop/cop/style/character_literal_spec.rb +6 -6
  268. data/spec/rubocop/cop/style/class_and_module_camel_case_spec.rb +4 -4
  269. data/spec/rubocop/cop/style/class_and_module_children_spec.rb +129 -0
  270. data/spec/rubocop/cop/style/class_length_spec.rb +9 -9
  271. data/spec/rubocop/cop/style/class_methods_spec.rb +8 -8
  272. data/spec/rubocop/cop/style/class_vars_spec.rb +4 -4
  273. data/spec/rubocop/cop/style/collection_methods_spec.rb +6 -6
  274. data/spec/rubocop/cop/style/colon_method_call_spec.rb +16 -16
  275. data/spec/rubocop/cop/style/comment_annotation_spec.rb +16 -16
  276. data/spec/rubocop/cop/style/constant_name_spec.rb +12 -12
  277. data/spec/rubocop/cop/style/cyclomatic_complexity_spec.rb +16 -16
  278. data/spec/rubocop/cop/style/def_with_parentheses_spec.rb +6 -6
  279. data/spec/rubocop/cop/style/documentation_spec.rb +14 -14
  280. data/spec/rubocop/cop/style/dot_position_spec.rb +23 -26
  281. data/spec/rubocop/cop/style/double_negation_spec.rb +22 -0
  282. data/spec/rubocop/cop/style/empty_line_between_defs_spec.rb +22 -14
  283. data/spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb +4 -4
  284. data/spec/rubocop/cop/style/empty_lines_around_body_spec.rb +20 -20
  285. data/spec/rubocop/cop/style/empty_lines_spec.rb +17 -6
  286. data/spec/rubocop/cop/style/empty_literal_spec.rb +20 -20
  287. data/spec/rubocop/cop/style/encoding_spec.rb +5 -5
  288. data/spec/rubocop/cop/style/end_block_spec.rb +2 -2
  289. data/spec/rubocop/cop/style/end_of_line_spec.rb +4 -4
  290. data/spec/rubocop/cop/style/even_odd_spec.rb +18 -18
  291. data/spec/rubocop/cop/style/favor_join_spec.rb +7 -7
  292. data/spec/rubocop/cop/style/favor_unless_over_negated_if_spec.rb +7 -7
  293. data/spec/rubocop/cop/style/favor_until_over_negated_while_spec.rb +3 -3
  294. data/spec/rubocop/cop/style/file_name_spec.rb +71 -0
  295. data/spec/rubocop/cop/style/final_newline_spec.rb +4 -4
  296. data/spec/rubocop/cop/style/flip_flop_spec.rb +4 -4
  297. data/spec/rubocop/cop/style/for_spec.rb +13 -13
  298. data/spec/rubocop/cop/style/format_string_spec.rb +136 -0
  299. data/spec/rubocop/cop/style/global_vars_spec.rb +7 -7
  300. data/spec/rubocop/cop/style/hash_methods_spec.rb +6 -6
  301. data/spec/rubocop/cop/style/hash_syntax_spec.rb +11 -11
  302. data/spec/rubocop/cop/style/if_unless_modifier_spec.rb +29 -11
  303. data/spec/rubocop/cop/style/if_with_semicolon_spec.rb +1 -1
  304. data/spec/rubocop/cop/style/indent_array_spec.rb +136 -0
  305. data/spec/rubocop/cop/style/indent_hash_spec.rb +238 -0
  306. data/spec/rubocop/cop/style/indentation_consistency_spec.rb +69 -49
  307. data/spec/rubocop/cop/style/indentation_width_spec.rb +264 -128
  308. data/spec/rubocop/cop/style/lambda_call_spec.rb +14 -14
  309. data/spec/rubocop/cop/style/lambda_spec.rb +7 -7
  310. data/spec/rubocop/cop/style/leading_comment_space_spec.rb +15 -15
  311. data/spec/rubocop/cop/style/line_end_concatenation_spec.rb +11 -4
  312. data/spec/rubocop/cop/style/line_length_spec.rb +5 -5
  313. data/spec/rubocop/cop/style/method_call_parentheses_spec.rb +5 -5
  314. data/spec/rubocop/cop/style/method_called_on_do_end_block_spec.rb +9 -9
  315. data/spec/rubocop/cop/style/method_def_parentheses_spec.rb +19 -19
  316. data/spec/rubocop/cop/style/method_length_spec.rb +17 -17
  317. data/spec/rubocop/cop/style/method_name_spec.rb +21 -21
  318. data/spec/rubocop/cop/style/module_function_spec.rb +3 -3
  319. data/spec/rubocop/cop/style/multiline_block_chain_spec.rb +13 -13
  320. data/spec/rubocop/cop/style/multiline_if_then_spec.rb +10 -10
  321. data/spec/rubocop/cop/style/multiline_ternary_operator_spec.rb +3 -3
  322. data/spec/rubocop/cop/style/nested_ternary_operator_spec.rb +3 -3
  323. data/spec/rubocop/cop/style/nil_comparison_spec.rb +7 -7
  324. data/spec/rubocop/cop/style/not_spec.rb +6 -11
  325. data/spec/rubocop/cop/style/numeric_literals_spec.rb +8 -8
  326. data/spec/rubocop/cop/style/one_line_conditional_spec.rb +1 -1
  327. data/spec/rubocop/cop/style/op_method_spec.rb +13 -13
  328. data/spec/rubocop/cop/style/parameter_lists_spec.rb +6 -6
  329. data/spec/rubocop/cop/style/parentheses_around_condition_spec.rb +11 -10
  330. data/spec/rubocop/cop/style/percent_literal_delimiters_spec.rb +250 -0
  331. data/spec/rubocop/cop/style/perl_backrefs_spec.rb +2 -2
  332. data/spec/rubocop/cop/style/predicate_name_spec.rb +3 -3
  333. data/spec/rubocop/cop/style/proc_spec.rb +4 -4
  334. data/spec/rubocop/cop/style/raise_args_spec.rb +20 -20
  335. data/spec/rubocop/cop/style/redundant_begin_spec.rb +6 -6
  336. data/spec/rubocop/cop/style/redundant_exception_spec.rb +6 -6
  337. data/spec/rubocop/cop/style/redundant_return_spec.rb +22 -22
  338. data/spec/rubocop/cop/style/redundant_self_spec.rb +14 -14
  339. data/spec/rubocop/cop/style/regexp_literal_spec.rb +88 -67
  340. data/spec/rubocop/cop/style/rescue_modifier_spec.rb +17 -17
  341. data/spec/rubocop/cop/style/self_assignment_spec.rb +43 -0
  342. data/spec/rubocop/cop/style/semicolon_spec.rb +31 -17
  343. data/spec/rubocop/cop/style/signal_exception_spec.rb +29 -29
  344. data/spec/rubocop/cop/style/single_line_block_params_spec.rb +6 -6
  345. data/spec/rubocop/cop/style/single_line_methods_spec.rb +44 -6
  346. data/spec/rubocop/cop/style/space_after_colon_spec.rb +1 -1
  347. data/spec/rubocop/cop/style/space_after_comma_spec.rb +3 -3
  348. data/spec/rubocop/cop/style/space_after_control_keyword_spec.rb +12 -12
  349. data/spec/rubocop/cop/style/space_after_method_name_spec.rb +8 -8
  350. data/spec/rubocop/cop/style/space_after_not_spec.rb +3 -3
  351. data/spec/rubocop/cop/style/space_after_semicolon_spec.rb +1 -1
  352. data/spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb +63 -21
  353. data/spec/rubocop/cop/style/space_around_operators_spec.rb +24 -24
  354. data/spec/rubocop/cop/style/space_before_block_braces_spec.rb +72 -0
  355. data/spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb +4 -4
  356. data/spec/rubocop/cop/style/{space_around_block_braces_spec.rb → space_inside_block_braces_spec.rb} +39 -41
  357. data/spec/rubocop/cop/style/space_inside_brackets_spec.rb +1 -1
  358. data/spec/rubocop/cop/style/space_inside_hash_literal_braces_spec.rb +15 -15
  359. data/spec/rubocop/cop/style/space_inside_parens_spec.rb +1 -1
  360. data/spec/rubocop/cop/style/special_global_vars_spec.rb +10 -10
  361. data/spec/rubocop/cop/style/string_literals_spec.rb +31 -31
  362. data/spec/rubocop/cop/style/symbol_array_spec.rb +9 -9
  363. data/spec/rubocop/cop/style/tab_spec.rb +3 -3
  364. data/spec/rubocop/cop/style/trailing_blank_lines_spec.rb +3 -3
  365. data/spec/rubocop/cop/style/trailing_comma_spec.rb +32 -32
  366. data/spec/rubocop/cop/style/trailing_whitespace_spec.rb +5 -5
  367. data/spec/rubocop/cop/style/trivial_accessors_spec.rb +39 -39
  368. data/spec/rubocop/cop/style/unless_else_spec.rb +1 -1
  369. data/spec/rubocop/cop/style/variable_interpolation_spec.rb +12 -12
  370. data/spec/rubocop/cop/style/variable_name_spec.rb +21 -21
  371. data/spec/rubocop/cop/style/when_then_spec.rb +1 -1
  372. data/spec/rubocop/cop/style/while_until_do_spec.rb +8 -8
  373. data/spec/rubocop/cop/style/while_until_modifier_spec.rb +25 -7
  374. data/spec/rubocop/cop/style/word_array_spec.rb +23 -23
  375. data/spec/rubocop/cop/team_spec.rb +14 -14
  376. data/spec/rubocop/file_inspector_spec.rb +14 -12
  377. data/spec/rubocop/formatter/base_formatter_spec.rb +19 -19
  378. data/spec/rubocop/formatter/clang_style_formatter_spec.rb +14 -14
  379. data/spec/rubocop/formatter/disabled_config_formatter_spec.rb +7 -7
  380. data/spec/rubocop/formatter/emacs_style_formatter_spec.rb +7 -7
  381. data/spec/rubocop/formatter/file_list_formatter_spec.rb +4 -4
  382. data/spec/rubocop/formatter/fuubar_style_formatter_spec.rb +129 -0
  383. data/spec/rubocop/formatter/json_formatter_spec.rb +23 -19
  384. data/spec/rubocop/formatter/offense_count_formatter_spec.rb +77 -0
  385. data/spec/rubocop/formatter/progress_formatter_spec.rb +27 -27
  386. data/spec/rubocop/formatter/simple_text_formatter_spec.rb +16 -16
  387. data/spec/rubocop/options_spec.rb +7 -8
  388. data/spec/rubocop/source_parser_spec.rb +0 -54
  389. data/spec/spec_helper.rb +11 -7
  390. data/spec/support/file_helper.rb +1 -1
  391. data/spec/support/mri_syntax_checker.rb +4 -4
  392. data/spec/support/shared_examples.rb +6 -6
  393. data/spec/support/statement_modifier_helper.rb +3 -3
  394. metadata +76 -16
  395. data/lib/rubocop/cop/style/favor_sprintf.rb +0 -26
  396. data/lib/rubocop/formatter/offence_count_formatter.rb +0 -49
  397. data/spec/rubocop/cop/style/favor_sprintf_spec.rb +0 -47
  398. data/spec/rubocop/formatter/offence_count_formatter_spec.rb +0 -52
data/Rakefile CHANGED
@@ -33,3 +33,11 @@ require 'yard'
33
33
  YARD::Rake::YardocTask.new
34
34
 
35
35
  Rubocop::RakeTask.new
36
+
37
+ task :console do
38
+ require 'irb'
39
+ require 'irb/completion'
40
+ require 'rubocop'
41
+ ARGV.clear
42
+ IRB.start
43
+ end
@@ -11,7 +11,8 @@ AllCops:
11
11
  Includes:
12
12
  - '**/*.gemspec'
13
13
  - '**/Rakefile'
14
- Excludes: []
14
+ Excludes:
15
+ - 'vendor/**'
15
16
  # By default, the rails cops are not run. Override in project or home
16
17
  # directory .rubocop.yml files, or by giving the -R/--rails option.
17
18
  RunRailsCops: false
@@ -49,6 +50,62 @@ AlignHash:
49
50
  # a: 0
50
51
  # bb: 1
51
52
  EnforcedColonStyle: key
53
+ # Select whether hashes that are the last argument in a method call should be
54
+ # inspected? Valid values are:
55
+ #
56
+ # always_inspect - Inspect both implicit and explicit hashes.
57
+ # Registers and offence for:
58
+ # function(a: 1,
59
+ # b: 2)
60
+ # Registers an offence for:
61
+ # function({a: 1,
62
+ # b: 2})
63
+ # always_ignore - Ignore both implicit and explicit hashes.
64
+ # Accepts:
65
+ # function(a: 1,
66
+ # b: 2)
67
+ # Accepts:
68
+ # function({a: 1,
69
+ # b: 2})
70
+ # ignore_implicit - Ingore only implicit hashes.
71
+ # Accepts:
72
+ # function(a: 1,
73
+ # b: 2)
74
+ # Registers an offence for:
75
+ # function({a: 1,
76
+ # b: 2})
77
+ # ignore_explicit - Ingore only explicit hashes.
78
+ # Accepts:
79
+ # function({a: 1,
80
+ # b: 2})
81
+ # Registers an offence for:
82
+ # function(a: 1,
83
+ # b: 2)
84
+ EnforcedLastArgumentHashStyle: always_inspect
85
+ SupportedLastArgumentHashStyles:
86
+ - always_inspect
87
+ - always_ignore
88
+ - ignore_implicit
89
+ - ignore_explicit
90
+
91
+ AlignParameters:
92
+ # Alignment of parameters in multi-line method calls.
93
+ #
94
+ # The `with_first_parameter` style aligns the following lines along the same column
95
+ # as the first parameter.
96
+ #
97
+ # method_call(a,
98
+ # b)
99
+ #
100
+ # The `with_fixed_indentation` style alignes the following lines with one
101
+ # level of indenation relative to the start of the line with the method call.
102
+ #
103
+ # method_call(a,
104
+ # b)
105
+ EnforcedStyle: with_first_parameter
106
+ SupportedStyles:
107
+ - with_first_parameter
108
+ - with_fixed_indentation
52
109
 
53
110
  # Allow safe assignment in conditions.
54
111
  AssignmentInCondition:
@@ -71,6 +128,27 @@ CaseIndentation:
71
128
  - end
72
129
  IndentOneStep: false
73
130
 
131
+ ClassAndModuleChildren:
132
+ # Checks the style of children definitions at classes and modules.
133
+ #
134
+ # Basically there are two different styles:
135
+ #
136
+ # `nested` - have each child on a separat line
137
+ # class Foo
138
+ # class Bar
139
+ # end
140
+ # end
141
+ #
142
+ # `compact` - combine definitions as much as possible
143
+ # class Foo::Bar
144
+ # end
145
+ #
146
+ # The compact style is only forced, for classes / modules with one child.
147
+ EnforcedStyle: nested
148
+ SupportedStyles:
149
+ - nested
150
+ - compact
151
+
74
152
  ClassLength:
75
153
  CountComments: false # count full line comments?
76
154
  Max: 100
@@ -99,7 +177,7 @@ CyclomaticComplexity:
99
177
 
100
178
  # Multi-line method chaining should be done with leading dots.
101
179
  DotPosition:
102
- Style: leading
180
+ EnforcedStyle: leading
103
181
  SupportedStyles:
104
182
  - leading
105
183
  - trailing
@@ -129,6 +207,14 @@ For:
129
207
  - for
130
208
  - each
131
209
 
210
+ # Enforce the method used for string formatting.
211
+ FormatString:
212
+ EnforcedStyle: format
213
+ SupportedStyles:
214
+ - format
215
+ - sprintf
216
+ - percent
217
+
132
218
  # Built-in global variables are allowed by default.
133
219
  GlobalVars:
134
220
  AllowedVariables: []
@@ -139,6 +225,23 @@ HashSyntax:
139
225
  - ruby19
140
226
  - hash_rockets
141
227
 
228
+ IfUnlessModifier:
229
+ MaxLineLength: 79
230
+
231
+ # Checks the indentation of the first key in a hash literal.
232
+ IndentHash:
233
+ # The value `special_inside_parentheses` means that hash literals with braces
234
+ # that have their opening brace on the same line as a surrounding opening
235
+ # round parenthesis, shall have their first key indented relative to the
236
+ # first position inside the parenthesis.
237
+ # The value `consistent` means that the indentation of the first key shall
238
+ # always be relative to the first position of the line where the opening
239
+ # brace is.
240
+ EnforcedStyle: special_inside_parentheses
241
+ SupportedStyles:
242
+ - special_inside_parentheses
243
+ - consistent
244
+
142
245
  LambdaCall:
143
246
  EnforcedStyle: call
144
247
  SupportedStyles:
@@ -167,13 +270,6 @@ MethodName:
167
270
  NumericLiterals:
168
271
  MinDigits: 5
169
272
 
170
- Output:
171
- Ignore:
172
- - '^.*\.rake$'
173
- - '^.*/script/.*$'
174
- - '^.*/tasks/.*$'
175
- - 'Rakefile$'
176
-
177
273
  ParameterLists:
178
274
  Max: 5
179
275
  CountKeywordArgs: true
@@ -182,6 +278,18 @@ ParameterLists:
182
278
  ParenthesesAroundCondition:
183
279
  AllowSafeAssignment: true
184
280
 
281
+ PercentLiteralDelimiters:
282
+ PreferredDelimiters:
283
+ '%': ()
284
+ '%i': ()
285
+ '%q': ()
286
+ '%Q': ()
287
+ '%r': '{}'
288
+ '%s': ()
289
+ '%w': ()
290
+ '%W': ()
291
+ '%x': ()
292
+
185
293
  PredicateName:
186
294
  NamePrefixBlacklist:
187
295
  - is_
@@ -200,6 +308,8 @@ RedundantReturn:
200
308
  AllowMultipleReturnValues: false
201
309
 
202
310
  RegexpLiteral:
311
+ # The maximum number of (escaped) slashes that a slash-delimited regexp is
312
+ # allowed to have. If there are more slashes, a %r regexp shall be used.
203
313
  MaxSlashes: 1
204
314
 
205
315
  Semicolon:
@@ -216,7 +326,7 @@ SignalException:
216
326
 
217
327
  SingleLineBlockParams:
218
328
  Methods:
219
- - reduce:
329
+ - reduce:
220
330
  - a
221
331
  - e
222
332
  - inject:
@@ -232,11 +342,23 @@ StringLiterals:
232
342
  - single_quotes
233
343
  - double_quotes
234
344
 
235
- SpaceAroundBlockBraces:
236
- EnforcedStyle: space_inside_braces
345
+ SpaceAroundEqualsInParameterDefault:
346
+ EnforcedStyle: space
347
+ SupportedStyles:
348
+ - space
349
+ - no_space
350
+
351
+ SpaceBeforeBlockBraces:
352
+ EnforcedStyle: space
353
+ SupportedStyles:
354
+ - space
355
+ - no_space
356
+
357
+ SpaceInsideBlockBraces:
358
+ EnforcedStyle: space
237
359
  SupportedStyles:
238
- - space_inside_braces
239
- - no_space_inside_braces
360
+ - space
361
+ - no_space
240
362
  # Valid values are: space, no_space
241
363
  EnforcedStyleForEmptyBraces: no_space
242
364
  # Space between { and |. Overrides EnforcedStyle if there is a conflict.
@@ -285,11 +407,22 @@ VariableName:
285
407
  - snake_case
286
408
  - camelCase
287
409
 
410
+ WhileUntilModifier:
411
+ MaxLineLength: 79
412
+
288
413
  WordArray:
289
414
  MinSize: 0
290
415
 
291
416
  ##################### Rails ##################################
292
417
 
418
+ ActionFilter:
419
+ EnforcedStyle: action
420
+ SupportedStyles:
421
+ - action
422
+ - filter
423
+ IncludePaths:
424
+ -app/controllers
425
+
293
426
  DefaultScope:
294
427
  IncludePaths:
295
428
  - app/models
@@ -302,6 +435,10 @@ ReadAttribute:
302
435
  IncludePaths:
303
436
  - app/models
304
437
 
438
+ ScopeArgs:
439
+ IncludePaths:
440
+ - app/models
441
+
305
442
  Validation:
306
443
  IncludePaths:
307
444
  - app/models
@@ -85,6 +85,10 @@ ClassAndModuleCamelCase:
85
85
  Description: 'Use CamelCase for classes and modules.'
86
86
  Enabled: true
87
87
 
88
+ ClassAndModuleChildren:
89
+ Description: 'Checks style of children classes and modules.'
90
+ Enabled: true
91
+
88
92
  ClassLength:
89
93
  Description: 'Avoid classes longer than 100 lines of code.'
90
94
  Enabled: true
@@ -131,6 +135,10 @@ DotPosition:
131
135
  Description: 'Checks the position of the dot in multi-line method calls.'
132
136
  Enabled: true
133
137
 
138
+ DoubleNegation:
139
+ Description: 'Checks for uses of double negation (!!).'
140
+ Enabled: true
141
+
134
142
  EmptyLineBetweenDefs:
135
143
  Description: 'Use empty lines between defs.'
136
144
  Enabled: true
@@ -171,10 +179,6 @@ FavorJoin:
171
179
  Description: 'Use Array#join instead of Array#*.'
172
180
  Enabled: true
173
181
 
174
- FavorSprintf:
175
- Description: 'Use sprintf instead of String#%.'
176
- Enabled: true
177
-
178
182
  FavorUnlessOverNegatedIf:
179
183
  Description: >-
180
184
  Favor unless over if for negative conditions
@@ -185,6 +189,10 @@ FavorUntilOverNegatedWhile:
185
189
  Description: 'Favor until over while for negative conditions.'
186
190
  Enabled: true
187
191
 
192
+ FileName:
193
+ Description: 'Use snake_case for source file names.'
194
+ Enabled: true
195
+
188
196
  FinalNewline:
189
197
  Description: 'Checks for a final newline in a source file.'
190
198
  Enabled: true
@@ -197,6 +205,10 @@ For:
197
205
  Description: 'Checks use of for or each in multiline loops.'
198
206
  Enabled: true
199
207
 
208
+ FormatString:
209
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
210
+ Enabled: true
211
+
200
212
  GlobalVars:
201
213
  Description: 'Do not introduce global variables.'
202
214
  Enabled: true
@@ -229,6 +241,16 @@ IndentationWidth:
229
241
  Description: 'Use 2 spaces for indentation.'
230
242
  Enabled: true
231
243
 
244
+ IndentArray:
245
+ Description: >-
246
+ Checks the indentation of the first element in an array
247
+ literal.
248
+ Enabled: true
249
+
250
+ IndentHash:
251
+ Description: 'Checks the indentation of the first key in a hash literal.'
252
+ Enabled: true
253
+
232
254
  Lambda:
233
255
  Description: 'Use the new lambda literal syntax for single-line blocks.'
234
256
  Enabled: true
@@ -244,7 +266,7 @@ LeadingCommentSpace:
244
266
  LineEndConcatenation:
245
267
  Description: 'Use \\ instead of + to concatenate two string literals at line end.'
246
268
  Enabled: true
247
-
269
+
248
270
  LineLength:
249
271
  Description: 'Limit lines to 79 characters.'
250
272
  Enabled: true
@@ -323,6 +345,10 @@ ParenthesesAroundCondition:
323
345
  if/unless/while.
324
346
  Enabled: true
325
347
 
348
+ PercentLiteralDelimiters:
349
+ Description: 'Use `%`-literal delimiters consistently'
350
+ Enabled: true
351
+
326
352
  PerlBackrefs:
327
353
  Description: 'Avoid Perl-style regex back references.'
328
354
  Enabled: true
@@ -367,6 +393,10 @@ RescueModifier:
367
393
  Description: 'Avoid using rescue in its modifier form.'
368
394
  Enabled: true
369
395
 
396
+ SelfAssignment:
397
+ Description: 'Checks for places where self-assignment shorthand should have been used.'
398
+ Enabled: true
399
+
370
400
  Semicolon:
371
401
  Description: "Don't use semicolons to terminate expressions."
372
402
  Enabled: true
@@ -409,7 +439,13 @@ SpaceAfterSemicolon:
409
439
  Description: 'Use spaces after semicolons.'
410
440
  Enabled: true
411
441
 
412
- SpaceAroundBlockBraces:
442
+ SpaceBeforeBlockBraces:
443
+ Description: >-
444
+ Checks that the left block brace has or doesn't have space
445
+ before it.
446
+ Enabled: true
447
+
448
+ SpaceInsideBlockBraces:
413
449
  Description: >-
414
450
  Checks that block braces have or don't have surrounding space.
415
451
  For blocks taking parameters, checks that the left brace has
@@ -418,8 +454,9 @@ SpaceAroundBlockBraces:
418
454
 
419
455
  SpaceAroundEqualsInParameterDefault:
420
456
  Description: >-
421
- Use spaces around the = operator when assigning default
422
- values in def params.
457
+ Checks that the equals signs in parameter default assignments
458
+ have or don't have surrounding space depending on
459
+ configuration.
423
460
  Enabled: true
424
461
 
425
462
  SpaceAroundOperators:
@@ -535,6 +572,10 @@ Debugger:
535
572
  Description: 'Check for debugger calls.'
536
573
  Enabled: true
537
574
 
575
+ DeprecatedClassMethods:
576
+ Description: 'Check for deprecated class method calls.'
577
+ Enabled: true
578
+
538
579
  ElseLayout:
539
580
  Description: 'Check for odd code arrangement in an else block.'
540
581
  Enabled: true
@@ -573,6 +614,10 @@ LiteralInCondition:
573
614
  Description: 'Checks of literals used in conditions.'
574
615
  Enabled: true
575
616
 
617
+ LiteralInInterpolation:
618
+ Description: 'Checks for literals used in interpolation.'
619
+ Enabled: true
620
+
576
621
  Loop:
577
622
  Description: >-
578
623
  Use Kernel#loop with break rather than begin/end/until or
@@ -601,6 +646,10 @@ ShadowingOuterLocalVariable:
601
646
  for block arguments or block local variables.
602
647
  Enabled: true
603
648
 
649
+ StringConversionInInterpolation:
650
+ Description: 'Checks for Object#to_s usage in string interpolation.'
651
+ Enabled: true
652
+
604
653
  UnreachableCode:
605
654
  Description: 'Unreachable code.'
606
655
  Enabled: true
@@ -627,6 +676,10 @@ Void:
627
676
 
628
677
  ##################### Rails ##################################
629
678
 
679
+ ActionFilter:
680
+ Description: 'Enforces consistent use of action filter methods.'
681
+ Enabled: true
682
+
630
683
  DefaultScope:
631
684
  Description: 'Checks if the argument passed to default_scope is a block.'
632
685
  Enabled: true
@@ -643,6 +696,10 @@ ReadAttribute:
643
696
  Description: 'Prefer self[:attribute] over read_attribute(:attribute).'
644
697
  Enabled: true
645
698
 
699
+ ScopeArgs:
700
+ Description: 'Checks the arguments of ActiveRecord scopes.'
701
+ Enabled: true
702
+
646
703
  Validation:
647
704
  Description: 'Use sexy validations.'
648
705
  Enabled: true
@@ -15,7 +15,7 @@ require 'rubocop/version'
15
15
  require 'rubocop/path_util'
16
16
 
17
17
  require 'rubocop/cop/util'
18
- require 'rubocop/cop/offence'
18
+ require 'rubocop/cop/offense'
19
19
  require 'rubocop/cop/ignored_node'
20
20
  require 'rubocop/cop/cop'
21
21
  require 'rubocop/cop/commissioner'
@@ -56,6 +56,7 @@ require 'rubocop/cop/lint/assignment_in_condition'
56
56
  require 'rubocop/cop/lint/block_alignment'
57
57
  require 'rubocop/cop/lint/condition_position'
58
58
  require 'rubocop/cop/lint/debugger'
59
+ require 'rubocop/cop/lint/deprecated_class_methods'
59
60
  require 'rubocop/cop/lint/else_layout'
60
61
  require 'rubocop/cop/lint/empty_ensure'
61
62
  require 'rubocop/cop/lint/end_alignment'
@@ -65,11 +66,13 @@ require 'rubocop/cop/lint/eval'
65
66
  require 'rubocop/cop/lint/handle_exceptions'
66
67
  require 'rubocop/cop/lint/invalid_character_literal'
67
68
  require 'rubocop/cop/lint/literal_in_condition'
69
+ require 'rubocop/cop/lint/literal_in_interpolation'
68
70
  require 'rubocop/cop/lint/loop'
69
71
  require 'rubocop/cop/lint/parentheses_as_grouped_expression'
70
72
  require 'rubocop/cop/lint/rescue_exception'
71
73
  require 'rubocop/cop/lint/require_parentheses'
72
74
  require 'rubocop/cop/lint/shadowing_outer_local_variable'
75
+ require 'rubocop/cop/lint/string_conversion_in_interpolation'
73
76
  require 'rubocop/cop/lint/syntax'
74
77
  require 'rubocop/cop/lint/unreachable_code'
75
78
  require 'rubocop/cop/lint/useless_assignment'
@@ -97,6 +100,7 @@ require 'rubocop/cop/style/case_equality'
97
100
  require 'rubocop/cop/style/case_indentation'
98
101
  require 'rubocop/cop/style/character_literal'
99
102
  require 'rubocop/cop/style/class_and_module_camel_case'
103
+ require 'rubocop/cop/style/class_and_module_children'
100
104
  require 'rubocop/cop/style/class_length'
101
105
  require 'rubocop/cop/style/class_methods'
102
106
  require 'rubocop/cop/style/class_vars'
@@ -108,6 +112,7 @@ require 'rubocop/cop/style/cyclomatic_complexity'
108
112
  require 'rubocop/cop/style/def_parentheses'
109
113
  require 'rubocop/cop/style/documentation'
110
114
  require 'rubocop/cop/style/dot_position'
115
+ require 'rubocop/cop/style/double_negation'
111
116
  require 'rubocop/cop/style/empty_line_between_defs'
112
117
  require 'rubocop/cop/style/empty_lines'
113
118
  require 'rubocop/cop/style/empty_lines_around_access_modifier'
@@ -118,17 +123,20 @@ require 'rubocop/cop/style/end_block'
118
123
  require 'rubocop/cop/style/end_of_line'
119
124
  require 'rubocop/cop/style/even_odd'
120
125
  require 'rubocop/cop/style/favor_join'
121
- require 'rubocop/cop/style/favor_sprintf'
122
126
  require 'rubocop/cop/style/favor_unless_over_negated_if'
123
127
  require 'rubocop/cop/style/favor_until_over_negated_while'
128
+ require 'rubocop/cop/style/file_name'
124
129
  require 'rubocop/cop/style/final_newline'
125
130
  require 'rubocop/cop/style/flip_flop'
126
131
  require 'rubocop/cop/style/for'
132
+ require 'rubocop/cop/style/format_string'
127
133
  require 'rubocop/cop/style/global_vars'
128
134
  require 'rubocop/cop/style/hash_methods'
129
135
  require 'rubocop/cop/style/hash_syntax'
130
136
  require 'rubocop/cop/style/if_unless_modifier'
131
137
  require 'rubocop/cop/style/if_with_semicolon'
138
+ require 'rubocop/cop/style/indent_array'
139
+ require 'rubocop/cop/style/indent_hash'
132
140
  require 'rubocop/cop/style/indentation_consistency'
133
141
  require 'rubocop/cop/style/indentation_width'
134
142
  require 'rubocop/cop/style/lambda'
@@ -153,6 +161,7 @@ require 'rubocop/cop/style/one_line_conditional'
153
161
  require 'rubocop/cop/style/op_method'
154
162
  require 'rubocop/cop/style/parameter_lists'
155
163
  require 'rubocop/cop/style/parentheses_around_condition'
164
+ require 'rubocop/cop/style/percent_literal_delimiters'
156
165
  require 'rubocop/cop/style/perl_backrefs'
157
166
  require 'rubocop/cop/style/predicate_name'
158
167
  require 'rubocop/cop/style/proc'
@@ -163,6 +172,7 @@ require 'rubocop/cop/style/redundant_return'
163
172
  require 'rubocop/cop/style/redundant_self'
164
173
  require 'rubocop/cop/style/regexp_literal'
165
174
  require 'rubocop/cop/style/rescue_modifier'
175
+ require 'rubocop/cop/style/self_assignment'
166
176
  require 'rubocop/cop/style/semicolon'
167
177
  require 'rubocop/cop/style/signal_exception'
168
178
  require 'rubocop/cop/style/single_line_block_params'
@@ -173,10 +183,11 @@ require 'rubocop/cop/style/space_after_control_keyword'
173
183
  require 'rubocop/cop/style/space_after_method_name'
174
184
  require 'rubocop/cop/style/space_after_not'
175
185
  require 'rubocop/cop/style/space_after_semicolon'
176
- require 'rubocop/cop/style/space_around_block_braces'
177
186
  require 'rubocop/cop/style/space_around_equals_in_parameter_default'
178
187
  require 'rubocop/cop/style/space_around_operators'
188
+ require 'rubocop/cop/style/space_before_block_braces'
179
189
  require 'rubocop/cop/style/space_before_modifier_keyword'
190
+ require 'rubocop/cop/style/space_inside_block_braces'
180
191
  require 'rubocop/cop/style/space_inside_brackets'
181
192
  require 'rubocop/cop/style/space_inside_hash_literal_braces'
182
193
  require 'rubocop/cop/style/space_inside_parens'
@@ -196,10 +207,12 @@ require 'rubocop/cop/style/while_until_do'
196
207
  require 'rubocop/cop/style/while_until_modifier'
197
208
  require 'rubocop/cop/style/word_array'
198
209
 
210
+ require 'rubocop/cop/rails/action_filter'
199
211
  require 'rubocop/cop/rails/default_scope'
200
212
  require 'rubocop/cop/rails/has_and_belongs_to_many'
201
213
  require 'rubocop/cop/rails/output'
202
214
  require 'rubocop/cop/rails/read_attribute'
215
+ require 'rubocop/cop/rails/scope_args'
203
216
  require 'rubocop/cop/rails/validation'
204
217
 
205
218
  require 'rubocop/formatter/base_formatter'
@@ -208,9 +221,10 @@ require 'rubocop/formatter/disabled_config_formatter'
208
221
  require 'rubocop/formatter/emacs_style_formatter'
209
222
  require 'rubocop/formatter/clang_style_formatter'
210
223
  require 'rubocop/formatter/progress_formatter'
224
+ require 'rubocop/formatter/fuubar_style_formatter'
211
225
  require 'rubocop/formatter/json_formatter'
212
226
  require 'rubocop/formatter/file_list_formatter'
213
- require 'rubocop/formatter/offence_count_formatter'
227
+ require 'rubocop/formatter/offense_count_formatter'
214
228
  require 'rubocop/formatter/formatter_set'
215
229
 
216
230
  require 'rubocop/config'
@@ -218,6 +232,7 @@ require 'rubocop/config_loader'
218
232
  require 'rubocop/config_store'
219
233
  require 'rubocop/target_finder'
220
234
  require 'rubocop/token'
235
+ require 'rubocop/comment_config'
221
236
  require 'rubocop/processed_source'
222
237
  require 'rubocop/source_parser'
223
238
  require 'rubocop/file_inspector'