rubocop 0.48.1 → 0.49.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -3
  3. data/config/default.yml +397 -357
  4. data/config/disabled.yml +29 -29
  5. data/config/enabled.yml +366 -326
  6. data/lib/rubocop.rb +85 -70
  7. data/lib/rubocop/ast/builder.rb +4 -1
  8. data/lib/rubocop/ast/node.rb +2 -2
  9. data/lib/rubocop/ast/node/and_node.rb +1 -1
  10. data/lib/rubocop/ast/node/args_node.rb +24 -0
  11. data/lib/rubocop/ast/node/block_node.rb +107 -0
  12. data/lib/rubocop/ast/node/case_node.rb +1 -1
  13. data/lib/rubocop/ast/node/ensure_node.rb +1 -1
  14. data/lib/rubocop/ast/node/for_node.rb +1 -1
  15. data/lib/rubocop/ast/node/if_node.rb +1 -1
  16. data/lib/rubocop/ast/node/mixin/parameterized_node.rb +74 -0
  17. data/lib/rubocop/ast/node/or_node.rb +1 -1
  18. data/lib/rubocop/ast/node/pair_node.rb +1 -1
  19. data/lib/rubocop/ast/node/resbody_node.rb +1 -1
  20. data/lib/rubocop/ast/node/send_node.rb +36 -57
  21. data/lib/rubocop/ast/node/super_node.rb +42 -0
  22. data/lib/rubocop/ast/node/until_node.rb +1 -1
  23. data/lib/rubocop/ast/node/when_node.rb +1 -1
  24. data/lib/rubocop/ast/node/while_node.rb +1 -1
  25. data/lib/rubocop/cli.rb +10 -0
  26. data/lib/rubocop/config.rb +23 -7
  27. data/lib/rubocop/config_loader.rb +19 -3
  28. data/lib/rubocop/cop/badge.rb +1 -1
  29. data/lib/rubocop/cop/bundler/duplicated_gem.rb +2 -2
  30. data/lib/rubocop/cop/commissioner.rb +1 -1
  31. data/lib/rubocop/cop/cop.rb +10 -0
  32. data/lib/rubocop/cop/{style → layout}/access_modifier_indentation.rb +33 -3
  33. data/lib/rubocop/cop/{style → layout}/align_array.rb +16 -1
  34. data/lib/rubocop/cop/{style → layout}/align_hash.rb +1 -1
  35. data/lib/rubocop/cop/{style → layout}/align_parameters.rb +29 -1
  36. data/lib/rubocop/cop/{style → layout}/block_end_newline.rb +10 -5
  37. data/lib/rubocop/cop/{style → layout}/case_indentation.rb +64 -1
  38. data/lib/rubocop/cop/{style → layout}/closing_parenthesis_indentation.rb +2 -2
  39. data/lib/rubocop/cop/{style → layout}/comment_indentation.rb +1 -1
  40. data/lib/rubocop/cop/{style → layout}/dot_position.rb +1 -1
  41. data/lib/rubocop/cop/{style → layout}/else_alignment.rb +1 -1
  42. data/lib/rubocop/cop/{style → layout}/empty_line_after_magic_comment.rb +1 -1
  43. data/lib/rubocop/cop/{style → layout}/empty_line_between_defs.rb +1 -1
  44. data/lib/rubocop/cop/{style → layout}/empty_lines.rb +1 -1
  45. data/lib/rubocop/cop/{style → layout}/empty_lines_around_access_modifier.rb +2 -7
  46. data/lib/rubocop/cop/{style → layout}/empty_lines_around_begin_body.rb +1 -1
  47. data/lib/rubocop/cop/{style → layout}/empty_lines_around_block_body.rb +2 -4
  48. data/lib/rubocop/cop/{style → layout}/empty_lines_around_class_body.rb +1 -1
  49. data/lib/rubocop/cop/{style → layout}/empty_lines_around_exception_handling_keywords.rb +1 -1
  50. data/lib/rubocop/cop/{style → layout}/empty_lines_around_method_body.rb +1 -1
  51. data/lib/rubocop/cop/{style → layout}/empty_lines_around_module_body.rb +1 -1
  52. data/lib/rubocop/cop/{style → layout}/end_of_line.rb +1 -1
  53. data/lib/rubocop/cop/{style → layout}/extra_spacing.rb +1 -1
  54. data/lib/rubocop/cop/{style → layout}/first_array_element_line_break.rb +1 -1
  55. data/lib/rubocop/cop/{style → layout}/first_hash_element_line_break.rb +1 -1
  56. data/lib/rubocop/cop/{style → layout}/first_method_argument_line_break.rb +1 -1
  57. data/lib/rubocop/cop/{style → layout}/first_method_parameter_line_break.rb +1 -1
  58. data/lib/rubocop/cop/{style → layout}/first_parameter_indentation.rb +1 -1
  59. data/lib/rubocop/cop/{style → layout}/indent_array.rb +1 -1
  60. data/lib/rubocop/cop/{style → layout}/indent_assignment.rb +1 -1
  61. data/lib/rubocop/cop/{style → layout}/indent_hash.rb +2 -2
  62. data/lib/rubocop/cop/{style → layout}/indent_heredoc.rb +3 -3
  63. data/lib/rubocop/cop/{style → layout}/indentation_consistency.rb +1 -1
  64. data/lib/rubocop/cop/{style → layout}/indentation_width.rb +10 -12
  65. data/lib/rubocop/cop/{style → layout}/initial_indentation.rb +1 -1
  66. data/lib/rubocop/cop/{style → layout}/leading_comment_space.rb +1 -1
  67. data/lib/rubocop/cop/{style → layout}/multiline_array_brace_layout.rb +1 -1
  68. data/lib/rubocop/cop/{style → layout}/multiline_assignment_layout.rb +1 -1
  69. data/lib/rubocop/cop/{style → layout}/multiline_block_layout.rb +21 -36
  70. data/lib/rubocop/cop/{style → layout}/multiline_hash_brace_layout.rb +5 -1
  71. data/lib/rubocop/cop/{style → layout}/multiline_method_call_brace_layout.rb +1 -1
  72. data/lib/rubocop/cop/{style → layout}/multiline_method_call_indentation.rb +3 -3
  73. data/lib/rubocop/cop/{style → layout}/multiline_method_definition_brace_layout.rb +1 -1
  74. data/lib/rubocop/cop/{style → layout}/multiline_operation_indentation.rb +6 -5
  75. data/lib/rubocop/cop/{style → layout}/rescue_ensure_alignment.rb +1 -1
  76. data/lib/rubocop/cop/{style → layout}/space_after_colon.rb +2 -2
  77. data/lib/rubocop/cop/{style → layout}/space_after_comma.rb +2 -2
  78. data/lib/rubocop/cop/{style → layout}/space_after_method_name.rb +1 -1
  79. data/lib/rubocop/cop/{style → layout}/space_after_not.rb +1 -1
  80. data/lib/rubocop/cop/{style → layout}/space_after_semicolon.rb +2 -2
  81. data/lib/rubocop/cop/{style → layout}/space_around_block_parameters.rb +7 -5
  82. data/lib/rubocop/cop/{style → layout}/space_around_equals_in_parameter_default.rb +1 -1
  83. data/lib/rubocop/cop/{style → layout}/space_around_keyword.rb +1 -1
  84. data/lib/rubocop/cop/{style → layout}/space_around_operators.rb +6 -2
  85. data/lib/rubocop/cop/{style → layout}/space_before_block_braces.rb +6 -2
  86. data/lib/rubocop/cop/{style → layout}/space_before_comma.rb +1 -1
  87. data/lib/rubocop/cop/{style → layout}/space_before_comment.rb +1 -1
  88. data/lib/rubocop/cop/{style → layout}/space_before_first_arg.rb +4 -2
  89. data/lib/rubocop/cop/{style → layout}/space_before_semicolon.rb +1 -1
  90. data/lib/rubocop/cop/{style → layout}/space_in_lambda_literal.rb +1 -1
  91. data/lib/rubocop/cop/{style → layout}/space_inside_array_percent_literal.rb +1 -1
  92. data/lib/rubocop/cop/{style → layout}/space_inside_block_braces.rb +3 -4
  93. data/lib/rubocop/cop/{style → layout}/space_inside_brackets.rb +1 -1
  94. data/lib/rubocop/cop/{style → layout}/space_inside_hash_literal_braces.rb +1 -1
  95. data/lib/rubocop/cop/{style → layout}/space_inside_parens.rb +1 -1
  96. data/lib/rubocop/cop/{style → layout}/space_inside_percent_literal_delimiters.rb +8 -7
  97. data/lib/rubocop/cop/{style → layout}/space_inside_range_literal.rb +1 -1
  98. data/lib/rubocop/cop/{style → layout}/space_inside_string_interpolation.rb +1 -1
  99. data/lib/rubocop/cop/{style → layout}/tab.rb +1 -1
  100. data/lib/rubocop/cop/{style → layout}/trailing_blank_lines.rb +1 -1
  101. data/lib/rubocop/cop/{style → layout}/trailing_whitespace.rb +2 -2
  102. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +1 -1
  103. data/lib/rubocop/cop/lint/ambiguous_operator.rb +4 -4
  104. data/lib/rubocop/cop/lint/debugger.rb +0 -15
  105. data/lib/rubocop/cop/lint/duplicate_methods.rb +2 -1
  106. data/lib/rubocop/cop/lint/rescue_type.rb +81 -0
  107. data/lib/rubocop/cop/lint/script_permission.rb +42 -0
  108. data/lib/rubocop/cop/lint/useless_access_modifier.rb +1 -1
  109. data/lib/rubocop/cop/message_annotator.rb +23 -13
  110. data/lib/rubocop/cop/metrics/block_length.rb +1 -1
  111. data/lib/rubocop/cop/mixin/array_min_size.rb +59 -0
  112. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +10 -11
  113. data/lib/rubocop/cop/mixin/def_node.rb +1 -1
  114. data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +1 -1
  115. data/lib/rubocop/cop/mixin/enforce_superclass.rb +36 -0
  116. data/lib/rubocop/cop/mixin/hash_alignment.rb +1 -1
  117. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +7 -3
  118. data/lib/rubocop/cop/mixin/space_before_punctuation.rb +1 -1
  119. data/lib/rubocop/cop/performance/caller.rb +41 -0
  120. data/lib/rubocop/cop/performance/compare_with_block.rb +60 -14
  121. data/lib/rubocop/cop/performance/double_start_end_with.rb +2 -2
  122. data/lib/rubocop/cop/performance/redundant_merge.rb +2 -0
  123. data/lib/rubocop/cop/rails/action_filter.rb +1 -3
  124. data/lib/rubocop/cop/rails/application_job.rb +32 -0
  125. data/lib/rubocop/cop/rails/application_record.rb +32 -0
  126. data/lib/rubocop/cop/rails/blank.rb +9 -3
  127. data/lib/rubocop/cop/rails/output_safety.rb +59 -15
  128. data/lib/rubocop/cop/rails/present.rb +9 -3
  129. data/lib/rubocop/cop/rails/relative_date_constant.rb +35 -4
  130. data/lib/rubocop/cop/rails/reversible_migration.rb +82 -18
  131. data/lib/rubocop/cop/rails/save_bang.rb +7 -2
  132. data/lib/rubocop/cop/rails/skips_model_validations.rb +7 -0
  133. data/lib/rubocop/cop/registry.rb +4 -3
  134. data/lib/rubocop/cop/security/eval.rb +9 -3
  135. data/lib/rubocop/cop/style/and_or.rb +1 -1
  136. data/lib/rubocop/cop/style/block_delimiters.rb +11 -17
  137. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +1 -1
  138. data/lib/rubocop/cop/style/collection_methods.rb +1 -3
  139. data/lib/rubocop/cop/style/conditional_assignment.rb +1 -1
  140. data/lib/rubocop/cop/style/copyright.rb +2 -2
  141. data/lib/rubocop/cop/style/documentation_method.rb +1 -1
  142. data/lib/rubocop/cop/style/each_for_simple_loop.rb +2 -1
  143. data/lib/rubocop/cop/style/each_with_object.rb +10 -6
  144. data/lib/rubocop/cop/style/empty_case_condition.rb +2 -2
  145. data/lib/rubocop/cop/style/for.rb +4 -5
  146. data/lib/rubocop/cop/style/format_string.rb +49 -0
  147. data/lib/rubocop/cop/style/format_string_token.rb +141 -0
  148. data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
  149. data/lib/rubocop/cop/style/identical_conditional_branches.rb +2 -2
  150. data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +1 -1
  151. data/lib/rubocop/cop/style/inverse_methods.rb +10 -1
  152. data/lib/rubocop/cop/style/lambda.rb +9 -9
  153. data/lib/rubocop/cop/style/line_end_concatenation.rb +4 -0
  154. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +3 -3
  155. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +1 -2
  156. data/lib/rubocop/cop/style/method_name.rb +8 -2
  157. data/lib/rubocop/cop/style/mixin_grouping.rb +41 -3
  158. data/lib/rubocop/cop/style/multiline_block_chain.rb +7 -11
  159. data/lib/rubocop/cop/style/multiple_comparison.rb +77 -0
  160. data/lib/rubocop/cop/style/next.rb +11 -22
  161. data/lib/rubocop/cop/style/parallel_assignment.rb +10 -19
  162. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +2 -2
  163. data/lib/rubocop/cop/style/self_assignment.rb +4 -0
  164. data/lib/rubocop/cop/style/single_line_block_params.rb +23 -17
  165. data/lib/rubocop/cop/style/symbol_array.rb +24 -13
  166. data/lib/rubocop/cop/style/symbol_proc.rb +4 -0
  167. data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -1
  168. data/lib/rubocop/cop/style/unneeded_interpolation.rb +4 -0
  169. data/lib/rubocop/cop/style/word_array.rb +33 -53
  170. data/lib/rubocop/cop/style/yoda_condition.rb +78 -0
  171. data/lib/rubocop/cop/team.rb +1 -14
  172. data/lib/rubocop/cop/util.rb +16 -0
  173. data/lib/rubocop/formatter/simple_text_formatter.rb +0 -11
  174. data/lib/rubocop/node_pattern.rb +52 -52
  175. data/lib/rubocop/options.rb +25 -0
  176. data/lib/rubocop/path_util.rb +17 -1
  177. data/lib/rubocop/result_cache.rb +8 -7
  178. data/lib/rubocop/rspec/expect_offense.rb +167 -0
  179. data/lib/rubocop/rspec/shared_examples.rb +0 -8
  180. data/lib/rubocop/rspec/support.rb +1 -0
  181. data/lib/rubocop/runner.rb +12 -2
  182. data/lib/rubocop/target_finder.rb +5 -0
  183. data/lib/rubocop/version.rb +1 -1
  184. metadata +101 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4aa95a4490b838949fa15403588cced4899c86b
4
- data.tar.gz: e6715d302d3b009057392f4875453c5a9dd5bb29
3
+ metadata.gz: 3b593dc9fec24a2f53061b6e5579f49e6597e564
4
+ data.tar.gz: 72f662af431c19f0811db82ec40b6b461057b237
5
5
  SHA512:
6
- metadata.gz: 0411e00f1c0b571dd45414ed595a6a0c5da0119bc2b1deeef053c21ba95dd6d2ebe84e91c426f5ab4b3471c9c5ed1d481cf6adfcff1c581cff9247f445c877aa
7
- data.tar.gz: 901d75ba9adee9d27c26323d24bd44eeedac3112d11beb1081d1f385dd77989945a7011653b8b1595bda34c92a4faa56daa8688c434eaca6b8a52fe9c615a2b9
6
+ metadata.gz: 1a9d358a6e049e185056789b1b82c1fb5cdbe1f2358fb5138646f46df6376136e7819f3ea8edc4ae1b730ef2ca57a2a488449a40db2b5849625d974a8929ad2b
7
+ data.tar.gz: f8563e03d90a81c1f7f9cd587ec32e91838ce938b3cc936dd8f490c4c4756910350beef1a1de7c286f9c36bac7bab748b49018b413a02bcfa617eaf5093cb943
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/rubocop.svg)](http://badge.fury.io/rb/rubocop)
2
2
  [![Dependency Status](https://gemnasium.com/bbatsov/rubocop.svg)](https://gemnasium.com/bbatsov/rubocop)
3
- [![Build Status](https://travis-ci.org/bbatsov/rubocop.svg?branch=master)](https://travis-ci.org/bbatsov/rubocop)
3
+ [![Travis Status](https://travis-ci.org/bbatsov/rubocop.svg?branch=master)](https://travis-ci.org/bbatsov/rubocop)
4
+ [![Appveyor Status](https://ci.appveyor.com/api/projects/status/github/bbatsov/rubocop?svg=true)](https://ci.appveyor.com/project/bbatsov/rubocop)
4
5
  [![Coverage Status](https://img.shields.io/codeclimate/coverage/github/bbatsov/rubocop.svg)](https://codeclimate.com/github/bbatsov/rubocop)
5
6
  [![Code Climate](https://codeclimate.com/github/bbatsov/rubocop/badges/gpa.svg)](https://codeclimate.com/github/bbatsov/rubocop)
6
7
  [![Inline docs](http://inch-ci.org/github/bbatsov/rubocop.svg)](http://inch-ci.org/github/bbatsov/rubocop)
@@ -50,7 +51,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
50
51
  might want to use a conservative version locking in your `Gemfile`:
51
52
 
52
53
  ```rb
53
- gem 'rubocop', '~> 0.48.1', require: false
54
+ gem 'rubocop', '~> 0.49.0', require: false
54
55
  ```
55
56
 
56
57
  ## Quickstart
@@ -172,7 +173,7 @@ Support us with a monthly donation and help us continue our activities. [[Become
172
173
 
173
174
  ### Open Collective Sponsors
174
175
 
175
- Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/rubocop#sponsor)]
176
+ Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/rubocop#sponsor)]
176
177
 
177
178
  <a href="https://opencollective.com/rubocop/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rubocop/sponsor/0/avatar.svg"></a>
178
179
  <a href="https://opencollective.com/rubocop/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rubocop/sponsor/1/avatar.svg"></a>
@@ -9,24 +9,51 @@ inherit_from:
9
9
  AllCops:
10
10
  # Include common Ruby source files.
11
11
  Include:
12
+ - '**/*.builder'
13
+ - '**/*.fcgi'
12
14
  - '**/*.gemspec'
13
- - '**/*.podspec'
15
+ - '**/*.god'
16
+ - '**/*.jb'
14
17
  - '**/*.jbuilder'
15
- - '**/*.rake'
18
+ - '**/*.mspec'
16
19
  - '**/*.opal'
20
+ - '**/*.pluginspec'
21
+ - '**/*.podspec'
22
+ - '**/*.rabl'
23
+ - '**/*.rake'
24
+ - '**/*.rbuild'
25
+ - '**/*.rbw'
26
+ - '**/*.rbx'
27
+ - '**/*.ru'
28
+ - '**/*.ruby'
29
+ - '**/*.spec'
30
+ - '**/*.thor'
31
+ - '**/*.watchr'
32
+ - '**/.irbrc'
33
+ - '**/.pryrc'
34
+ - '**/buildfile'
17
35
  - '**/config.ru'
18
- - '**/Gemfile'
19
- - '**/Rakefile'
36
+ - '**/Appraisals'
37
+ - '**/Berksfile'
38
+ - '**/Brewfile'
39
+ - '**/Buildfile'
20
40
  - '**/Capfile'
41
+ - '**/Cheffile'
42
+ - '**/Dangerfile'
43
+ - '**/Deliverfile'
44
+ - '**/Fastfile'
45
+ - '**/*Fastfile'
46
+ - '**/Gemfile'
21
47
  - '**/Guardfile'
48
+ - '**/Jarfile'
49
+ - '**/Mavenfile'
22
50
  - '**/Podfile'
51
+ - '**/Puppetfile'
52
+ - '**/Rakefile'
53
+ - '**/Snapfile'
23
54
  - '**/Thorfile'
24
- - '**/Vagrantfile'
25
- - '**/Berksfile'
26
- - '**/Cheffile'
27
55
  - '**/Vagabondfile'
28
- - '**/Fastfile'
29
- - '**/*Fastfile'
56
+ - '**/Vagrantfile'
30
57
  Exclude:
31
58
  - 'vendor/**/*'
32
59
  # Default formatter will be used if no `-f/--format` option is given.
@@ -69,18 +96,17 @@ AllCops:
69
96
  # Threshold for how many files can be stored in the result cache before some
70
97
  # of the files are automatically removed.
71
98
  MaxFilesInCache: 20000
72
- # The cache will be stored in "rubocop_cache" under this directory. The name
73
- # "/tmp" is special and will be converted to the system temporary directory,
74
- # which is "/tmp" on Unix-like systems, but could be something else on other
75
- # systems.
76
- CacheRootDirectory: /tmp
77
- # The default cache root directory is /tmp, which on most systems is
78
- # writable by any system user. This means that it is possible for a
79
- # malicious user to anticipate the location of Rubocop's cache directory,
80
- # and create a symlink in its place that could cause Rubocop to overwrite
81
- # unintended files, or read malicious input. If you are certain that your
82
- # cache location is secure from this kind of attack, and wish to use a
83
- # symlinked cache location, set this value to "true".
99
+ # The cache will be stored in "rubocop_cache" under this directory. If
100
+ # CacheRootDirectory is ~ (nil), which it is by default, the root will be
101
+ # taken from the environment variable `$XDG_CACHE_HOME` if it is set, or if
102
+ # `$XDG_CACHE_HOME` is not set, it will be `$HOME/.cache/`.
103
+ CacheRootDirectory: ~
104
+ # It is possible for a malicious user to know the location of RuboCop's cache
105
+ # directory by looking at CacheRootDirectory, and create a symlink in its
106
+ # place that could cause RuboCop to overwrite unintended files, or read
107
+ # malicious input. If you are certain that your cache location is secure from
108
+ # this kind of attack, and wish to use a symlinked cache location, set this
109
+ # value to "true".
84
110
  AllowSymlinksInCacheRootDirectory: false
85
111
  # What MRI version of the Ruby interpreter is the inspected code intended to
86
112
  # run on? (If there is more than one, set this to the lowest version.)
@@ -90,24 +116,20 @@ AllCops:
90
116
  TargetRubyVersion: ~
91
117
  TargetRailsVersion: 5.0
92
118
 
119
+ #################### Layout ###########################
120
+
93
121
  # Indent private/protected/public as deep as method definitions
94
- Style/AccessModifierIndentation:
122
+ Layout/AccessModifierIndentation:
95
123
  EnforcedStyle: indent
96
124
  SupportedStyles:
97
125
  - outdent
98
126
  - indent
99
- # By default, the indentation width from Style/IndentationWidth is used
127
+ # By default, the indentation width from Layout/IndentationWidth is used
100
128
  # But it can be overridden by setting this parameter
101
129
  IndentationWidth: ~
102
130
 
103
- Style/Alias:
104
- EnforcedStyle: prefer_alias
105
- SupportedStyles:
106
- - prefer_alias
107
- - prefer_alias_method
108
-
109
131
  # Align the elements of a hash literal if they span more than one line.
110
- Style/AlignHash:
132
+ Layout/AlignHash:
111
133
  # Alignment of entries using hash rocket as separator. Valid values are:
112
134
  #
113
135
  # key - left alignment of keys
@@ -178,7 +200,7 @@ Style/AlignHash:
178
200
  - ignore_implicit
179
201
  - ignore_explicit
180
202
 
181
- Style/AlignParameters:
203
+ Layout/AlignParameters:
182
204
  # Alignment of parameters in multi-line method calls.
183
205
  #
184
206
  # The `with_first_parameter` style aligns the following lines along the same
@@ -196,10 +218,329 @@ Style/AlignParameters:
196
218
  SupportedStyles:
197
219
  - with_first_parameter
198
220
  - with_fixed_indentation
199
- # By default, the indentation width from Style/IndentationWidth is used
221
+ # By default, the indentation width from Layout/IndentationWidth is used
222
+ # But it can be overridden by setting this parameter
223
+ IndentationWidth: ~
224
+
225
+ # Indentation of `when`.
226
+ Layout/CaseIndentation:
227
+ EnforcedStyle: case
228
+ SupportedStyles:
229
+ - case
230
+ - end
231
+ IndentOneStep: false
232
+ # By default, the indentation width from `Layout/IndentationWidth` is used.
233
+ # But it can be overridden by setting this parameter.
234
+ # This only matters if `IndentOneStep` is `true`
235
+ IndentationWidth: ~
236
+
237
+ # Multi-line method chaining should be done with leading dots.
238
+ Layout/DotPosition:
239
+ EnforcedStyle: leading
240
+ SupportedStyles:
241
+ - leading
242
+ - trailing
243
+
244
+ # Use empty lines between defs.
245
+ Layout/EmptyLineBetweenDefs:
246
+ # If `true`, this parameter means that single line method definitions don't
247
+ # need an empty line between them.
248
+ AllowAdjacentOneLineDefs: false
249
+ # Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
250
+ NumberOfEmptyLines: 1
251
+
252
+ Layout/EmptyLinesAroundBlockBody:
253
+ EnforcedStyle: no_empty_lines
254
+ SupportedStyles:
255
+ - empty_lines
256
+ - no_empty_lines
257
+
258
+ Layout/EmptyLinesAroundClassBody:
259
+ EnforcedStyle: no_empty_lines
260
+ SupportedStyles:
261
+ - empty_lines
262
+ - empty_lines_except_namespace
263
+ - empty_lines_special
264
+ - no_empty_lines
265
+
266
+ Layout/EmptyLinesAroundModuleBody:
267
+ EnforcedStyle: no_empty_lines
268
+ SupportedStyles:
269
+ - empty_lines
270
+ - empty_lines_except_namespace
271
+ - empty_lines_special
272
+ - no_empty_lines
273
+
274
+ Layout/EndOfLine:
275
+ # The `native` style means that CR+LF (Carriage Return + Line Feed) is
276
+ # enforced on Windows, and LF is enforced on other platforms. The other styles
277
+ # mean LF and CR+LF, respectively.
278
+ EnforcedStyle: native
279
+ SupportedStyles:
280
+ - native
281
+ - lf
282
+ - crlf
283
+
284
+ Layout/ExtraSpacing:
285
+ # When true, allows most uses of extra spacing if the intent is to align
286
+ # things with the previous or next line, not counting empty lines or comment
287
+ # lines.
288
+ AllowForAlignment: true
289
+ # When true, forces the alignment of `=` in assignments on consecutive lines.
290
+ ForceEqualSignAlignment: false
291
+
292
+ Layout/FirstParameterIndentation:
293
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
294
+ SupportedStyles:
295
+ # The first parameter should always be indented one step more than the
296
+ # preceding line.
297
+ - consistent
298
+ # The first parameter should normally be indented one step more than the
299
+ # preceding line, but if it's a parameter for a method call that is itself
300
+ # a parameter in a method call, then the inner parameter should be indented
301
+ # relative to the inner method.
302
+ - special_for_inner_method_call
303
+ # Same as `special_for_inner_method_call` except that the special rule only
304
+ # applies if the outer method call encloses its arguments in parentheses.
305
+ - special_for_inner_method_call_in_parentheses
306
+ # By default, the indentation width from `Layout/IndentationWidth` is used
307
+ # But it can be overridden by setting this parameter
308
+ IndentationWidth: ~
309
+
310
+ Layout/IndentationConsistency:
311
+ # The difference between `rails` and `normal` is that the `rails` style
312
+ # prescribes that in classes and modules the `protected` and `private`
313
+ # modifier keywords shall be indented the same as public methods and that
314
+ # protected and private members shall be indented one step more than the
315
+ # modifiers. Other than that, both styles mean that entities on the same
316
+ # logical depth shall have the same indentation.
317
+ EnforcedStyle: normal
318
+ SupportedStyles:
319
+ - normal
320
+ - rails
321
+
322
+ Layout/IndentationWidth:
323
+ # Number of spaces for each indentation level.
324
+ Width: 2
325
+ IgnoredPatterns: []
326
+
327
+ # Checks the indentation of the first element in an array literal.
328
+ Layout/IndentArray:
329
+ # The value `special_inside_parentheses` means that array literals with
330
+ # brackets that have their opening bracket on the same line as a surrounding
331
+ # opening round parenthesis, shall have their first element indented relative
332
+ # to the first position inside the parenthesis.
333
+ #
334
+ # The value `consistent` means that the indentation of the first element shall
335
+ # always be relative to the first position of the line where the opening
336
+ # bracket is.
337
+ #
338
+ # The value `align_brackets` means that the indentation of the first element
339
+ # shall always be relative to the position of the opening bracket.
340
+ EnforcedStyle: special_inside_parentheses
341
+ SupportedStyles:
342
+ - special_inside_parentheses
343
+ - consistent
344
+ - align_brackets
345
+ # By default, the indentation width from `Layout/IndentationWidth` is used
346
+ # But it can be overridden by setting this parameter
347
+ IndentationWidth: ~
348
+
349
+ # Checks the indentation of assignment RHS, when on a different line from LHS
350
+ Layout/IndentAssignment:
351
+ # By default, the indentation width from `Layout/IndentationWidth` is used
352
+ # But it can be overridden by setting this parameter
353
+ IndentationWidth: ~
354
+
355
+ # Checks the indentation of the first key in a hash literal.
356
+ Layout/IndentHash:
357
+ # The value `special_inside_parentheses` means that hash literals with braces
358
+ # that have their opening brace on the same line as a surrounding opening
359
+ # round parenthesis, shall have their first key indented relative to the
360
+ # first position inside the parenthesis.
361
+ #
362
+ # The value `consistent` means that the indentation of the first key shall
363
+ # always be relative to the first position of the line where the opening
364
+ # brace is.
365
+ #
366
+ # The value `align_braces` means that the indentation of the first key shall
367
+ # always be relative to the position of the opening brace.
368
+ EnforcedStyle: special_inside_parentheses
369
+ SupportedStyles:
370
+ - special_inside_parentheses
371
+ - consistent
372
+ - align_braces
373
+ # By default, the indentation width from `Layout/IndentationWidth` is used
374
+ # But it can be overridden by setting this parameter
375
+ IndentationWidth: ~
376
+
377
+ Layout/IndentHeredoc:
378
+ EnforcedStyle: auto_detection
379
+ SupportedStyles:
380
+ - auto_detection
381
+ - squiggly
382
+ - active_support
383
+ - powerpack
384
+ - unindent
385
+
386
+ Layout/SpaceInLambdaLiteral:
387
+ EnforcedStyle: require_no_space
388
+ SupportedStyles:
389
+ - require_no_space
390
+ - require_space
391
+
392
+ Layout/MultilineArrayBraceLayout:
393
+ EnforcedStyle: symmetrical
394
+ SupportedStyles:
395
+ # symmetrical: closing brace is positioned in same way as opening brace
396
+ # new_line: closing brace is always on a new line
397
+ # same_line: closing brace is always on the same line as last element
398
+ - symmetrical
399
+ - new_line
400
+ - same_line
401
+
402
+ Layout/MultilineAssignmentLayout:
403
+ # The types of assignments which are subject to this rule.
404
+ SupportedTypes:
405
+ - block
406
+ - case
407
+ - class
408
+ - if
409
+ - kwbegin
410
+ - module
411
+ EnforcedStyle: new_line
412
+ SupportedStyles:
413
+ # Ensures that the assignment operator and the rhs are on the same line for
414
+ # the set of supported types.
415
+ - same_line
416
+ # Ensures that the assignment operator and the rhs are on separate lines
417
+ # for the set of supported types.
418
+ - new_line
419
+
420
+ Layout/MultilineHashBraceLayout:
421
+ EnforcedStyle: symmetrical
422
+ SupportedStyles:
423
+ # symmetrical: closing brace is positioned in same way as opening brace
424
+ # new_line: closing brace is always on a new line
425
+ # same_line: closing brace is always on same line as last element
426
+ - symmetrical
427
+ - new_line
428
+ - same_line
429
+
430
+ Layout/MultilineMethodCallBraceLayout:
431
+ EnforcedStyle: symmetrical
432
+ SupportedStyles:
433
+ # symmetrical: closing brace is positioned in same way as opening brace
434
+ # new_line: closing brace is always on a new line
435
+ # same_line: closing brace is always on the same line as last argument
436
+ - symmetrical
437
+ - new_line
438
+ - same_line
439
+
440
+ Layout/MultilineMethodCallIndentation:
441
+ EnforcedStyle: aligned
442
+ SupportedStyles:
443
+ - aligned
444
+ - indented
445
+ - indented_relative_to_receiver
446
+ # By default, the indentation width from Layout/IndentationWidth is used
447
+ # But it can be overridden by setting this parameter
448
+ IndentationWidth: ~
449
+
450
+ Layout/MultilineMethodDefinitionBraceLayout:
451
+ EnforcedStyle: symmetrical
452
+ SupportedStyles:
453
+ # symmetrical: closing brace is positioned in same way as opening brace
454
+ # new_line: closing brace is always on a new line
455
+ # same_line: closing brace is always on the same line as last parameter
456
+ - symmetrical
457
+ - new_line
458
+ - same_line
459
+
460
+ Layout/MultilineOperationIndentation:
461
+ EnforcedStyle: aligned
462
+ SupportedStyles:
463
+ - aligned
464
+ - indented
465
+ # By default, the indentation width from `Layout/IndentationWidth` is used
200
466
  # But it can be overridden by setting this parameter
201
467
  IndentationWidth: ~
202
468
 
469
+ Layout/SpaceAroundBlockParameters:
470
+ EnforcedStyleInsidePipes: no_space
471
+ SupportedStylesInsidePipes:
472
+ - space
473
+ - no_space
474
+
475
+ Layout/SpaceAroundEqualsInParameterDefault:
476
+ EnforcedStyle: space
477
+ SupportedStyles:
478
+ - space
479
+ - no_space
480
+
481
+ Layout/SpaceAroundOperators:
482
+ # When `true`, allows most uses of extra spacing if the intent is to align
483
+ # with an operator on the previous or next line, not counting empty lines
484
+ # or comment lines.
485
+ AllowForAlignment: true
486
+
487
+ Layout/SpaceBeforeBlockBraces:
488
+ EnforcedStyle: space
489
+ SupportedStyles:
490
+ - space
491
+ - no_space
492
+
493
+ Layout/SpaceBeforeFirstArg:
494
+ # When `true`, allows most uses of extra spacing if the intent is to align
495
+ # things with the previous or next line, not counting empty lines or comment
496
+ # lines.
497
+ AllowForAlignment: true
498
+
499
+ Layout/SpaceInsideBlockBraces:
500
+ EnforcedStyle: space
501
+ SupportedStyles:
502
+ - space
503
+ - no_space
504
+ EnforcedStyleForEmptyBraces: no_space
505
+ SupportedStylesForEmptyBraces:
506
+ - space
507
+ - no_space
508
+ # Space between `{` and `|`. Overrides `EnforcedStyle` if there is a conflict.
509
+ SpaceBeforeBlockParameters: true
510
+
511
+ Layout/SpaceInsideHashLiteralBraces:
512
+ EnforcedStyle: space
513
+ SupportedStyles:
514
+ - space
515
+ - no_space
516
+ # 'compact' normally requires a space inside hash braces, with the exception
517
+ # that successive left braces or right braces are collapsed together
518
+ - compact
519
+ EnforcedStyleForEmptyBraces: no_space
520
+ SupportedStylesForEmptyBraces:
521
+ - space
522
+ - no_space
523
+
524
+ Layout/SpaceInsideStringInterpolation:
525
+ EnforcedStyle: no_space
526
+ SupportedStyles:
527
+ - space
528
+ - no_space
529
+
530
+ Layout/TrailingBlankLines:
531
+ EnforcedStyle: final_newline
532
+ SupportedStyles:
533
+ - final_newline
534
+ - final_blank_line
535
+
536
+ #################### Style ###########################
537
+
538
+ Style/Alias:
539
+ EnforcedStyle: prefer_alias
540
+ SupportedStyles:
541
+ - prefer_alias
542
+ - prefer_alias_method
543
+
203
544
  Style/AndOr:
204
545
  # Whether `and` and `or` are banned only in conditionals (conditionals)
205
546
  # or completely (always).
@@ -208,7 +549,6 @@ Style/AndOr:
208
549
  - always
209
550
  - conditionals
210
551
 
211
-
212
552
  # Checks if usage of `%()` or `%Q()` matches configuration.
213
553
  Style/BarePercentLiterals:
214
554
  EnforcedStyle: bare_percent
@@ -301,18 +641,6 @@ Style/BracesAroundHashParameters:
301
641
  # also a hash literal.
302
642
  - context_dependent
303
643
 
304
- # Indentation of `when`.
305
- Style/CaseIndentation:
306
- EnforcedStyle: case
307
- SupportedStyles:
308
- - case
309
- - end
310
- IndentOneStep: false
311
- # By default, the indentation width from `Style/IndentationWidth` is used.
312
- # But it can be overridden by setting this parameter.
313
- # This only matters if `IndentOneStep` is `true`
314
- IndentationWidth: ~
315
-
316
644
  Style/ClassAndModuleChildren:
317
645
  # Checks the style of children definitions at classes and modules.
318
646
  #
@@ -412,58 +740,21 @@ Style/ConditionalAssignment:
412
740
  #
413
741
  Style/Copyright:
414
742
  Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
415
- AutocorrectNotice: ''
416
-
417
- Style/DocumentationMethod:
418
- RequireForNonPublicMethods: false
419
-
420
- # Multi-line method chaining should be done with leading dots.
421
- Style/DotPosition:
422
- EnforcedStyle: leading
423
- SupportedStyles:
424
- - leading
425
- - trailing
426
-
427
- # Warn on empty else statements
428
- # empty - warn only on empty `else`
429
- # nil - warn on `else` with nil in it
430
- # both - warn on empty `else` and `else` with `nil` in it
431
- Style/EmptyElse:
432
- EnforcedStyle: both
433
- SupportedStyles:
434
- - empty
435
- - nil
436
- - both
437
-
438
- # Use empty lines between defs.
439
- Style/EmptyLineBetweenDefs:
440
- # If `true`, this parameter means that single line method definitions don't
441
- # need an empty line between them.
442
- AllowAdjacentOneLineDefs: false
443
- # Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
444
- NumberOfEmptyLines: 1
445
-
446
- Style/EmptyLinesAroundBlockBody:
447
- EnforcedStyle: no_empty_lines
448
- SupportedStyles:
449
- - empty_lines
450
- - no_empty_lines
743
+ AutocorrectNotice: ''
451
744
 
452
- Style/EmptyLinesAroundClassBody:
453
- EnforcedStyle: no_empty_lines
454
- SupportedStyles:
455
- - empty_lines
456
- - empty_lines_except_namespace
457
- - empty_lines_special
458
- - no_empty_lines
745
+ Style/DocumentationMethod:
746
+ RequireForNonPublicMethods: false
459
747
 
460
- Style/EmptyLinesAroundModuleBody:
461
- EnforcedStyle: no_empty_lines
748
+ # Warn on empty else statements
749
+ # empty - warn only on empty `else`
750
+ # nil - warn on `else` with nil in it
751
+ # both - warn on empty `else` and `else` with `nil` in it
752
+ Style/EmptyElse:
753
+ EnforcedStyle: both
462
754
  SupportedStyles:
463
- - empty_lines
464
- - empty_lines_except_namespace
465
- - empty_lines_special
466
- - no_empty_lines
755
+ - empty
756
+ - nil
757
+ - both
467
758
 
468
759
  Style/EmptyMethod:
469
760
  EnforcedStyle: compact
@@ -482,24 +773,6 @@ Style/Encoding:
482
773
  - never
483
774
  AutoCorrectEncodingComment: '# encoding: utf-8'
484
775
 
485
- Style/EndOfLine:
486
- # The `native` style means that CR+LF (Carriage Return + Line Feed) is
487
- # enforced on Windows, and LF is enforced on other platforms. The other styles
488
- # mean LF and CR+LF, respectively.
489
- EnforcedStyle: native
490
- SupportedStyles:
491
- - native
492
- - lf
493
- - crlf
494
-
495
- Style/ExtraSpacing:
496
- # When true, allows most uses of extra spacing if the intent is to align
497
- # things with the previous or next line, not counting empty lines or comment
498
- # lines.
499
- AllowForAlignment: true
500
- # When true, forces the alignment of `=` in assignments on consecutive lines.
501
- ForceEqualSignAlignment: false
502
-
503
776
  Style/FileName:
504
777
  # File names listed in `AllCops:Include` are excluded by default. Add extra
505
778
  # excludes here.
@@ -560,24 +833,6 @@ Style/FileName:
560
833
  - XSRF
561
834
  - XSS
562
835
 
563
- Style/FirstParameterIndentation:
564
- EnforcedStyle: special_for_inner_method_call_in_parentheses
565
- SupportedStyles:
566
- # The first parameter should always be indented one step more than the
567
- # preceding line.
568
- - consistent
569
- # The first parameter should normally be indented one step more than the
570
- # preceding line, but if it's a parameter for a method call that is itself
571
- # a parameter in a method call, then the inner parameter should be indented
572
- # relative to the inner method.
573
- - special_for_inner_method_call
574
- # Same as `special_for_inner_method_call` except that the special rule only
575
- # applies if the outer method call encloses its arguments in parentheses.
576
- - special_for_inner_method_call_in_parentheses
577
- # By default, the indentation width from `Style/IndentationWidth` is used
578
- # But it can be overridden by setting this parameter
579
- IndentationWidth: ~
580
-
581
836
  # Checks use of for or each in multiline loops.
582
837
  Style/For:
583
838
  EnforcedStyle: each
@@ -593,6 +848,16 @@ Style/FormatString:
593
848
  - sprintf
594
849
  - percent
595
850
 
851
+ # Enforce using either `%<token>s` or `%{token}`
852
+ Style/FormatStringToken:
853
+ EnforcedStyle: annotated
854
+ SupportedStyles:
855
+ # Prefer tokens which contain a sprintf like type annotation like
856
+ # `%<name>s`, `%<age>d`, `%<score>f`
857
+ - annotated
858
+ # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
859
+ - template
860
+
596
861
  Style/FrozenStringLiteralComment:
597
862
  EnforcedStyle: when_needed
598
863
  SupportedStyles:
@@ -636,82 +901,6 @@ Style/HashSyntax:
636
901
  Style/IfUnlessModifier:
637
902
  MaxLineLength: 80
638
903
 
639
- Style/IndentationConsistency:
640
- # The difference between `rails` and `normal` is that the `rails` style
641
- # prescribes that in classes and modules the `protected` and `private`
642
- # modifier keywords shall be indented the same as public methods and that
643
- # protected and private members shall be indented one step more than the
644
- # modifiers. Other than that, both styles mean that entities on the same
645
- # logical depth shall have the same indentation.
646
- EnforcedStyle: normal
647
- SupportedStyles:
648
- - normal
649
- - rails
650
-
651
- Style/IndentationWidth:
652
- # Number of spaces for each indentation level.
653
- Width: 2
654
- IgnoredPatterns: []
655
-
656
- # Checks the indentation of the first element in an array literal.
657
- Style/IndentArray:
658
- # The value `special_inside_parentheses` means that array literals with
659
- # brackets that have their opening bracket on the same line as a surrounding
660
- # opening round parenthesis, shall have their first element indented relative
661
- # to the first position inside the parenthesis.
662
- #
663
- # The value `consistent` means that the indentation of the first element shall
664
- # always be relative to the first position of the line where the opening
665
- # bracket is.
666
- #
667
- # The value `align_brackets` means that the indentation of the first element
668
- # shall always be relative to the position of the opening bracket.
669
- EnforcedStyle: special_inside_parentheses
670
- SupportedStyles:
671
- - special_inside_parentheses
672
- - consistent
673
- - align_brackets
674
- # By default, the indentation width from `Style/IndentationWidth` is used
675
- # But it can be overridden by setting this parameter
676
- IndentationWidth: ~
677
-
678
- # Checks the indentation of assignment RHS, when on a different line from LHS
679
- Style/IndentAssignment:
680
- # By default, the indentation width from `Style/IndentationWidth` is used
681
- # But it can be overridden by setting this parameter
682
- IndentationWidth: ~
683
-
684
- # Checks the indentation of the first key in a hash literal.
685
- Style/IndentHash:
686
- # The value `special_inside_parentheses` means that hash literals with braces
687
- # that have their opening brace on the same line as a surrounding opening
688
- # round parenthesis, shall have their first key indented relative to the
689
- # first position inside the parenthesis.
690
- #
691
- # The value `consistent` means that the indentation of the first key shall
692
- # always be relative to the first position of the line where the opening
693
- # brace is.
694
- #
695
- # The value `align_braces` means that the indentation of the first key shall
696
- # always be relative to the position of the opening brace.
697
- EnforcedStyle: special_inside_parentheses
698
- SupportedStyles:
699
- - special_inside_parentheses
700
- - consistent
701
- - align_braces
702
- # By default, the indentation width from `Style/IndentationWidth` is used
703
- # But it can be overridden by setting this parameter
704
- IndentationWidth: ~
705
-
706
- Style/IndentHeredoc:
707
- EnforcedStyle: auto_detection
708
- SupportedStyles:
709
- - auto_detection
710
- - squiggly
711
- - active_support
712
- - powerpack
713
- - unindent
714
-
715
904
  Style/InverseMethods:
716
905
  Enabled: true
717
906
  # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
@@ -741,12 +930,6 @@ Style/Lambda:
741
930
  - lambda
742
931
  - literal
743
932
 
744
- Style/SpaceInLambdaLiteral:
745
- EnforcedStyle: require_no_space
746
- SupportedStyles:
747
- - require_no_space
748
- - require_space
749
-
750
933
  Style/LambdaCall:
751
934
  EnforcedStyle: call
752
935
  SupportedStyles:
@@ -786,89 +969,12 @@ Style/ModuleFunction:
786
969
  - module_function
787
970
  - extend_self
788
971
 
789
- Style/MultilineArrayBraceLayout:
790
- EnforcedStyle: symmetrical
791
- SupportedStyles:
792
- # symmetrical: closing brace is positioned in same way as opening brace
793
- # new_line: closing brace is always on a new line
794
- # same_line: closing brace is always on the same line as last element
795
- - symmetrical
796
- - new_line
797
- - same_line
798
-
799
- Style/MultilineAssignmentLayout:
800
- # The types of assignments which are subject to this rule.
801
- SupportedTypes:
802
- - block
803
- - case
804
- - class
805
- - if
806
- - kwbegin
807
- - module
808
- EnforcedStyle: new_line
809
- SupportedStyles:
810
- # Ensures that the assignment operator and the rhs are on the same line for
811
- # the set of supported types.
812
- - same_line
813
- # Ensures that the assignment operator and the rhs are on separate lines
814
- # for the set of supported types.
815
- - new_line
816
-
817
- Style/MultilineHashBraceLayout:
818
- EnforcedStyle: symmetrical
819
- SupportedStyles:
820
- # symmetrical: closing brace is positioned in same way as opening brace
821
- # new_line: closing brace is always on a new line
822
- # same_line: closing brace is always on same line as last element
823
- - symmetrical
824
- - new_line
825
- - same_line
826
-
827
972
  Style/MultilineMemoization:
828
973
  EnforcedStyle: keyword
829
974
  SupportedStyles:
830
975
  - keyword
831
976
  - braces
832
977
 
833
- Style/MultilineMethodCallBraceLayout:
834
- EnforcedStyle: symmetrical
835
- SupportedStyles:
836
- # symmetrical: closing brace is positioned in same way as opening brace
837
- # new_line: closing brace is always on a new line
838
- # same_line: closing brace is always on the same line as last argument
839
- - symmetrical
840
- - new_line
841
- - same_line
842
-
843
- Style/MultilineMethodCallIndentation:
844
- EnforcedStyle: aligned
845
- SupportedStyles:
846
- - aligned
847
- - indented
848
- - indented_relative_to_receiver
849
- # By default, the indentation width from Style/IndentationWidth is used
850
- # But it can be overridden by setting this parameter
851
- IndentationWidth: ~
852
-
853
- Style/MultilineMethodDefinitionBraceLayout:
854
- EnforcedStyle: symmetrical
855
- SupportedStyles:
856
- # symmetrical: closing brace is positioned in same way as opening brace
857
- # new_line: closing brace is always on a new line
858
- # same_line: closing brace is always on the same line as last parameter
859
- - symmetrical
860
- - new_line
861
- - same_line
862
-
863
- Style/MultilineOperationIndentation:
864
- EnforcedStyle: aligned
865
- SupportedStyles:
866
- - aligned
867
- - indented
868
- # By default, the indentation width from `Style/IndentationWidth` is used
869
- # But it can be overridden by setting this parameter
870
- IndentationWidth: ~
871
-
872
978
  Style/NegatedIf:
873
979
  EnforcedStyle: both
874
980
  SupportedStyles:
@@ -966,7 +1072,7 @@ Style/PredicateName:
966
1072
  # should still be accepted
967
1073
  NameWhitelist:
968
1074
  - is_a?
969
- # Exclude Rspec specs because there is a strong convetion to write spec
1075
+ # Exclude Rspec specs because there is a strong convention to write spec
970
1076
  # helpers in the form of `have_something` or `be_something`.
971
1077
  Exclude:
972
1078
  - 'spec/**/*'
@@ -1029,67 +1135,6 @@ Style/SingleLineBlockParams:
1029
1135
  Style/SingleLineMethods:
1030
1136
  AllowIfMethodIsEmpty: true
1031
1137
 
1032
- Style/SpaceAroundBlockParameters:
1033
- EnforcedStyleInsidePipes: no_space
1034
- SupportedStylesInsidePipes:
1035
- - space
1036
- - no_space
1037
-
1038
- Style/SpaceAroundEqualsInParameterDefault:
1039
- EnforcedStyle: space
1040
- SupportedStyles:
1041
- - space
1042
- - no_space
1043
-
1044
- Style/SpaceAroundOperators:
1045
- # When `true`, allows most uses of extra spacing if the intent is to align
1046
- # with an operator on the previous or next line, not counting empty lines
1047
- # or comment lines.
1048
- AllowForAlignment: true
1049
-
1050
- Style/SpaceBeforeBlockBraces:
1051
- EnforcedStyle: space
1052
- SupportedStyles:
1053
- - space
1054
- - no_space
1055
-
1056
- Style/SpaceBeforeFirstArg:
1057
- # When `true`, allows most uses of extra spacing if the intent is to align
1058
- # things with the previous or next line, not counting empty lines or comment
1059
- # lines.
1060
- AllowForAlignment: true
1061
-
1062
- Style/SpaceInsideBlockBraces:
1063
- EnforcedStyle: space
1064
- SupportedStyles:
1065
- - space
1066
- - no_space
1067
- EnforcedStyleForEmptyBraces: no_space
1068
- SupportedStylesForEmptyBraces:
1069
- - space
1070
- - no_space
1071
- # Space between `{` and `|`. Overrides `EnforcedStyle` if there is a conflict.
1072
- SpaceBeforeBlockParameters: true
1073
-
1074
- Style/SpaceInsideHashLiteralBraces:
1075
- EnforcedStyle: space
1076
- SupportedStyles:
1077
- - space
1078
- - no_space
1079
- # 'compact' normally requires a space inside hash braces, with the exception
1080
- # that successive left braces or right braces are collapsed together
1081
- - compact
1082
- EnforcedStyleForEmptyBraces: no_space
1083
- SupportedStylesForEmptyBraces:
1084
- - space
1085
- - no_space
1086
-
1087
- Style/SpaceInsideStringInterpolation:
1088
- EnforcedStyle: no_space
1089
- SupportedStyles:
1090
- - space
1091
- - no_space
1092
-
1093
1138
  Style/SpecialGlobalVars:
1094
1139
  EnforcedStyle: use_english_names
1095
1140
  SupportedStyles:
@@ -1129,6 +1174,7 @@ Style/StringMethods:
1129
1174
 
1130
1175
  Style/SymbolArray:
1131
1176
  EnforcedStyle: percent
1177
+ MinSize: 0
1132
1178
  SupportedStyles:
1133
1179
  - percent
1134
1180
  - brackets
@@ -1148,12 +1194,6 @@ Style/TernaryParentheses:
1148
1194
  - require_parentheses_when_complex
1149
1195
  AllowSafeAssignment: true
1150
1196
 
1151
- Style/TrailingBlankLines:
1152
- EnforcedStyle: final_newline
1153
- SupportedStyles:
1154
- - final_newline
1155
- - final_blank_line
1156
-
1157
1197
  Style/TrailingCommaInArguments:
1158
1198
  # If `comma`, the cop requires a comma after the last argument, but only for
1159
1199
  # parenthesized method calls where each argument is on its own line.