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