shoulda-matchers 4.0.0.rc1 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +72 -40
  4. data/lib/shoulda/matchers/action_controller.rb +2 -0
  5. data/lib/shoulda/matchers/active_model.rb +2 -3
  6. data/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +1 -0
  7. data/lib/shoulda/matchers/active_record.rb +2 -0
  8. data/lib/shoulda/matchers/active_record/association_matcher.rb +34 -0
  9. data/lib/shoulda/matchers/active_record/association_matchers/optional_matcher.rb +27 -4
  10. data/lib/shoulda/matchers/active_record/association_matchers/required_matcher.rb +27 -4
  11. data/lib/shoulda/matchers/active_record/validate_uniqueness_of_matcher.rb +1 -1
  12. data/lib/shoulda/matchers/independent.rb +2 -1
  13. data/lib/shoulda/matchers/rails_shim.rb +5 -9
  14. data/lib/shoulda/matchers/version.rb +1 -1
  15. data/lib/shoulda/matchers/warn.rb +1 -0
  16. data/shoulda-matchers.gemspec +11 -3
  17. metadata +13 -340
  18. data/.gitignore +0 -12
  19. data/.hound.yml +0 -3
  20. data/.hound/ruby.yml +0 -1062
  21. data/.python-version +0 -1
  22. data/.rubocop.yml +0 -15
  23. data/.travis.yml +0 -21
  24. data/.yardopts +0 -10
  25. data/Appraisals +0 -105
  26. data/CONTRIBUTING.md +0 -172
  27. data/Gemfile +0 -15
  28. data/Gemfile.lock +0 -59
  29. data/MAINTAINING.md +0 -250
  30. data/NEWS.md +0 -1235
  31. data/Rakefile +0 -46
  32. data/bin/setup +0 -190
  33. data/custom_plan.rb +0 -104
  34. data/doc_config/gh-pages/index.html.erb +0 -9
  35. data/doc_config/yard/setup.rb +0 -22
  36. data/doc_config/yard/templates/default/fulldoc/html/css/bootstrap.css +0 -5967
  37. data/doc_config/yard/templates/default/fulldoc/html/css/full_list.css +0 -12
  38. data/doc_config/yard/templates/default/fulldoc/html/css/global.css +0 -66
  39. data/doc_config/yard/templates/default/fulldoc/html/css/solarized.css +0 -69
  40. data/doc_config/yard/templates/default/fulldoc/html/css/style.css +0 -312
  41. data/doc_config/yard/templates/default/fulldoc/html/full_list.erb +0 -26
  42. data/doc_config/yard/templates/default/fulldoc/html/full_list_class.erb +0 -1
  43. data/doc_config/yard/templates/default/fulldoc/html/full_list_method.erb +0 -8
  44. data/doc_config/yard/templates/default/fulldoc/html/js/app.js +0 -281
  45. data/doc_config/yard/templates/default/fulldoc/html/js/full_list.js +0 -1
  46. data/doc_config/yard/templates/default/fulldoc/html/js/jquery.stickyheaders.js +0 -289
  47. data/doc_config/yard/templates/default/fulldoc/html/js/underscore.min.js +0 -6
  48. data/doc_config/yard/templates/default/fulldoc/html/setup.rb +0 -35
  49. data/doc_config/yard/templates/default/layout/html/breadcrumb.erb +0 -14
  50. data/doc_config/yard/templates/default/layout/html/fonts.erb +0 -1
  51. data/doc_config/yard/templates/default/layout/html/footer.erb +0 -6
  52. data/doc_config/yard/templates/default/layout/html/layout.erb +0 -23
  53. data/doc_config/yard/templates/default/layout/html/search.erb +0 -13
  54. data/doc_config/yard/templates/default/layout/html/setup.rb +0 -40
  55. data/doc_config/yard/templates/default/method_details/html/source.erb +0 -10
  56. data/doc_config/yard/templates/default/module/html/box_info.erb +0 -31
  57. data/gemfiles/4.2.gemfile +0 -39
  58. data/gemfiles/4.2.gemfile.lock +0 -246
  59. data/gemfiles/5.0.gemfile +0 -37
  60. data/gemfiles/5.0.gemfile.lock +0 -238
  61. data/gemfiles/5.1.gemfile +0 -38
  62. data/gemfiles/5.1.gemfile.lock +0 -254
  63. data/gemfiles/5.2.gemfile +0 -40
  64. data/gemfiles/5.2.gemfile.lock +0 -273
  65. data/script/install_gems_in_all_appraisals +0 -16
  66. data/script/run_all_tests +0 -16
  67. data/script/supported_ruby_versions +0 -7
  68. data/script/update_gem_in_all_appraisals +0 -17
  69. data/script/update_gems_in_all_appraisals +0 -16
  70. data/spec/acceptance/active_model_integration_spec.rb +0 -23
  71. data/spec/acceptance/independent_matchers_spec.rb +0 -125
  72. data/spec/acceptance/multiple_libraries_integration_spec.rb +0 -55
  73. data/spec/acceptance/rails_integration_spec.rb +0 -156
  74. data/spec/acceptance_spec_helper.rb +0 -23
  75. data/spec/doublespeak_spec_helper.rb +0 -2
  76. data/spec/report_warnings.rb +0 -7
  77. data/spec/spec_helper.rb +0 -20
  78. data/spec/support/acceptance/adds_shoulda_matchers_to_project.rb +0 -133
  79. data/spec/support/acceptance/helpers.rb +0 -33
  80. data/spec/support/acceptance/helpers/active_model_helpers.rb +0 -11
  81. data/spec/support/acceptance/helpers/array_helpers.rb +0 -13
  82. data/spec/support/acceptance/helpers/base_helpers.rb +0 -19
  83. data/spec/support/acceptance/helpers/command_helpers.rb +0 -68
  84. data/spec/support/acceptance/helpers/file_helpers.rb +0 -19
  85. data/spec/support/acceptance/helpers/gem_helpers.rb +0 -31
  86. data/spec/support/acceptance/helpers/minitest_helpers.rb +0 -11
  87. data/spec/support/acceptance/helpers/n_unit_helpers.rb +0 -25
  88. data/spec/support/acceptance/helpers/pluralization_helpers.rb +0 -13
  89. data/spec/support/acceptance/helpers/rails_migration_helpers.rb +0 -21
  90. data/spec/support/acceptance/helpers/rails_version_helpers.rb +0 -11
  91. data/spec/support/acceptance/helpers/rspec_helpers.rb +0 -24
  92. data/spec/support/acceptance/helpers/ruby_version_helpers.rb +0 -9
  93. data/spec/support/acceptance/helpers/step_helpers.rb +0 -127
  94. data/spec/support/acceptance/matchers/have_output.rb +0 -31
  95. data/spec/support/acceptance/matchers/indicate_number_of_tests_was_run_matcher.rb +0 -55
  96. data/spec/support/acceptance/matchers/indicate_that_tests_were_run_matcher.rb +0 -103
  97. data/spec/support/tests/bundle.rb +0 -94
  98. data/spec/support/tests/command_runner.rb +0 -230
  99. data/spec/support/tests/current_bundle.rb +0 -55
  100. data/spec/support/tests/database.rb +0 -28
  101. data/spec/support/tests/database_adapters/postgresql.rb +0 -25
  102. data/spec/support/tests/database_adapters/sqlite3.rb +0 -26
  103. data/spec/support/tests/database_configuration.rb +0 -33
  104. data/spec/support/tests/database_configuration_registry.rb +0 -28
  105. data/spec/support/tests/filesystem.rb +0 -100
  106. data/spec/support/tests/version.rb +0 -45
  107. data/spec/support/unit/active_record/create_table.rb +0 -54
  108. data/spec/support/unit/attribute.rb +0 -45
  109. data/spec/support/unit/capture.rb +0 -46
  110. data/spec/support/unit/change_value.rb +0 -111
  111. data/spec/support/unit/create_model_arguments/basic.rb +0 -135
  112. data/spec/support/unit/create_model_arguments/has_many.rb +0 -15
  113. data/spec/support/unit/create_model_arguments/uniqueness_matcher.rb +0 -74
  114. data/spec/support/unit/helpers/action_pack_versions.rb +0 -22
  115. data/spec/support/unit/helpers/active_model_helpers.rb +0 -27
  116. data/spec/support/unit/helpers/active_model_versions.rb +0 -32
  117. data/spec/support/unit/helpers/active_record_versions.rb +0 -44
  118. data/spec/support/unit/helpers/active_resource_builder.rb +0 -27
  119. data/spec/support/unit/helpers/allow_value_matcher_helpers.rb +0 -15
  120. data/spec/support/unit/helpers/class_builder.rb +0 -90
  121. data/spec/support/unit/helpers/column_type_helpers.rb +0 -26
  122. data/spec/support/unit/helpers/confirmation_matcher_helpers.rb +0 -17
  123. data/spec/support/unit/helpers/controller_builder.rb +0 -63
  124. data/spec/support/unit/helpers/database_helpers.rb +0 -20
  125. data/spec/support/unit/helpers/i18n_faker.rb +0 -15
  126. data/spec/support/unit/helpers/mailer_builder.rb +0 -12
  127. data/spec/support/unit/helpers/message_helpers.rb +0 -19
  128. data/spec/support/unit/helpers/model_builder.rb +0 -114
  129. data/spec/support/unit/helpers/rails_versions.rb +0 -42
  130. data/spec/support/unit/helpers/validation_matcher_scenario_helpers.rb +0 -44
  131. data/spec/support/unit/i18n.rb +0 -7
  132. data/spec/support/unit/load_environment.rb +0 -12
  133. data/spec/support/unit/matchers/deprecate.rb +0 -60
  134. data/spec/support/unit/matchers/fail_with_message_including_matcher.rb +0 -51
  135. data/spec/support/unit/matchers/fail_with_message_matcher.rb +0 -64
  136. data/spec/support/unit/matchers/print_warning_including.rb +0 -67
  137. data/spec/support/unit/model_creation_strategies/active_model.rb +0 -111
  138. data/spec/support/unit/model_creation_strategies/active_record.rb +0 -77
  139. data/spec/support/unit/model_creators.rb +0 -19
  140. data/spec/support/unit/model_creators/active_model.rb +0 -39
  141. data/spec/support/unit/model_creators/active_record.rb +0 -42
  142. data/spec/support/unit/model_creators/active_record/has_and_belongs_to_many.rb +0 -95
  143. data/spec/support/unit/model_creators/active_record/has_many.rb +0 -67
  144. data/spec/support/unit/model_creators/active_record/uniqueness_matcher.rb +0 -42
  145. data/spec/support/unit/model_creators/basic.rb +0 -102
  146. data/spec/support/unit/rails_application.rb +0 -151
  147. data/spec/support/unit/record_builder_with_i18n_validation_message.rb +0 -69
  148. data/spec/support/unit/record_validating_confirmation_builder.rb +0 -54
  149. data/spec/support/unit/record_with_different_error_attribute_builder.rb +0 -92
  150. data/spec/support/unit/shared_examples/ignoring_interference_by_writer.rb +0 -79
  151. data/spec/support/unit/shared_examples/numerical_submatcher.rb +0 -17
  152. data/spec/support/unit/shared_examples/set_session_or_flash.rb +0 -360
  153. data/spec/support/unit/validation_matcher_scenario.rb +0 -60
  154. data/spec/unit/shoulda/matchers/action_controller/callback_matcher_spec.rb +0 -82
  155. data/spec/unit/shoulda/matchers/action_controller/filter_param_matcher_spec.rb +0 -28
  156. data/spec/unit/shoulda/matchers/action_controller/permit_matcher_spec.rb +0 -629
  157. data/spec/unit/shoulda/matchers/action_controller/redirect_to_matcher_spec.rb +0 -42
  158. data/spec/unit/shoulda/matchers/action_controller/render_template_matcher_spec.rb +0 -76
  159. data/spec/unit/shoulda/matchers/action_controller/render_with_layout_matcher_spec.rb +0 -62
  160. data/spec/unit/shoulda/matchers/action_controller/rescue_from_matcher_spec.rb +0 -90
  161. data/spec/unit/shoulda/matchers/action_controller/respond_with_matcher_spec.rb +0 -31
  162. data/spec/unit/shoulda/matchers/action_controller/route_matcher_spec.rb +0 -330
  163. data/spec/unit/shoulda/matchers/action_controller/route_params_spec.rb +0 -30
  164. data/spec/unit/shoulda/matchers/action_controller/set_flash_matcher_spec.rb +0 -67
  165. data/spec/unit/shoulda/matchers/action_controller/set_session_matcher_spec.rb +0 -17
  166. data/spec/unit/shoulda/matchers/action_controller/set_session_or_flash_matcher_spec.rb +0 -562
  167. data/spec/unit/shoulda/matchers/active_model/allow_mass_assignment_of_matcher_spec.rb +0 -117
  168. data/spec/unit/shoulda/matchers/active_model/allow_value_matcher_spec.rb +0 -829
  169. data/spec/unit/shoulda/matchers/active_model/disallow_value_matcher_spec.rb +0 -86
  170. data/spec/unit/shoulda/matchers/active_model/have_secure_password_matcher_spec.rb +0 -20
  171. data/spec/unit/shoulda/matchers/active_model/helpers_spec.rb +0 -162
  172. data/spec/unit/shoulda/matchers/active_model/validate_absence_of_matcher_spec.rb +0 -290
  173. data/spec/unit/shoulda/matchers/active_model/validate_acceptance_of_matcher_spec.rb +0 -109
  174. data/spec/unit/shoulda/matchers/active_model/validate_confirmation_of_matcher_spec.rb +0 -172
  175. data/spec/unit/shoulda/matchers/active_model/validate_exclusion_of_matcher_spec.rb +0 -264
  176. data/spec/unit/shoulda/matchers/active_model/validate_inclusion_of_matcher_spec.rb +0 -1049
  177. data/spec/unit/shoulda/matchers/active_model/validate_length_of_matcher_spec.rb +0 -335
  178. data/spec/unit/shoulda/matchers/active_model/validate_numericality_of_matcher_spec.rb +0 -1865
  179. data/spec/unit/shoulda/matchers/active_model/validate_presence_of_matcher_spec.rb +0 -406
  180. data/spec/unit/shoulda/matchers/active_record/accept_nested_attributes_for_matcher_spec.rb +0 -107
  181. data/spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb +0 -1672
  182. data/spec/unit/shoulda/matchers/active_record/association_matchers/model_reflection_spec.rb +0 -251
  183. data/spec/unit/shoulda/matchers/active_record/define_enum_for_matcher_spec.rb +0 -690
  184. data/spec/unit/shoulda/matchers/active_record/have_db_column_matcher_spec.rb +0 -111
  185. data/spec/unit/shoulda/matchers/active_record/have_db_index_matcher_spec.rb +0 -85
  186. data/spec/unit/shoulda/matchers/active_record/have_readonly_attributes_matcher_spec.rb +0 -41
  187. data/spec/unit/shoulda/matchers/active_record/have_secure_token_matcher_spec.rb +0 -169
  188. data/spec/unit/shoulda/matchers/active_record/serialize_matcher_spec.rb +0 -86
  189. data/spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb +0 -1682
  190. data/spec/unit/shoulda/matchers/doublespeak/double_collection_spec.rb +0 -190
  191. data/spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb +0 -21
  192. data/spec/unit/shoulda/matchers/doublespeak/double_spec.rb +0 -271
  193. data/spec/unit/shoulda/matchers/doublespeak/object_double_spec.rb +0 -77
  194. data/spec/unit/shoulda/matchers/doublespeak/proxy_implementation_spec.rb +0 -72
  195. data/spec/unit/shoulda/matchers/doublespeak/stub_implementation_spec.rb +0 -101
  196. data/spec/unit/shoulda/matchers/doublespeak/world_spec.rb +0 -78
  197. data/spec/unit/shoulda/matchers/doublespeak_spec.rb +0 -27
  198. data/spec/unit/shoulda/matchers/independent/delegate_method_matcher/stubbed_target_spec.rb +0 -43
  199. data/spec/unit/shoulda/matchers/independent/delegate_method_matcher_spec.rb +0 -650
  200. data/spec/unit/shoulda/matchers/routing/route_matcher_spec.rb +0 -406
  201. data/spec/unit/shoulda/matchers/util/word_wrap_spec.rb +0 -252
  202. data/spec/unit_spec_helper.rb +0 -54
  203. data/spec/warnings_spy.rb +0 -64
  204. data/spec/warnings_spy/filesystem.rb +0 -45
  205. data/spec/warnings_spy/partitioner.rb +0 -36
  206. data/spec/warnings_spy/reader.rb +0 -53
  207. data/spec/warnings_spy/reporter.rb +0 -88
  208. data/tasks/documentation.rb +0 -199
  209. data/zeus.json +0 -11
@@ -1,1062 +0,0 @@
1
- AllCops:
2
- Include:
3
- - "**/*.rake"
4
- - "**/Gemfile"
5
- - "**/Rakefile"
6
- Exclude:
7
- - "vendor/**/*"
8
- - "db/**/*"
9
- DisplayCopNames: false
10
- StyleGuideCopsOnly: false
11
- Naming/AccessorMethodName:
12
- Description: Check the naming of accessor methods for get_/set_.
13
- Enabled: false
14
- Naming/AsciiIdentifiers:
15
- Description: Use only ascii symbols in identifiers.
16
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
17
- Enabled: false
18
- Naming/BinaryOperatorParameterName:
19
- Description: When defining binary operators, name the argument other.
20
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
21
- Enabled: false
22
- Naming/ClassAndModuleCamelCase:
23
- Description: Use CamelCase for classes and modules.
24
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
25
- Enabled: true
26
- Naming/ConstantName:
27
- Description: Constants should use SCREAMING_SNAKE_CASE.
28
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
29
- Enabled: true
30
- Naming/FileName:
31
- Description: Use snake_case for source file names.
32
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
33
- Enabled: false
34
- Exclude: []
35
- Naming/MethodName:
36
- Description: Use the configured style when naming methods.
37
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
38
- Enabled: true
39
- EnforcedStyle: snake_case
40
- SupportedStyles:
41
- - snake_case
42
- - camelCase
43
- Naming/PredicateName:
44
- Description: Check the names of predicate methods.
45
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
46
- Enabled: true
47
- NamePrefix:
48
- - is_
49
- - has_
50
- - have_
51
- NamePrefixBlacklist:
52
- - is_
53
- Naming/VariableName:
54
- Description: Use the configured style when naming variables.
55
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
56
- Enabled: true
57
- EnforcedStyle: snake_case
58
- SupportedStyles:
59
- - snake_case
60
- - camelCase
61
- Rails:
62
- Enabled: true
63
- Style/AndOr:
64
- Description: Use &&/|| instead of and/or.
65
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
66
- Enabled: true
67
- EnforcedStyle: always
68
- SupportedStyles:
69
- - always
70
- - conditionals
71
- Style/BarePercentLiterals:
72
- Description: Checks if usage of %() or %Q() matches configuration.
73
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
74
- Enabled: true
75
- EnforcedStyle: bare_percent
76
- SupportedStyles:
77
- - percent_q
78
- - bare_percent
79
- Style/BracesAroundHashParameters:
80
- Description: Enforce braces style around hash parameters.
81
- Enabled: true
82
- EnforcedStyle: no_braces
83
- SupportedStyles:
84
- - braces
85
- - no_braces
86
- - context_dependent
87
- Style/ClassAndModuleChildren:
88
- Description: Checks style of children classes and modules.
89
- Enabled: false
90
- EnforcedStyle: nested
91
- SupportedStyles:
92
- - nested
93
- - compact
94
- Style/ClassCheck:
95
- Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
96
- Enabled: true
97
- EnforcedStyle: is_a?
98
- SupportedStyles:
99
- - is_a?
100
- - kind_of?
101
- Style/CollectionMethods:
102
- Description: Preferred collection methods.
103
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
104
- Enabled: true
105
- PreferredMethods:
106
- collect: map
107
- collect!: map!
108
- inject: reduce
109
- detect: find
110
- find_all: select
111
- find: detect
112
- Style/CommentAnnotation:
113
- Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
114
- REVIEW).
115
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
116
- Enabled: false
117
- Keywords:
118
- - TODO
119
- - FIXME
120
- - OPTIMIZE
121
- - HACK
122
- - REVIEW
123
- Style/Encoding:
124
- Description: Use UTF-8 as the source file encoding.
125
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
126
- Enabled: false
127
- Style/FrozenStringLiteralComment:
128
- Description: >-
129
- Add the frozen_string_literal comment to the top of files
130
- to help transition from Ruby 2.3.0 to Ruby 3.0.
131
- Enabled: false
132
- Style/For:
133
- Description: Checks use of for or each in multiline loops.
134
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
135
- Enabled: true
136
- EnforcedStyle: each
137
- SupportedStyles:
138
- - for
139
- - each
140
- Style/FormatString:
141
- Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
142
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
143
- Enabled: false
144
- EnforcedStyle: format
145
- SupportedStyles:
146
- - format
147
- - sprintf
148
- - percent
149
- Style/GlobalVars:
150
- Description: Do not introduce global variables.
151
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
152
- Enabled: false
153
- AllowedVariables: []
154
- Style/GuardClause:
155
- Description: Check for conditionals that can be replaced with guard clauses
156
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
157
- Enabled: false
158
- MinBodyLength: 1
159
- Style/HashSyntax:
160
- Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
161
- 1, :b => 2 }.'
162
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
163
- Enabled: true
164
- EnforcedStyle: ruby19
165
- SupportedStyles:
166
- - ruby19
167
- - hash_rockets
168
- Style/IfUnlessModifier:
169
- Description: Favor modifier if/unless usage when you have a single-line body.
170
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
171
- Enabled: false
172
- Style/LambdaCall:
173
- Description: Use lambda.call(...) instead of lambda.(...).
174
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
175
- Enabled: false
176
- EnforcedStyle: call
177
- SupportedStyles:
178
- - call
179
- - braces
180
- Style/Next:
181
- Description: Use `next` to skip iteration instead of a condition at the end.
182
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
183
- Enabled: false
184
- EnforcedStyle: skip_modifier_ifs
185
- MinBodyLength: 3
186
- SupportedStyles:
187
- - skip_modifier_ifs
188
- - always
189
- Style/NonNilCheck:
190
- Description: Checks for redundant nil checks.
191
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
192
- Enabled: true
193
- IncludeSemanticChanges: false
194
- Style/MethodDefParentheses:
195
- Description: Checks if the method definitions have or don't have parentheses.
196
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
197
- Enabled: true
198
- EnforcedStyle: require_parentheses
199
- SupportedStyles:
200
- - require_parentheses
201
- - require_no_parentheses
202
- Style/NumericLiterals:
203
- Description: Add underscores to large numeric literals to improve their readability.
204
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
205
- Enabled: false
206
- MinDigits: 5
207
- Style/NumericPredicate:
208
- Enabled: false
209
- Style/ParenthesesAroundCondition:
210
- Description: Don't use parentheses around the condition of an if/unless/while.
211
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
212
- Enabled: true
213
- AllowSafeAssignment: true
214
- Style/PercentLiteralDelimiters:
215
- Description: Use `%`-literal delimiters consistently
216
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
217
- Enabled: false
218
- PreferredDelimiters:
219
- "%": "()"
220
- "%i": "()"
221
- "%q": "()"
222
- "%Q": "()"
223
- "%r": "{}"
224
- "%s": "()"
225
- "%w": "()"
226
- "%W": "()"
227
- "%x": "()"
228
- Style/PercentQLiterals:
229
- Description: Checks if uses of %Q/%q match the configured preference.
230
- Enabled: true
231
- EnforcedStyle: lower_case_q
232
- SupportedStyles:
233
- - lower_case_q
234
- - upper_case_q
235
- Style/RaiseArgs:
236
- Description: Checks the arguments passed to raise/fail.
237
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
238
- Enabled: false
239
- EnforcedStyle: exploded
240
- SupportedStyles:
241
- - compact
242
- - exploded
243
- Style/RedundantReturn:
244
- Description: Don't use return where it's not required.
245
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
246
- Enabled: true
247
- AllowMultipleReturnValues: false
248
- Style/RegexpLiteral:
249
- Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
250
- characters. Use %r only for regular expressions matching more than `MaxSlashes`
251
- '/' character.
252
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
253
- Enabled: false
254
- Style/Semicolon:
255
- Description: Don't use semicolons to terminate expressions.
256
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
257
- Enabled: true
258
- AllowAsExpressionSeparator: false
259
- Style/SignalException:
260
- Description: Checks for proper usage of fail and raise.
261
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
262
- Enabled: false
263
- EnforcedStyle: semantic
264
- SupportedStyles:
265
- - only_raise
266
- - only_fail
267
- - semantic
268
- Style/SingleLineBlockParams:
269
- Description: Enforces the names of some block params.
270
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
271
- Enabled: false
272
- Methods:
273
- - reduce:
274
- - a
275
- - e
276
- - inject:
277
- - a
278
- - e
279
- Style/SingleLineMethods:
280
- Description: Avoid single-line methods.
281
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
282
- Enabled: false
283
- AllowIfMethodIsEmpty: true
284
- Style/StringLiterals:
285
- Description: Checks if uses of quotes match the configured preference.
286
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
287
- Enabled: true
288
- EnforcedStyle: double_quotes
289
- SupportedStyles:
290
- - single_quotes
291
- - double_quotes
292
- Style/StringLiteralsInInterpolation:
293
- Description: Checks if uses of quotes inside expressions in interpolated strings
294
- match the configured preference.
295
- Enabled: true
296
- EnforcedStyle: single_quotes
297
- SupportedStyles:
298
- - single_quotes
299
- - double_quotes
300
- Style/SymbolProc:
301
- Description: Use symbols as procs instead of blocks when possible.
302
- Enabled: true
303
- IgnoredMethods:
304
- - respond_to
305
- Style/TrailingCommaInArrayLiteral:
306
- Enabled: true
307
- Style/TrailingCommaInHashLiteral:
308
- Enabled: true
309
- Style/TrailingCommaInArguments:
310
- Description: Checks for trailing comma in parameter lists and literals.
311
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
312
- Enabled: true
313
- EnforcedStyleForMultiline: comma
314
- SupportedStylesForMultiline:
315
- - comma
316
- - no_comma
317
- Style/TrivialAccessors:
318
- Description: Prefer attr_* methods to trivial readers/writers.
319
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
320
- Enabled: false
321
- ExactNameMatch: false
322
- AllowPredicates: false
323
- AllowDSLWriters: false
324
- Whitelist:
325
- - to_ary
326
- - to_a
327
- - to_c
328
- - to_enum
329
- - to_h
330
- - to_hash
331
- - to_i
332
- - to_int
333
- - to_io
334
- - to_open
335
- - to_path
336
- - to_proc
337
- - to_r
338
- - to_regexp
339
- - to_str
340
- - to_s
341
- - to_sym
342
- Style/WhileUntilModifier:
343
- Description: Favor modifier while/until usage when you have a single-line body.
344
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
345
- Enabled: false
346
- Style/WordArray:
347
- Description: Use %w or %W for arrays of words.
348
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
349
- Enabled: false
350
- MinSize: 0
351
- WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
352
- Metrics/AbcSize:
353
- Description: A calculated magnitude based on number of assignments, branches, and
354
- conditions.
355
- Enabled: true
356
- Max: 15
357
- Metrics/BlockLength:
358
- Exclude:
359
- - "spec/**/*"
360
- Metrics/BlockNesting:
361
- Description: Avoid excessive block nesting
362
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
363
- Enabled: true
364
- Max: 3
365
- Metrics/ClassLength:
366
- Description: Avoid classes longer than 100 lines of code.
367
- Enabled: false
368
- CountComments: false
369
- Max: 100
370
- Metrics/CyclomaticComplexity:
371
- Description: A complexity metric that is strongly correlated to the number of test
372
- cases needed to validate a method.
373
- Enabled: true
374
- Max: 6
375
- Metrics/LineLength:
376
- Description: Limit lines to 80 characters.
377
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
378
- Enabled: true
379
- Max: 80
380
- AllowURI: true
381
- URISchemes:
382
- - http
383
- - https
384
- Metrics/MethodLength:
385
- Description: Avoid methods longer than 10 lines of code.
386
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
387
- Enabled: true
388
- CountComments: true
389
- Max: 10
390
- Exclude:
391
- - "spec/**/*"
392
- Metrics/ParameterLists:
393
- Description: Avoid long parameter lists.
394
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
395
- Enabled: true
396
- Max: 5
397
- CountKeywordArgs: true
398
- Metrics/PerceivedComplexity:
399
- Description: A complexity metric geared towards measuring complexity for a human
400
- reader.
401
- Enabled: true
402
- Max: 7
403
- Lint/AssignmentInCondition:
404
- Description: Don't use assignment in conditions.
405
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
406
- Enabled: false
407
- AllowSafeAssignment: true
408
- Layout/EndAlignment:
409
- Description: Align ends correctly.
410
- Enabled: true
411
- EnforcedStyleAlignWith: keyword
412
- SupportedStylesAlignWith:
413
- - keyword
414
- - variable
415
- Layout/DefEndAlignment:
416
- Description: Align ends corresponding to defs correctly.
417
- Enabled: true
418
- EnforcedStyleAlignWith: start_of_line
419
- SupportedStylesAlignWith:
420
- - start_of_line
421
- - def
422
- Rails/ActionFilter:
423
- Description: Enforces consistent use of action filter methods.
424
- Enabled: true
425
- EnforcedStyle: action
426
- SupportedStyles:
427
- - action
428
- - filter
429
- Include:
430
- - app/controllers/**/*.rb
431
- Rails/HasAndBelongsToMany:
432
- Description: Prefer has_many :through to has_and_belongs_to_many.
433
- Enabled: true
434
- Include:
435
- - app/models/**/*.rb
436
- Rails/HttpPositionalArguments:
437
- Enabled: false
438
- Rails/Output:
439
- Description: Checks for calls to puts, print, etc.
440
- Enabled: true
441
- Include:
442
- - app/**/*.rb
443
- - config/**/*.rb
444
- - db/**/*.rb
445
- - lib/**/*.rb
446
- Rails/ReadWriteAttribute:
447
- Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
448
- Enabled: true
449
- Include:
450
- - app/models/**/*.rb
451
- Rails/ScopeArgs:
452
- Description: Checks the arguments of ActiveRecord scopes.
453
- Enabled: true
454
- Include:
455
- - app/models/**/*.rb
456
- Rails/Validation:
457
- Description: Use validates :attribute, hash of validations.
458
- Enabled: true
459
- Include:
460
- - app/models/**/*.rb
461
- Style/InlineComment:
462
- Description: Avoid inline comments.
463
- Enabled: false
464
- Style/MethodCalledOnDoEndBlock:
465
- Description: Avoid chaining a method call on a do...end block.
466
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
467
- Enabled: false
468
- Style/SymbolArray:
469
- Description: Use %i or %I for arrays of symbols.
470
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
471
- Enabled: false
472
- Style/Alias:
473
- Description: Use alias_method instead of alias.
474
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
475
- Enabled: false
476
- Style/ArrayJoin:
477
- Description: Use Array#join instead of Array#*.
478
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
479
- Enabled: false
480
- Style/AsciiComments:
481
- Description: Use only ascii symbols in comments.
482
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
483
- Enabled: false
484
- Style/Attr:
485
- Description: Checks for uses of Module#attr.
486
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
487
- Enabled: false
488
- Style/BeginBlock:
489
- Description: Avoid the use of BEGIN blocks.
490
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
491
- Enabled: true
492
- Style/BlockComments:
493
- Description: Do not use block comments.
494
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
495
- Enabled: true
496
- Style/BlockDelimiters:
497
- Description: Avoid using {...} for multi-line blocks (multiline chaining is always
498
- ugly). Prefer {...} over do...end for single-line blocks.
499
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
500
- Enabled: true
501
- Style/CaseEquality:
502
- Description: Avoid explicit use of the case equality operator(===).
503
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
504
- Enabled: false
505
- Style/CharacterLiteral:
506
- Description: Checks for uses of character literals.
507
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
508
- Enabled: false
509
- Style/ClassMethods:
510
- Description: Use self when defining module/class methods.
511
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
512
- Enabled: true
513
- Style/ClassVars:
514
- Description: Avoid the use of class variables.
515
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
516
- Enabled: false
517
- Style/ColonMethodCall:
518
- Description: 'Do not use :: for method call.'
519
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
520
- Enabled: false
521
- Style/DefWithParentheses:
522
- Description: Use def with parentheses when there are arguments.
523
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
524
- Enabled: true
525
- Style/Documentation:
526
- Description: Document classes and non-namespace modules.
527
- Enabled: false
528
- Style/DoubleNegation:
529
- Description: Checks for uses of double negation (!!).
530
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
531
- Enabled: false
532
- Style/EachWithObject:
533
- Description: Prefer `each_with_object` over `inject` or `reduce`.
534
- Enabled: false
535
- Style/EmptyElse:
536
- Description: Avoid empty else-clauses.
537
- Enabled: true
538
- Style/EmptyLiteral:
539
- Description: Prefer literals to Array.new/Hash.new/String.new.
540
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
541
- Enabled: false
542
- Style/EndBlock:
543
- Description: Avoid the use of END blocks.
544
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
545
- Enabled: true
546
- Style/EvenOdd:
547
- Description: Favor the use of Fixnum#even? && Fixnum#odd?
548
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
549
- Enabled: false
550
- Style/FlipFlop:
551
- Description: Checks for flip flops
552
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
553
- Enabled: false
554
- Style/IfWithSemicolon:
555
- Description: Do not use if x; .... Use the ternary operator instead.
556
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
557
- Enabled: false
558
- Style/InfiniteLoop:
559
- Description: Use Kernel#loop for infinite loops.
560
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
561
- Enabled: true
562
- Style/Lambda:
563
- Description: Use the new lambda literal syntax for single-line blocks.
564
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
565
- Enabled: false
566
- Style/LineEndConcatenation:
567
- Description: Use \ instead of + or << to concatenate two string literals at line
568
- end.
569
- Enabled: false
570
- Style/MethodCallWithoutArgsParentheses:
571
- Description: Do not use parentheses for method calls with no arguments.
572
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
573
- Enabled: true
574
- Style/ModuleFunction:
575
- Description: Checks for usage of `extend self` in modules.
576
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
577
- Enabled: false
578
- Style/MultilineIfThen:
579
- Description: Do not use then for multi-line if/unless.
580
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
581
- Enabled: true
582
- Style/MultilineTernaryOperator:
583
- Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
584
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
585
- Enabled: true
586
- Style/NegatedIf:
587
- Description: Favor unless over if for negative conditions (or control flow or).
588
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
589
- Enabled: false
590
- Style/NegatedWhile:
591
- Description: Favor until over while for negative conditions.
592
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
593
- Enabled: false
594
- Style/NestedTernaryOperator:
595
- Description: Use one expression per branch in a ternary operator.
596
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
597
- Enabled: true
598
- Style/NilComparison:
599
- Description: Prefer x.nil? to x == nil.
600
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
601
- Enabled: false
602
- Style/Not:
603
- Description: Use ! instead of not.
604
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
605
- Enabled: false
606
- Style/OneLineConditional:
607
- Description: Favor the ternary operator(?:) over if/then/else/end constructs.
608
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
609
- Enabled: false
610
- Style/PerlBackrefs:
611
- Description: Avoid Perl-style regex back references.
612
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
613
- Enabled: false
614
- Style/PreferredHashMethods:
615
- Description: Checks for use of deprecated Hash methods.
616
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
617
- Enabled: false
618
- Style/Proc:
619
- Description: Use proc instead of Proc.new.
620
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
621
- Enabled: false
622
- Style/RedundantBegin:
623
- Description: Don't use begin blocks when they are not needed.
624
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
625
- Enabled: true
626
- Style/RedundantException:
627
- Description: Checks for an obsolete RuntimeException argument in raise/fail.
628
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
629
- Enabled: true
630
- Style/RedundantSelf:
631
- Description: Don't use self where it's not needed.
632
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
633
- Enabled: true
634
- Style/RescueModifier:
635
- Description: Avoid using rescue in its modifier form.
636
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
637
- Enabled: true
638
- Style/SelfAssignment:
639
- Description: Checks for places where self-assignment shorthand should have been
640
- used.
641
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
642
- Enabled: false
643
- Style/SpecialGlobalVars:
644
- Description: Avoid Perl-style global variables.
645
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
646
- Enabled: false
647
- Style/StructInheritance:
648
- Description: Checks for inheritance from Struct.new.
649
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
650
- Enabled: true
651
- Style/UnlessElse:
652
- Description: Do not use unless with else. Rewrite these with the positive case first.
653
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
654
- Enabled: true
655
- Style/UnneededCapitalW:
656
- Description: Checks for %W when interpolation is not needed.
657
- Enabled: true
658
- Style/UnneededPercentQ:
659
- Description: Checks for %q/%Q when single quotes or double quotes would do.
660
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
661
- Enabled: true
662
- Style/CommandLiteral:
663
- Description: Checks for %x when `` would do.
664
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
665
- Enabled: true
666
- Style/VariableInterpolation:
667
- Description: Don't interpolate global, instance and class variables directly in
668
- strings.
669
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
670
- Enabled: false
671
- Style/WhenThen:
672
- Description: Use when x then ... for one-line cases.
673
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
674
- Enabled: false
675
- Style/WhileUntilDo:
676
- Description: Checks for redundant do after while or until.
677
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
678
- Enabled: true
679
- Layout/AccessModifierIndentation:
680
- Description: Check indentation of private/protected visibility modifiers.
681
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
682
- Enabled: true
683
- EnforcedStyle: indent
684
- SupportedStyles:
685
- - outdent
686
- - indent
687
- Layout/AlignHash:
688
- Description: Align the elements of a hash literal if they span more than one line.
689
- Enabled: true
690
- EnforcedHashRocketStyle: key
691
- EnforcedColonStyle: key
692
- EnforcedLastArgumentHashStyle: always_inspect
693
- SupportedLastArgumentHashStyles:
694
- - always_inspect
695
- - always_ignore
696
- - ignore_implicit
697
- - ignore_explicit
698
- Layout/AlignParameters:
699
- Description: Align the parameters of a method call if they span more than one line.
700
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
701
- Enabled: true
702
- EnforcedStyle: with_first_parameter
703
- SupportedStyles:
704
- - with_first_parameter
705
- - with_fixed_indentation
706
- Layout/CaseIndentation:
707
- Description: Indentation of when in a case/when/[else/]end.
708
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
709
- Enabled: true
710
- EnforcedStyle: case
711
- SupportedStyles:
712
- - case
713
- - end
714
- IndentOneStep: false
715
- Layout/CommentIndentation:
716
- Description: Indentation of comments.
717
- Enabled: true
718
- Layout/DotPosition:
719
- Description: Checks the position of the dot in multi-line method calls.
720
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
721
- Enabled: true
722
- EnforcedStyle: trailing
723
- SupportedStyles:
724
- - leading
725
- - trailing
726
- Layout/EmptyLineBetweenDefs:
727
- Description: Use empty lines between defs.
728
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
729
- Enabled: true
730
- AllowAdjacentOneLineDefs: false
731
- Layout/EmptyLinesAroundBlockBody:
732
- Description: Keeps track of empty lines around block bodies.
733
- Enabled: true
734
- EnforcedStyle: no_empty_lines
735
- SupportedStyles:
736
- - empty_lines
737
- - no_empty_lines
738
- Layout/EmptyLinesAroundClassBody:
739
- Description: Keeps track of empty lines around class bodies.
740
- Enabled: true
741
- EnforcedStyle: no_empty_lines
742
- SupportedStyles:
743
- - empty_lines
744
- - no_empty_lines
745
- Layout/EmptyLinesAroundModuleBody:
746
- Description: Keeps track of empty lines around module bodies.
747
- Enabled: true
748
- EnforcedStyle: no_empty_lines
749
- SupportedStyles:
750
- - empty_lines
751
- - no_empty_lines
752
- Layout/FirstParameterIndentation:
753
- Description: Checks the indentation of the first parameter in a method call.
754
- Enabled: true
755
- EnforcedStyle: special_for_inner_method_call_in_parentheses
756
- SupportedStyles:
757
- - consistent
758
- - special_for_inner_method_call
759
- - special_for_inner_method_call_in_parentheses
760
- Layout/IndentationWidth:
761
- Description: Use 2 spaces for indentation.
762
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
763
- Enabled: true
764
- Width: 2
765
- Layout/IndentHash:
766
- Description: Checks the indentation of the first key in a hash literal.
767
- Enabled: true
768
- EnforcedStyle: special_inside_parentheses
769
- SupportedStyles:
770
- - special_inside_parentheses
771
- - consistent
772
- Layout/MultilineMethodCallIndentation:
773
- Description: Checks indentation of method calls with the dot operator
774
- that span more than one line.
775
- Enabled: true
776
- EnforcedStyle: indented
777
- SupportedStyles:
778
- - aligned
779
- - indented
780
- Layout/MultilineOperationIndentation:
781
- Description: Checks indentation of binary operations that span more than one line.
782
- Enabled: true
783
- EnforcedStyle: indented
784
- SupportedStyles:
785
- - aligned
786
- - indented
787
- Layout/SpaceAroundBlockParameters:
788
- Description: Checks the spacing inside and after block parameters pipes.
789
- Enabled: true
790
- EnforcedStyleInsidePipes: no_space
791
- SupportedStylesInsidePipes:
792
- - space
793
- - no_space
794
- Layout/SpaceAroundEqualsInParameterDefault:
795
- Description: Checks that the equals signs in parameter default assignments have
796
- or don't have surrounding space depending on configuration.
797
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
798
- Enabled: true
799
- EnforcedStyle: space
800
- SupportedStyles:
801
- - space
802
- - no_space
803
- Layout/SpaceBeforeBlockBraces:
804
- Description: Checks that the left block brace has or doesn't have space before it.
805
- Enabled: true
806
- EnforcedStyle: space
807
- SupportedStyles:
808
- - space
809
- - no_space
810
- Layout/SpaceBeforeFirstArg:
811
- Description: Put a space between a method name and the first argument in a method
812
- call without parentheses.
813
- Enabled: true
814
- Layout/SpaceInsideBlockBraces:
815
- Description: Checks that block braces have or don't have surrounding space. For
816
- blocks taking parameters, checks that the left brace has or doesn't have trailing
817
- space.
818
- Enabled: true
819
- EnforcedStyle: space
820
- SupportedStyles:
821
- - space
822
- - no_space
823
- EnforcedStyleForEmptyBraces: no_space
824
- SpaceBeforeBlockParameters: true
825
- Layout/SpaceInsideHashLiteralBraces:
826
- Description: Use spaces inside hash literal braces - or don't.
827
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
828
- Enabled: true
829
- EnforcedStyle: space
830
- EnforcedStyleForEmptyBraces: no_space
831
- SupportedStyles:
832
- - space
833
- - no_space
834
- Layout/TrailingBlankLines:
835
- Description: Checks trailing blank lines and final newline.
836
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
837
- Enabled: true
838
- EnforcedStyle: final_newline
839
- SupportedStyles:
840
- - final_newline
841
- - final_blank_line
842
- Layout/ExtraSpacing:
843
- Description: Do not use unnecessary spacing.
844
- Enabled: true
845
- Layout/AlignArray:
846
- Description: Align the elements of an array literal if they span more than one line.
847
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
848
- Enabled: true
849
- Layout/BlockEndNewline:
850
- Description: Put end statement of multiline block on its own line.
851
- Enabled: true
852
- Layout/CommentIndentation:
853
- Description: Indentation of comments.
854
- Enabled: true
855
- Layout/ElseAlignment:
856
- Description: Align elses and elsifs correctly.
857
- Enabled: true
858
- Layout/EmptyLines:
859
- Description: Don't use several empty lines in a row.
860
- Enabled: true
861
- Layout/EmptyLinesAroundAccessModifier:
862
- Description: Keep blank lines around access modifiers.
863
- Enabled: true
864
- Layout/EmptyLinesAroundMethodBody:
865
- Description: Keeps track of empty lines around method bodies.
866
- Enabled: true
867
- Layout/EndOfLine:
868
- Description: Use Unix-style line endings.
869
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
870
- Enabled: true
871
- Layout/IndentationConsistency:
872
- Description: Keep indentation straight.
873
- Enabled: true
874
- Layout/IndentArray:
875
- Description: Checks the indentation of the first element in an array literal.
876
- Enabled: true
877
- Layout/LeadingCommentSpace:
878
- Description: Comments should start with a space.
879
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
880
- Enabled: true
881
- Layout/MultilineBlockLayout:
882
- Description: Ensures newlines after multiline block do statements.
883
- Enabled: true
884
- Layout/SpaceBeforeFirstArg:
885
- Description: Checks that exactly one space is used between a method name and the
886
- first argument for method calls without parentheses.
887
- Enabled: true
888
- Layout/SpaceAfterColon:
889
- Description: Use spaces after colons.
890
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
891
- Enabled: true
892
- Layout/SpaceAfterComma:
893
- Description: Use spaces after commas.
894
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
895
- Enabled: true
896
- Layout/SpaceAroundKeyword:
897
- Description: Use spaces after if/elsif/unless/while/until/case/when.
898
- Enabled: true
899
- Layout/SpaceAfterMethodName:
900
- Description: Do not put a space between a method name and the opening parenthesis
901
- in a method definition.
902
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
903
- Enabled: true
904
- Layout/SpaceAfterNot:
905
- Description: Tracks redundant space after the ! operator.
906
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
907
- Enabled: true
908
- Layout/SpaceAfterSemicolon:
909
- Description: Use spaces after semicolons.
910
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
911
- Enabled: true
912
- Layout/SpaceBeforeComma:
913
- Description: No spaces before commas.
914
- Enabled: true
915
- Layout/SpaceBeforeComment:
916
- Description: Checks for missing space between code and a comment on the same line.
917
- Enabled: true
918
- Layout/SpaceBeforeSemicolon:
919
- Description: No spaces before semicolons.
920
- Enabled: true
921
- Layout/SpaceAroundOperators:
922
- Description: Use spaces around operators.
923
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
924
- Enabled: true
925
- Layout/SpaceAroundKeyword:
926
- Description: Put a space before the modifier keyword.
927
- Enabled: true
928
- #Layout/SpaceInsideBrackets:
929
- #Description: No spaces after [ or before ].
930
- #StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
931
- #Enabled: true
932
- Layout/SpaceInsideParens:
933
- Description: No spaces after ( or before ).
934
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
935
- Enabled: true
936
- Layout/SpaceInsideRangeLiteral:
937
- Description: No spaces inside range literals.
938
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
939
- Enabled: true
940
- Layout/Tab:
941
- Description: No hard tabs.
942
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
943
- Enabled: true
944
- Layout/TrailingWhitespace:
945
- Description: Avoid trailing whitespace.
946
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
947
- Enabled: true
948
- Lint/AmbiguousOperator:
949
- Description: Checks for ambiguous operators in the first argument of a method invocation
950
- without parentheses.
951
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
952
- Enabled: false
953
- Lint/AmbiguousRegexpLiteral:
954
- Description: Checks for ambiguous regexp literals in the first argument of a method
955
- invocation without parenthesis.
956
- Enabled: false
957
- Layout/BlockAlignment:
958
- Description: Align block ends correctly.
959
- Enabled: true
960
- Layout/ConditionPosition:
961
- Description: Checks for condition placed in a confusing position relative to the
962
- keyword.
963
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
964
- Enabled: false
965
- Lint/Debugger:
966
- Description: Check for debugger calls.
967
- Enabled: true
968
- Lint/DeprecatedClassMethods:
969
- Description: Check for deprecated class method calls.
970
- Enabled: false
971
- Lint/DuplicateMethods:
972
- Description: Check for duplicate methods calls.
973
- Enabled: true
974
- Lint/ElseLayout:
975
- Description: Check for odd code arrangement in an else block.
976
- Enabled: false
977
- Lint/EmptyEnsure:
978
- Description: Checks for empty ensure block.
979
- Enabled: true
980
- Lint/EmptyInterpolation:
981
- Description: Checks for empty string interpolation.
982
- Enabled: true
983
- Lint/EndInMethod:
984
- Description: END blocks should not be placed inside method definitions.
985
- Enabled: true
986
- Lint/EnsureReturn:
987
- Description: Do not use return in an ensure block.
988
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
989
- Enabled: true
990
- Lint/HandleExceptions:
991
- Description: Don't suppress exception.
992
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
993
- Enabled: false
994
- #Lint/LiteralInCondition:
995
- #Description: Checks of literals used in conditions.
996
- #Enabled: false
997
- Lint/LiteralInInterpolation:
998
- Description: Checks for literals used in interpolation.
999
- Enabled: false
1000
- Lint/Loop:
1001
- Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1002
- for post-loop tests.
1003
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
1004
- Enabled: false
1005
- Lint/ParenthesesAsGroupedExpression:
1006
- Description: Checks for method calls with a space before the opening parenthesis.
1007
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1008
- Enabled: false
1009
- Lint/RequireParentheses:
1010
- Description: Use parentheses in the method call to avoid confusion about precedence.
1011
- Enabled: false
1012
- Lint/RescueException:
1013
- Description: Avoid rescuing the Exception class.
1014
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
1015
- Enabled: true
1016
- Lint/ShadowingOuterLocalVariable:
1017
- Description: Do not use the same name as outer local variable for block arguments
1018
- or block local variables.
1019
- Enabled: true
1020
- Lint/StringConversionInInterpolation:
1021
- Description: Checks for Object#to_s usage in string interpolation.
1022
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1023
- Enabled: true
1024
- Lint/UnderscorePrefixedVariableName:
1025
- Description: Do not use prefix `_` for a variable that is used.
1026
- Enabled: false
1027
- Lint/UnusedBlockArgument:
1028
- Description: Checks for unused block arguments.
1029
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1030
- Enabled: true
1031
- Lint/UnusedMethodArgument:
1032
- Description: Checks for unused method arguments.
1033
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1034
- Enabled: true
1035
- Lint/UnreachableCode:
1036
- Description: Unreachable code.
1037
- Enabled: true
1038
- Lint/UselessAccessModifier:
1039
- Description: Checks for useless access modifiers.
1040
- Enabled: true
1041
- Lint/UselessAssignment:
1042
- Description: Checks for useless assignment to a local variable.
1043
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1044
- Enabled: true
1045
- Lint/UselessComparison:
1046
- Description: Checks for comparison of something with itself.
1047
- Enabled: true
1048
- Lint/UselessElseWithoutRescue:
1049
- Description: Checks for useless `else` in `begin..end` without `rescue`.
1050
- Enabled: true
1051
- Lint/UselessSetterCall:
1052
- Description: Checks for useless setter call to a local variable.
1053
- Enabled: true
1054
- Lint/Void:
1055
- Description: Possible use of operator/literal/variable in void context.
1056
- Enabled: false
1057
- Rails/Delegate:
1058
- Description: Prefer delegate method for delegations.
1059
- Enabled: false
1060
- Security/Eval:
1061
- Description: The use of eval represents a serious security risk.
1062
- Enabled: true