generapp 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.hound.yml +2 -0
- data/.rubocop.yml +8 -0
- data/.rubocop_defaults.yml +1631 -0
- data/.rubocop_todo.yml +47 -0
- data/CHANGELOG.md +7 -0
- data/README.md +5 -0
- data/bin/generapp +3 -1
- data/generapp.gemspec +1 -0
- data/lib/generapp/actions/configuration.rb +19 -12
- data/lib/generapp/actions/database.rb +2 -1
- data/lib/generapp/actions/develop.rb +39 -33
- data/lib/generapp/actions/production.rb +3 -1
- data/lib/generapp/actions/test.rb +9 -3
- data/lib/generapp/actions/views.rb +3 -1
- data/lib/generapp/app_builder.rb +3 -8
- data/lib/generapp/generators/app_generator.rb +34 -31
- data/lib/generapp/version.rb +9 -1
- data/lib/generapp.rb +11 -0
- data/templates/Gemfile.erb +12 -12
- data/templates/config/postgresql_database.yml.erb +0 -2
- data/templates/config/puma.rb +2 -2
- data/templates/generapp_gitignore +6 -2
- data/templates/spec/rails_helper.rb +11 -2
- data/templates/tasks/auto_annotate_models.rake +34 -26
- data/templates/tasks/bundler_audit.rake +2 -2
- metadata +26 -3
- data/lib/generapp/actions/files.rb +0 -14
@@ -0,0 +1,1631 @@
|
|
1
|
+
Style/AccessModifierIndentation:
|
2
|
+
Description: Check indentation of private/protected visibility modifiers.
|
3
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
|
4
|
+
Enabled: true
|
5
|
+
Style/AccessorMethodName:
|
6
|
+
Description: Check the naming of accessor methods for get_/set_.
|
7
|
+
Enabled: true
|
8
|
+
Style/Alias:
|
9
|
+
Description: 'Use alias_method instead of alias.'
|
10
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
11
|
+
Enabled: true
|
12
|
+
Style/AlignArray:
|
13
|
+
Description: >-
|
14
|
+
Align the elements of an array literal if they span more than
|
15
|
+
one line.
|
16
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
|
17
|
+
Enabled: true
|
18
|
+
Style/AlignHash:
|
19
|
+
Description: >-
|
20
|
+
Align the elements of a hash literal if they span more than
|
21
|
+
one line.
|
22
|
+
Enabled: true
|
23
|
+
Style/AlignParameters:
|
24
|
+
Description: >-
|
25
|
+
Align the parameters of a method call if they span more
|
26
|
+
than one line.
|
27
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
28
|
+
Enabled: true
|
29
|
+
Style/AndOr:
|
30
|
+
Description: 'Use &&/|| instead of and/or.'
|
31
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
|
32
|
+
Enabled: true
|
33
|
+
Style/ArrayJoin:
|
34
|
+
Description: 'Use Array#join instead of Array#*.'
|
35
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
36
|
+
Enabled: true
|
37
|
+
Style/AsciiComments:
|
38
|
+
Description: 'Use only ascii symbols in comments.'
|
39
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
40
|
+
Enabled: true
|
41
|
+
Style/AsciiIdentifiers:
|
42
|
+
Description: 'Use only ascii symbols in identifiers.'
|
43
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
44
|
+
Enabled: true
|
45
|
+
Style/Attr:
|
46
|
+
Description: 'Checks for uses of Module#attr.'
|
47
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
48
|
+
Enabled: true
|
49
|
+
Style/BeginBlock:
|
50
|
+
Description: 'Avoid the use of BEGIN blocks.'
|
51
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
|
52
|
+
Enabled: true
|
53
|
+
Style/BarePercentLiterals:
|
54
|
+
Description: 'Checks if usage of %() or %Q() matches configuration.'
|
55
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
|
56
|
+
Enabled: true
|
57
|
+
Style/BlockComments:
|
58
|
+
Description: 'Do not use block comments.'
|
59
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
|
60
|
+
Enabled: true
|
61
|
+
Style/BlockEndNewline:
|
62
|
+
Description: 'Put end statement of multiline block on its own line.'
|
63
|
+
Enabled: true
|
64
|
+
Style/BlockDelimiters:
|
65
|
+
Description: >-
|
66
|
+
Avoid using {...} for multi-line blocks (multiline chaining is
|
67
|
+
always ugly).
|
68
|
+
Prefer {...} over do...end for single-line blocks.
|
69
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
70
|
+
Enabled: true
|
71
|
+
Style/BracesAroundHashParameters:
|
72
|
+
Description: 'Enforce braces style around hash parameters.'
|
73
|
+
Enabled: true
|
74
|
+
Style/CaseEquality:
|
75
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
76
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
77
|
+
Enabled: true
|
78
|
+
Style/CaseIndentation:
|
79
|
+
Description: 'Indentation of when in a case/when/[else/]end.'
|
80
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
|
81
|
+
Enabled: true
|
82
|
+
Style/CharacterLiteral:
|
83
|
+
Description: 'Checks for uses of character literals.'
|
84
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
85
|
+
Enabled: true
|
86
|
+
Style/ClassAndModuleCamelCase:
|
87
|
+
Description: 'Use CamelCase for classes and modules.'
|
88
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
|
89
|
+
Enabled: true
|
90
|
+
Style/ClassAndModuleChildren:
|
91
|
+
Description: 'Checks style of children classes and modules.'
|
92
|
+
Enabled: true
|
93
|
+
Style/ClassCheck:
|
94
|
+
Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
|
95
|
+
Enabled: true
|
96
|
+
Style/ClassMethods:
|
97
|
+
Description: 'Use self when defining module/class methods.'
|
98
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
|
99
|
+
Enabled: true
|
100
|
+
Style/ClassVars:
|
101
|
+
Description: 'Avoid the use of class variables.'
|
102
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
103
|
+
Enabled: true
|
104
|
+
Style/ClosingParenthesisIndentation:
|
105
|
+
Description: 'Checks the indentation of hanging closing parentheses.'
|
106
|
+
Enabled: true
|
107
|
+
Style/ColonMethodCall:
|
108
|
+
Description: 'Do not use :: for method call.'
|
109
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
110
|
+
Enabled: true
|
111
|
+
Style/CommandLiteral:
|
112
|
+
Description: 'Use `` or %x around command literals.'
|
113
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
|
114
|
+
Enabled: true
|
115
|
+
Style/CommentAnnotation:
|
116
|
+
Description: >-
|
117
|
+
Checks formatting of special comments
|
118
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
119
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
120
|
+
Enabled: true
|
121
|
+
Style/CommentIndentation:
|
122
|
+
Description: 'Indentation of comments.'
|
123
|
+
Enabled: true
|
124
|
+
Style/ConditionalAssignment:
|
125
|
+
Description: >-
|
126
|
+
Use the return value of `if` and `case` statements for
|
127
|
+
assignment to a variable and variable comparison instead
|
128
|
+
of assigning that variable inside of each branch.
|
129
|
+
Enabled: true
|
130
|
+
SingleLineConditionsOnly: true
|
131
|
+
Style/ConstantName:
|
132
|
+
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
133
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
|
134
|
+
Enabled: true
|
135
|
+
Style/DefWithParentheses:
|
136
|
+
Description: 'Use def with parentheses when there are arguments.'
|
137
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
138
|
+
Enabled: true
|
139
|
+
Style/DeprecatedHashMethods:
|
140
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
141
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
142
|
+
Enabled: true
|
143
|
+
Style/Documentation:
|
144
|
+
Description: 'Document classes and non-namespace modules.'
|
145
|
+
Enabled: true
|
146
|
+
Exclude:
|
147
|
+
- 'spec/**/*'
|
148
|
+
- 'test/**/*'
|
149
|
+
Style/DotPosition:
|
150
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
151
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
152
|
+
Enabled: true
|
153
|
+
Style/DoubleNegation:
|
154
|
+
Description: 'Checks for uses of double negation (!!).'
|
155
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
156
|
+
Enabled: true
|
157
|
+
Style/EachWithObject:
|
158
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
159
|
+
Enabled: true
|
160
|
+
Style/ElseAlignment:
|
161
|
+
Description: 'Align elses and elsifs correctly.'
|
162
|
+
Enabled: true
|
163
|
+
Style/EmptyElse:
|
164
|
+
Description: 'Avoid empty else-clauses.'
|
165
|
+
Enabled: true
|
166
|
+
Style/EmptyLineBetweenDefs:
|
167
|
+
Description: 'Use empty lines between defs.'
|
168
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
169
|
+
Enabled: true
|
170
|
+
Style/EmptyLines:
|
171
|
+
Description: "Don't use several empty lines in a row."
|
172
|
+
Enabled: true
|
173
|
+
Style/EmptyLinesAroundAccessModifier:
|
174
|
+
Description: "Keep blank lines around access modifiers."
|
175
|
+
Enabled: true
|
176
|
+
Style/EmptyLinesAroundBlockBody:
|
177
|
+
Description: "Keeps track of empty lines around block bodies."
|
178
|
+
Enabled: true
|
179
|
+
Style/EmptyLinesAroundClassBody:
|
180
|
+
Description: "Keeps track of empty lines around class bodies."
|
181
|
+
Enabled: true
|
182
|
+
Style/EmptyLinesAroundModuleBody:
|
183
|
+
Description: "Keeps track of empty lines around module bodies."
|
184
|
+
Enabled: true
|
185
|
+
Style/EmptyLinesAroundMethodBody:
|
186
|
+
Description: "Keeps track of empty lines around method bodies."
|
187
|
+
Enabled: true
|
188
|
+
Style/EmptyLiteral:
|
189
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
190
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
191
|
+
Enabled: true
|
192
|
+
Style/EndBlock:
|
193
|
+
Description: 'Avoid the use of END blocks.'
|
194
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
|
195
|
+
Enabled: true
|
196
|
+
Style/EndOfLine:
|
197
|
+
Description: 'Use Unix-style line endings.'
|
198
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
199
|
+
Enabled: true
|
200
|
+
Style/EvenOdd:
|
201
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
202
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
203
|
+
Enabled: true
|
204
|
+
Style/ExtraSpacing:
|
205
|
+
Description: 'Do not use unnecessary spacing.'
|
206
|
+
Enabled: true
|
207
|
+
Style/FileName:
|
208
|
+
Description: 'Use snake_case for source file names.'
|
209
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
210
|
+
Enabled: true
|
211
|
+
Style/FrozenStringLiteralComment:
|
212
|
+
Description: >-
|
213
|
+
Add the frozen_string_literal comment to the top of files
|
214
|
+
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
215
|
+
Enabled: true
|
216
|
+
Style/InitialIndentation:
|
217
|
+
Description: >-
|
218
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
219
|
+
Enabled: true
|
220
|
+
Style/FirstParameterIndentation:
|
221
|
+
Description: 'Checks the indentation of the first parameter in a method call.'
|
222
|
+
Enabled: true
|
223
|
+
Style/FlipFlop:
|
224
|
+
Description: 'Checks for flip flops'
|
225
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
226
|
+
Enabled: true
|
227
|
+
Style/For:
|
228
|
+
Description: 'Checks use of for or each in multiline loops.'
|
229
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
|
230
|
+
Enabled: true
|
231
|
+
Style/FormatString:
|
232
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
233
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
234
|
+
Enabled: true
|
235
|
+
Style/GlobalVars:
|
236
|
+
Description: 'Do not introduce global variables.'
|
237
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
238
|
+
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
239
|
+
Enabled: true
|
240
|
+
Style/GuardClause:
|
241
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
242
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
243
|
+
Enabled: true
|
244
|
+
Style/HashSyntax:
|
245
|
+
Description: >-
|
246
|
+
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
247
|
+
{ :a => 1, :b => 2 }.
|
248
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
249
|
+
Enabled: true
|
250
|
+
Style/IfInsideElse:
|
251
|
+
Description: 'Finds if nodes inside else, which can be converted to elsif.'
|
252
|
+
Enabled: true
|
253
|
+
Style/IfUnlessModifier:
|
254
|
+
Description: >-
|
255
|
+
Favor modifier if/unless usage when you have a
|
256
|
+
single-line body.
|
257
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
258
|
+
Enabled: true
|
259
|
+
Style/IfWithSemicolon:
|
260
|
+
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
261
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
262
|
+
Enabled: true
|
263
|
+
Style/IndentationConsistency:
|
264
|
+
Description: 'Keep indentation straight.'
|
265
|
+
Enabled: true
|
266
|
+
Style/IndentationWidth:
|
267
|
+
Description: 'Use 2 spaces for indentation.'
|
268
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
269
|
+
Enabled: true
|
270
|
+
Style/IdenticalConditionalBranches:
|
271
|
+
Description: >-
|
272
|
+
Checks that conditional statements do not have an identical
|
273
|
+
line at the end of each branch, which can validly be moved
|
274
|
+
out of the conditional.
|
275
|
+
Enabled: true
|
276
|
+
Style/IndentArray:
|
277
|
+
Description: >-
|
278
|
+
Checks the indentation of the first element in an array
|
279
|
+
literal.
|
280
|
+
Enabled: true
|
281
|
+
Style/IndentAssignment:
|
282
|
+
Description: >-
|
283
|
+
Checks the indentation of the first line of the
|
284
|
+
right-hand-side of a multi-line assignment.
|
285
|
+
Enabled: true
|
286
|
+
Style/IndentHash:
|
287
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
288
|
+
Enabled: true
|
289
|
+
Style/InfiniteLoop:
|
290
|
+
Description: 'Use Kernel#loop for infinite loops.'
|
291
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
|
292
|
+
Enabled: true
|
293
|
+
Style/Lambda:
|
294
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
295
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
296
|
+
Enabled: true
|
297
|
+
Style/LambdaCall:
|
298
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
299
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
300
|
+
Enabled: true
|
301
|
+
Style/LeadingCommentSpace:
|
302
|
+
Description: 'Comments should start with a space.'
|
303
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
304
|
+
Enabled: true
|
305
|
+
Style/LineEndConcatenation:
|
306
|
+
Description: >-
|
307
|
+
Use \ instead of + or << to concatenate two string literals at
|
308
|
+
line end.
|
309
|
+
Enabled: true
|
310
|
+
Style/MethodCallParentheses:
|
311
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
312
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
313
|
+
Enabled: true
|
314
|
+
Style/MethodDefParentheses:
|
315
|
+
Description: >-
|
316
|
+
Checks if the method definitions have or don't have
|
317
|
+
parentheses.
|
318
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
319
|
+
Enabled: true
|
320
|
+
Style/MethodName:
|
321
|
+
Description: 'Use the configured style when naming methods.'
|
322
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
323
|
+
Enabled: true
|
324
|
+
Style/ModuleFunction:
|
325
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
326
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
327
|
+
Enabled: true
|
328
|
+
Style/MultilineBlockChain:
|
329
|
+
Description: 'Avoid multi-line chains of blocks.'
|
330
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
331
|
+
Enabled: true
|
332
|
+
Style/MultilineBlockLayout:
|
333
|
+
Description: 'Ensures newlines after multiline block do statements.'
|
334
|
+
Enabled: true
|
335
|
+
Style/MultilineIfThen:
|
336
|
+
Description: 'Do not use then for multi-line if/unless.'
|
337
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
|
338
|
+
Enabled: true
|
339
|
+
Style/MultilineMethodCallIndentation:
|
340
|
+
Description: >-
|
341
|
+
Checks indentation of method calls with the dot operator
|
342
|
+
that span more than one line.
|
343
|
+
Enabled: true
|
344
|
+
Style/MultilineOperationIndentation:
|
345
|
+
Description: >-
|
346
|
+
Checks indentation of binary operations that span more than
|
347
|
+
one line.
|
348
|
+
Enabled: true
|
349
|
+
Style/MultilineTernaryOperator:
|
350
|
+
Description: >-
|
351
|
+
Avoid multi-line ?: (the ternary operator);
|
352
|
+
use if/unless instead.
|
353
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
354
|
+
Enabled: true
|
355
|
+
Style/MutableConstant:
|
356
|
+
Description: 'Do not assign mutable objects to constants.'
|
357
|
+
Enabled: true
|
358
|
+
Style/NegatedIf:
|
359
|
+
Description: >-
|
360
|
+
Favor unless over if for negative conditions
|
361
|
+
(or control flow or).
|
362
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
363
|
+
Enabled: true
|
364
|
+
Style/NegatedWhile:
|
365
|
+
Description: 'Favor until over while for negative conditions.'
|
366
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
367
|
+
Enabled: true
|
368
|
+
Style/NestedModifier:
|
369
|
+
Description: 'Avoid using nested modifiers.'
|
370
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers'
|
371
|
+
Enabled: true
|
372
|
+
Style/NestedParenthesizedCalls:
|
373
|
+
Description: >-
|
374
|
+
Parenthesize method calls which are nested inside the
|
375
|
+
argument list of another parenthesized method call.
|
376
|
+
Enabled: true
|
377
|
+
Style/NestedTernaryOperator:
|
378
|
+
Description: 'Use one expression per branch in a ternary operator.'
|
379
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
380
|
+
Enabled: true
|
381
|
+
Style/Next:
|
382
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
383
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
384
|
+
Enabled: true
|
385
|
+
Style/NilComparison:
|
386
|
+
Description: 'Prefer x.nil? to x == nil.'
|
387
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
388
|
+
Enabled: true
|
389
|
+
Style/NonNilCheck:
|
390
|
+
Description: 'Checks for redundant nil checks.'
|
391
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
|
392
|
+
Enabled: true
|
393
|
+
Style/Not:
|
394
|
+
Description: 'Use ! instead of not.'
|
395
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
396
|
+
Enabled: true
|
397
|
+
Style/NumericLiterals:
|
398
|
+
Description: >-
|
399
|
+
Add underscores to large numeric literals to improve their
|
400
|
+
readability.
|
401
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
402
|
+
Enabled: true
|
403
|
+
Style/OneLineConditional:
|
404
|
+
Description: >-
|
405
|
+
Favor the ternary operator(?:) over
|
406
|
+
if/then/else/end constructs.
|
407
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
408
|
+
Enabled: true
|
409
|
+
Style/OpMethod:
|
410
|
+
Description: 'When defining binary operators, name the argument other.'
|
411
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
412
|
+
Enabled: true
|
413
|
+
Style/OptionalArguments:
|
414
|
+
Description: >-
|
415
|
+
Checks for optional arguments that do not appear at the end
|
416
|
+
of the argument list
|
417
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
|
418
|
+
Enabled: true
|
419
|
+
Style/ParallelAssignment:
|
420
|
+
Description: >-
|
421
|
+
Check for simple usages of parallel assignment.
|
422
|
+
It will only warn when the number of variables
|
423
|
+
matches on both sides of the assignment.
|
424
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
|
425
|
+
Enabled: true
|
426
|
+
Style/ParenthesesAroundCondition:
|
427
|
+
Description: >-
|
428
|
+
Don't use parentheses around the condition of an
|
429
|
+
if/unless/while.
|
430
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
|
431
|
+
Enabled: true
|
432
|
+
Style/PercentLiteralDelimiters:
|
433
|
+
Description: 'Use `%`-literal delimiters consistently'
|
434
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
435
|
+
Enabled: true
|
436
|
+
Style/PercentQLiterals:
|
437
|
+
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
438
|
+
Enabled: true
|
439
|
+
Style/PerlBackrefs:
|
440
|
+
Description: 'Avoid Perl-style regex back references.'
|
441
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
442
|
+
Enabled: true
|
443
|
+
Style/PredicateName:
|
444
|
+
Description: 'Check the names of predicate methods.'
|
445
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
446
|
+
Enabled: true
|
447
|
+
Style/Proc:
|
448
|
+
Description: 'Use proc instead of Proc.new.'
|
449
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
450
|
+
Enabled: true
|
451
|
+
Style/RaiseArgs:
|
452
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
453
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
454
|
+
Enabled: true
|
455
|
+
Style/RedundantBegin:
|
456
|
+
Description: "Don't use begin blocks when they are not needed."
|
457
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
|
458
|
+
Enabled: true
|
459
|
+
Style/RedundantException:
|
460
|
+
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
461
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
|
462
|
+
Enabled: true
|
463
|
+
Style/RedundantFreeze:
|
464
|
+
Description: "Checks usages of Object#freeze on immutable objects."
|
465
|
+
Enabled: true
|
466
|
+
Style/RedundantParentheses:
|
467
|
+
Description: "Checks for parentheses that seem not to serve any purpose."
|
468
|
+
Enabled: true
|
469
|
+
Style/RedundantReturn:
|
470
|
+
Description: "Don't use return where it's not required."
|
471
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
|
472
|
+
Enabled: true
|
473
|
+
Style/RedundantSelf:
|
474
|
+
Description: "Don't use self where it's not needed."
|
475
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
|
476
|
+
Enabled: true
|
477
|
+
Style/RegexpLiteral:
|
478
|
+
Description: 'Use / or %r around regular expressions.'
|
479
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
480
|
+
Enabled: true
|
481
|
+
Style/RescueEnsureAlignment:
|
482
|
+
Description: 'Align rescues and ensures correctly.'
|
483
|
+
Enabled: true
|
484
|
+
Style/RescueModifier:
|
485
|
+
Description: 'Avoid using rescue in its modifier form.'
|
486
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
|
487
|
+
Enabled: true
|
488
|
+
Style/SelfAssignment:
|
489
|
+
Description: >-
|
490
|
+
Checks for places where self-assignment shorthand should have
|
491
|
+
been used.
|
492
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
493
|
+
Enabled: true
|
494
|
+
Style/Semicolon:
|
495
|
+
Description: "Don't use semicolons to terminate expressions."
|
496
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
|
497
|
+
Enabled: true
|
498
|
+
Style/SignalException:
|
499
|
+
Description: 'Checks for proper usage of fail and raise.'
|
500
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
501
|
+
Enabled: true
|
502
|
+
Style/SingleLineBlockParams:
|
503
|
+
Description: 'Enforces the names of some block params.'
|
504
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
505
|
+
Enabled: true
|
506
|
+
Style/SingleLineMethods:
|
507
|
+
Description: 'Avoid single-line methods.'
|
508
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
509
|
+
Enabled: true
|
510
|
+
Style/SpaceBeforeFirstArg:
|
511
|
+
Description: >-
|
512
|
+
Checks that exactly one space is used between a method name
|
513
|
+
and the first argument for method calls without parentheses.
|
514
|
+
Enabled: true
|
515
|
+
Style/SpaceAfterColon:
|
516
|
+
Description: 'Use spaces after colons.'
|
517
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
518
|
+
Enabled: true
|
519
|
+
Style/SpaceAfterComma:
|
520
|
+
Description: 'Use spaces after commas.'
|
521
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
522
|
+
Enabled: true
|
523
|
+
Style/SpaceAfterMethodName:
|
524
|
+
Description: >-
|
525
|
+
Do not put a space between a method name and the opening
|
526
|
+
parenthesis in a method definition.
|
527
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
528
|
+
Enabled: true
|
529
|
+
Style/SpaceAfterNot:
|
530
|
+
Description: Tracks redundant space after the ! operator.
|
531
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
|
532
|
+
Enabled: true
|
533
|
+
Style/SpaceAfterSemicolon:
|
534
|
+
Description: 'Use spaces after semicolons.'
|
535
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
536
|
+
Enabled: true
|
537
|
+
Style/SpaceBeforeBlockBraces:
|
538
|
+
Description: >-
|
539
|
+
Checks that the left block brace has or doesn't have space
|
540
|
+
before it.
|
541
|
+
Enabled: true
|
542
|
+
Style/SpaceBeforeComma:
|
543
|
+
Description: 'No spaces before commas.'
|
544
|
+
Enabled: true
|
545
|
+
Style/SpaceBeforeComment:
|
546
|
+
Description: >-
|
547
|
+
Checks for missing space between code and a comment on the
|
548
|
+
same line.
|
549
|
+
Enabled: true
|
550
|
+
Style/SpaceBeforeSemicolon:
|
551
|
+
Description: 'No spaces before semicolons.'
|
552
|
+
Enabled: true
|
553
|
+
Style/SpaceInsideBlockBraces:
|
554
|
+
Description: >-
|
555
|
+
Checks that block braces have or don't have surrounding space.
|
556
|
+
For blocks taking parameters, checks that the left brace has
|
557
|
+
or doesn't have trailing space.
|
558
|
+
Enabled: true
|
559
|
+
Style/SpaceAroundBlockParameters:
|
560
|
+
Description: 'Checks the spacing inside and after block parameters pipes.'
|
561
|
+
Enabled: true
|
562
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
563
|
+
Description: >-
|
564
|
+
Checks that the equals signs in parameter default assignments
|
565
|
+
have or don't have surrounding space depending on
|
566
|
+
configuration.
|
567
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
|
568
|
+
Enabled: true
|
569
|
+
Style/SpaceAroundKeyword:
|
570
|
+
Description: 'Use a space around keywords if appropriate.'
|
571
|
+
Enabled: true
|
572
|
+
Style/SpaceAroundOperators:
|
573
|
+
Description: 'Use a single space around operators.'
|
574
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
575
|
+
Enabled: true
|
576
|
+
Style/SpaceInsideBrackets:
|
577
|
+
Description: 'No spaces after [ or before ].'
|
578
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
579
|
+
Enabled: true
|
580
|
+
Style/SpaceInsideHashLiteralBraces:
|
581
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
582
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
583
|
+
Enabled: true
|
584
|
+
Style/SpaceInsideParens:
|
585
|
+
Description: 'No spaces after ( or before ).'
|
586
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
587
|
+
Enabled: true
|
588
|
+
Style/SpaceInsideRangeLiteral:
|
589
|
+
Description: 'No spaces inside range literals.'
|
590
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
|
591
|
+
Enabled: true
|
592
|
+
Style/SpaceInsideStringInterpolation:
|
593
|
+
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
594
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
|
595
|
+
Enabled: true
|
596
|
+
Style/SpecialGlobalVars:
|
597
|
+
Description: 'Avoid Perl-style global variables.'
|
598
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
599
|
+
Enabled: true
|
600
|
+
Style/StabbyLambdaParentheses:
|
601
|
+
Description: 'Check for the usage of parentheses around stabby lambda arguments.'
|
602
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args'
|
603
|
+
Enabled: true
|
604
|
+
Style/StringLiterals:
|
605
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
606
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
607
|
+
Enabled: true
|
608
|
+
Style/StringLiteralsInInterpolation:
|
609
|
+
Description: >-
|
610
|
+
Checks if uses of quotes inside expressions in interpolated
|
611
|
+
strings match the configured preference.
|
612
|
+
Enabled: true
|
613
|
+
Style/StructInheritance:
|
614
|
+
Description: 'Checks for inheritance from Struct.new.'
|
615
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
|
616
|
+
Enabled: true
|
617
|
+
Style/SymbolLiteral:
|
618
|
+
Description: 'Use plain symbols instead of string symbols when possible.'
|
619
|
+
Enabled: true
|
620
|
+
Style/SymbolProc:
|
621
|
+
Description: 'Use symbols as procs instead of blocks when possible.'
|
622
|
+
Enabled: true
|
623
|
+
Style/Tab:
|
624
|
+
Description: 'No hard tabs.'
|
625
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
626
|
+
Enabled: true
|
627
|
+
Style/TrailingBlankLines:
|
628
|
+
Description: 'Checks trailing blank lines and final newline.'
|
629
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
630
|
+
Enabled: true
|
631
|
+
Style/TrailingCommaInArguments:
|
632
|
+
Description: 'Checks for trailing comma in argument lists.'
|
633
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
634
|
+
Enabled: true
|
635
|
+
Style/TrailingCommaInLiteral:
|
636
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
637
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
638
|
+
Enabled: true
|
639
|
+
Style/TrailingWhitespace:
|
640
|
+
Description: 'Avoid trailing whitespace.'
|
641
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
642
|
+
Enabled: true
|
643
|
+
Style/TrivialAccessors:
|
644
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
645
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
646
|
+
Enabled: true
|
647
|
+
Style/UnlessElse:
|
648
|
+
Description: >-
|
649
|
+
Do not use unless with else. Rewrite these with the positive
|
650
|
+
case first.
|
651
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
652
|
+
Enabled: true
|
653
|
+
Style/UnneededCapitalW:
|
654
|
+
Description: 'Checks for %W when interpolation is not needed.'
|
655
|
+
Enabled: true
|
656
|
+
Style/UnneededInterpolation:
|
657
|
+
Description: 'Checks for strings that are just an interpolated expression.'
|
658
|
+
Enabled: true
|
659
|
+
Style/UnneededPercentQ:
|
660
|
+
Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
|
661
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
|
662
|
+
Enabled: true
|
663
|
+
Style/TrailingUnderscoreVariable:
|
664
|
+
Description: >-
|
665
|
+
Checks for the usage of unneeded trailing underscores at the
|
666
|
+
end of parallel variable assignment.
|
667
|
+
AllowNamedUnderscoreVariables: true
|
668
|
+
Enabled: true
|
669
|
+
Style/VariableInterpolation:
|
670
|
+
Description: >-
|
671
|
+
Don't interpolate global, instance and class variables
|
672
|
+
directly in strings.
|
673
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
674
|
+
Enabled: true
|
675
|
+
Style/VariableName:
|
676
|
+
Description: 'Use the configured style when naming variables.'
|
677
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
678
|
+
Enabled: true
|
679
|
+
Style/WhenThen:
|
680
|
+
Description: 'Use when x then ... for one-line cases.'
|
681
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
682
|
+
Enabled: true
|
683
|
+
Style/WhileUntilDo:
|
684
|
+
Description: 'Checks for redundant do after while or until.'
|
685
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
|
686
|
+
Enabled: true
|
687
|
+
Style/WhileUntilModifier:
|
688
|
+
Description: >-
|
689
|
+
Favor modifier while/until usage when you have a
|
690
|
+
single-line body.
|
691
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
692
|
+
Enabled: true
|
693
|
+
Style/WordArray:
|
694
|
+
Description: 'Use %w or %W for arrays of words.'
|
695
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
696
|
+
Enabled: true
|
697
|
+
Metrics/AbcSize:
|
698
|
+
Description: >-
|
699
|
+
A calculated magnitude based on number of assignments,
|
700
|
+
branches, and conditions.
|
701
|
+
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
702
|
+
Enabled: true
|
703
|
+
Metrics/BlockNesting:
|
704
|
+
Description: 'Avoid excessive block nesting'
|
705
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
706
|
+
Enabled: true
|
707
|
+
Metrics/ClassLength:
|
708
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
709
|
+
Enabled: true
|
710
|
+
Metrics/ModuleLength:
|
711
|
+
Description: 'Avoid modules longer than 100 lines of code.'
|
712
|
+
Enabled: true
|
713
|
+
Metrics/CyclomaticComplexity:
|
714
|
+
Description: >-
|
715
|
+
A complexity metric that is strongly correlated to the number
|
716
|
+
of test cases needed to validate a method.
|
717
|
+
Enabled: true
|
718
|
+
Metrics/LineLength:
|
719
|
+
Description: 'Limit lines to 80 characters.'
|
720
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
721
|
+
Enabled: true
|
722
|
+
Metrics/MethodLength:
|
723
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
724
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
725
|
+
Enabled: true
|
726
|
+
Metrics/ParameterLists:
|
727
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
728
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
729
|
+
Enabled: true
|
730
|
+
Metrics/PerceivedComplexity:
|
731
|
+
Description: >-
|
732
|
+
A complexity metric geared towards measuring complexity for a
|
733
|
+
human reader.
|
734
|
+
Enabled: true
|
735
|
+
Lint/AmbiguousOperator:
|
736
|
+
Description: >-
|
737
|
+
Checks for ambiguous operators in the first argument of a
|
738
|
+
method invocation without parentheses.
|
739
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
740
|
+
Enabled: true
|
741
|
+
Lint/AmbiguousRegexpLiteral:
|
742
|
+
Description: >-
|
743
|
+
Checks for ambiguous regexp literals in the first argument of
|
744
|
+
a method invocation without parentheses.
|
745
|
+
Enabled: true
|
746
|
+
Lint/AssignmentInCondition:
|
747
|
+
Description: "Don't use assignment in conditions."
|
748
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
749
|
+
Enabled: true
|
750
|
+
Lint/BlockAlignment:
|
751
|
+
Description: 'Align block ends correctly.'
|
752
|
+
Enabled: true
|
753
|
+
Lint/CircularArgumentReference:
|
754
|
+
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
755
|
+
Enabled: true
|
756
|
+
Lint/ConditionPosition:
|
757
|
+
Description: >-
|
758
|
+
Checks for condition placed in a confusing position relative to
|
759
|
+
the keyword.
|
760
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
761
|
+
Enabled: true
|
762
|
+
Lint/Debugger:
|
763
|
+
Description: 'Check for debugger calls.'
|
764
|
+
Enabled: true
|
765
|
+
Lint/DefEndAlignment:
|
766
|
+
Description: 'Align ends corresponding to defs correctly.'
|
767
|
+
Enabled: true
|
768
|
+
Lint/DeprecatedClassMethods:
|
769
|
+
Description: 'Check for deprecated class method calls.'
|
770
|
+
Enabled: true
|
771
|
+
Lint/DuplicateMethods:
|
772
|
+
Description: 'Check for duplicate method definitions.'
|
773
|
+
Enabled: true
|
774
|
+
Lint/DuplicatedKey:
|
775
|
+
Description: 'Check for duplicate keys in hash literals.'
|
776
|
+
Enabled: true
|
777
|
+
Lint/EachWithObjectArgument:
|
778
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
779
|
+
Enabled: true
|
780
|
+
Lint/ElseLayout:
|
781
|
+
Description: 'Check for odd code arrangement in an else block.'
|
782
|
+
Enabled: true
|
783
|
+
Lint/EmptyEnsure:
|
784
|
+
Description: 'Checks for empty ensure block.'
|
785
|
+
Enabled: true
|
786
|
+
Lint/EmptyInterpolation:
|
787
|
+
Description: 'Checks for empty string interpolation.'
|
788
|
+
Enabled: true
|
789
|
+
Lint/EndAlignment:
|
790
|
+
Description: 'Align ends correctly.'
|
791
|
+
Enabled: true
|
792
|
+
Lint/EndInMethod:
|
793
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
794
|
+
Enabled: true
|
795
|
+
Lint/EnsureReturn:
|
796
|
+
Description: 'Do not use return in an ensure block.'
|
797
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
798
|
+
Enabled: true
|
799
|
+
Lint/Eval:
|
800
|
+
Description: 'The use of eval represents a serious security risk.'
|
801
|
+
Enabled: true
|
802
|
+
Lint/FloatOutOfRange:
|
803
|
+
Description: >-
|
804
|
+
Catches floating-point literals too large or small for Ruby to
|
805
|
+
represent.
|
806
|
+
Enabled: true
|
807
|
+
Lint/FormatParameterMismatch:
|
808
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
809
|
+
Enabled: true
|
810
|
+
Lint/HandleExceptions:
|
811
|
+
Description: "Don't suppress exception."
|
812
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
813
|
+
Enabled: true
|
814
|
+
Lint/ImplicitStringConcatenation:
|
815
|
+
Description: >-
|
816
|
+
Checks for adjacent string literals on the same line, which
|
817
|
+
could better be represented as a single string literal.
|
818
|
+
Enabled: true
|
819
|
+
Lint/IneffectiveAccessModifier:
|
820
|
+
Description: >-
|
821
|
+
Checks for attempts to use `private` or `protected` to set
|
822
|
+
the visibility of a class method, which does not work.
|
823
|
+
Enabled: true
|
824
|
+
Lint/InvalidCharacterLiteral:
|
825
|
+
Description: >-
|
826
|
+
Checks for invalid character literals with a non-escaped
|
827
|
+
whitespace character.
|
828
|
+
Enabled: true
|
829
|
+
Lint/LiteralInCondition:
|
830
|
+
Description: 'Checks of literals used in conditions.'
|
831
|
+
Enabled: true
|
832
|
+
Lint/LiteralInInterpolation:
|
833
|
+
Description: 'Checks for literals used in interpolation.'
|
834
|
+
Enabled: true
|
835
|
+
Lint/Loop:
|
836
|
+
Description: >-
|
837
|
+
Use Kernel#loop with break rather than begin/end/until or
|
838
|
+
begin/end/while for post-loop tests.
|
839
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
840
|
+
Enabled: true
|
841
|
+
Lint/NestedMethodDefinition:
|
842
|
+
Description: 'Do not use nested method definitions.'
|
843
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
844
|
+
Enabled: true
|
845
|
+
Lint/NextWithoutAccumulator:
|
846
|
+
Description: >-
|
847
|
+
Do not omit the accumulator when calling `next`
|
848
|
+
in a `reduce`/`inject` block.
|
849
|
+
Enabled: true
|
850
|
+
Lint/NonLocalExitFromIterator:
|
851
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
852
|
+
Enabled: true
|
853
|
+
Lint/ParenthesesAsGroupedExpression:
|
854
|
+
Description: >-
|
855
|
+
Checks for method calls with a space before the opening
|
856
|
+
parenthesis.
|
857
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
858
|
+
Enabled: true
|
859
|
+
Lint/RandOne:
|
860
|
+
Description: >-
|
861
|
+
Checks for `rand(1)` calls. Such calls always return `0`
|
862
|
+
and most likely a mistake.
|
863
|
+
Enabled: true
|
864
|
+
Lint/RequireParentheses:
|
865
|
+
Description: >-
|
866
|
+
Use parentheses in the method call to avoid confusion
|
867
|
+
about precedence.
|
868
|
+
Enabled: true
|
869
|
+
Lint/RescueException:
|
870
|
+
Description: 'Avoid rescuing the Exception class.'
|
871
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
872
|
+
Enabled: true
|
873
|
+
Lint/ShadowingOuterLocalVariable:
|
874
|
+
Description: >-
|
875
|
+
Do not use the same name as outer local variable
|
876
|
+
for block arguments or block local variables.
|
877
|
+
Enabled: true
|
878
|
+
Lint/StringConversionInInterpolation:
|
879
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
880
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
881
|
+
Enabled: true
|
882
|
+
Lint/UnderscorePrefixedVariableName:
|
883
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
884
|
+
Enabled: true
|
885
|
+
Lint/UnneededDisable:
|
886
|
+
Description: >-
|
887
|
+
Checks for rubocop:disable comments that can be removed.
|
888
|
+
Note: this cop is not disabled when disabling all cops.
|
889
|
+
It must be explicitly disabled.
|
890
|
+
Enabled: true
|
891
|
+
Lint/UnusedBlockArgument:
|
892
|
+
Description: 'Checks for unused block arguments.'
|
893
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
894
|
+
Enabled: true
|
895
|
+
Lint/UnusedMethodArgument:
|
896
|
+
Description: 'Checks for unused method arguments.'
|
897
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
898
|
+
Enabled: true
|
899
|
+
Lint/UnreachableCode:
|
900
|
+
Description: 'Unreachable code.'
|
901
|
+
Enabled: true
|
902
|
+
Lint/UselessAccessModifier:
|
903
|
+
Description: 'Checks for useless access modifiers.'
|
904
|
+
Enabled: true
|
905
|
+
Lint/UselessAssignment:
|
906
|
+
Description: 'Checks for useless assignment to a local variable.'
|
907
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
908
|
+
Enabled: true
|
909
|
+
Lint/UselessComparison:
|
910
|
+
Description: 'Checks for comparison of something with itself.'
|
911
|
+
Enabled: true
|
912
|
+
Lint/UselessElseWithoutRescue:
|
913
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
914
|
+
Enabled: true
|
915
|
+
Lint/UselessSetterCall:
|
916
|
+
Description: 'Checks for useless setter call to a local variable.'
|
917
|
+
Enabled: true
|
918
|
+
Lint/Void:
|
919
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
920
|
+
Enabled: true
|
921
|
+
Performance/Casecmp:
|
922
|
+
Description: 'Use `casecmp` rather than `downcase ==`.'
|
923
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code'
|
924
|
+
Enabled: true
|
925
|
+
Performance/CaseWhenSplat:
|
926
|
+
Description: >-
|
927
|
+
Place `when` conditions that use splat at the end
|
928
|
+
of the list of `when` branches.
|
929
|
+
Enabled: true
|
930
|
+
Performance/Count:
|
931
|
+
Description: >-
|
932
|
+
Use `count` instead of `select...size`, `reject...size`,
|
933
|
+
`select...count`, `reject...count`, `select...length`,
|
934
|
+
and `reject...length`.
|
935
|
+
Enabled: true
|
936
|
+
Performance/Detect:
|
937
|
+
Description: >-
|
938
|
+
Use `detect` instead of `select.first`, `find_all.first`,
|
939
|
+
`select.last`, and `find_all.last`.
|
940
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
941
|
+
Enabled: true
|
942
|
+
Performance/DoubleStartEndWith:
|
943
|
+
Description: >-
|
944
|
+
Use `str.{start,end}_with?(x, ..., y, ...)`
|
945
|
+
instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
|
946
|
+
Enabled: true
|
947
|
+
Performance/EndWith:
|
948
|
+
Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.'
|
949
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
|
950
|
+
Enabled: true
|
951
|
+
Performance/FixedSize:
|
952
|
+
Description: 'Do not compute the size of statically sized objects except in constants'
|
953
|
+
Enabled: true
|
954
|
+
Performance/FlatMap:
|
955
|
+
Description: >-
|
956
|
+
Use `Enumerable#flat_map`
|
957
|
+
instead of `Enumerable#map...Array#flatten(1)`
|
958
|
+
or `Enumberable#collect..Array#flatten(1)`
|
959
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
960
|
+
Enabled: true
|
961
|
+
EnabledForFlattenWithoutParams: false
|
962
|
+
Performance/HashEachMethods:
|
963
|
+
Description: >-
|
964
|
+
Use `Hash#each_key` and `Hash#each_value` instead of
|
965
|
+
`Hash#keys.each` and `Hash#values.each`.
|
966
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-each'
|
967
|
+
Enabled: true
|
968
|
+
AutoCorrect: false
|
969
|
+
Performance/LstripRstrip:
|
970
|
+
Description: 'Use `strip` instead of `lstrip.rstrip`.'
|
971
|
+
Enabled: true
|
972
|
+
Performance/RangeInclude:
|
973
|
+
Description: 'Use `Range#cover?` instead of `Range#include?`.'
|
974
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code'
|
975
|
+
Enabled: true
|
976
|
+
Performance/RedundantBlockCall:
|
977
|
+
Description: 'Use `yield` instead of `block.call`.'
|
978
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code'
|
979
|
+
Enabled: true
|
980
|
+
Performance/RedundantMatch:
|
981
|
+
Description: >-
|
982
|
+
Use `=~` instead of `String#match` or `Regexp#match` in a context where the
|
983
|
+
returned `MatchData` is not needed.
|
984
|
+
Enabled: true
|
985
|
+
Performance/RedundantMerge:
|
986
|
+
Description: 'Use Hash#[]=, rather than Hash#merge! with a single key-value pair.'
|
987
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code'
|
988
|
+
Enabled: true
|
989
|
+
Performance/RedundantSortBy:
|
990
|
+
Description: 'Use `sort` instead of `sort_by { |x| x }`.'
|
991
|
+
Enabled: true
|
992
|
+
Performance/ReverseEach:
|
993
|
+
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
994
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
995
|
+
Enabled: true
|
996
|
+
Performance/Sample:
|
997
|
+
Description: >-
|
998
|
+
Use `sample` instead of `shuffle.first`,
|
999
|
+
`shuffle.last`, and `shuffle[Fixnum]`.
|
1000
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
1001
|
+
Enabled: true
|
1002
|
+
Performance/Size:
|
1003
|
+
Description: >-
|
1004
|
+
Use `size` instead of `count` for counting
|
1005
|
+
the number of elements in `Array` and `Hash`.
|
1006
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
1007
|
+
Enabled: true
|
1008
|
+
Performance/StartWith:
|
1009
|
+
Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
|
1010
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
|
1011
|
+
Enabled: true
|
1012
|
+
Performance/StringReplacement:
|
1013
|
+
Description: >-
|
1014
|
+
Use `tr` instead of `gsub` when you are replacing the same
|
1015
|
+
number of characters. Use `delete` instead of `gsub` when
|
1016
|
+
you are deleting characters.
|
1017
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
1018
|
+
Enabled: true
|
1019
|
+
Performance/TimesMap:
|
1020
|
+
Description: 'Checks for .times.map calls.'
|
1021
|
+
Enabled: true
|
1022
|
+
Rails/ActionFilter:
|
1023
|
+
Description: 'Enforces consistent use of action filter methods.'
|
1024
|
+
Enabled: true
|
1025
|
+
Rails/Date:
|
1026
|
+
Description: >-
|
1027
|
+
Checks the correct usage of date aware methods,
|
1028
|
+
such as Date.today, Date.current etc.
|
1029
|
+
Enabled: true
|
1030
|
+
Rails/Delegate:
|
1031
|
+
Description: 'Prefer delegate method for delegations.'
|
1032
|
+
Enabled: true
|
1033
|
+
Rails/FindBy:
|
1034
|
+
Description: 'Prefer find_by over where.first.'
|
1035
|
+
Enabled: true
|
1036
|
+
Rails/FindEach:
|
1037
|
+
Description: 'Prefer all.find_each over all.find.'
|
1038
|
+
Enabled: true
|
1039
|
+
Rails/HasAndBelongsToMany:
|
1040
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
1041
|
+
Enabled: true
|
1042
|
+
Rails/Output:
|
1043
|
+
Description: 'Checks for calls to puts, print, etc.'
|
1044
|
+
Enabled: true
|
1045
|
+
Rails/PluralizationGrammar:
|
1046
|
+
Description: 'Checks for incorrect grammar when using methods like `3.day.ago`.'
|
1047
|
+
Enabled: true
|
1048
|
+
Rails/ReadWriteAttribute:
|
1049
|
+
Description: >-
|
1050
|
+
Checks for read_attribute(:attr) and
|
1051
|
+
write_attribute(:attr, val).
|
1052
|
+
Enabled: true
|
1053
|
+
Rails/ScopeArgs:
|
1054
|
+
Description: 'Checks the arguments of ActiveRecord scopes.'
|
1055
|
+
Enabled: true
|
1056
|
+
Rails/TimeZone:
|
1057
|
+
Description: 'Checks the correct usage of time zone aware methods.'
|
1058
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
1059
|
+
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
1060
|
+
Enabled: true
|
1061
|
+
Rails/Validation:
|
1062
|
+
Description: 'Use validates :attribute, hash of validations.'
|
1063
|
+
Enabled: true
|
1064
|
+
AllCops:
|
1065
|
+
Include:
|
1066
|
+
- '**/*.gemspec'
|
1067
|
+
- '**/*.podspec'
|
1068
|
+
- '**/*.jbuilder'
|
1069
|
+
- '**/*.rake'
|
1070
|
+
- '**/*.opal'
|
1071
|
+
- '**/config.ru'
|
1072
|
+
- '**/Gemfile'
|
1073
|
+
- '**/Rakefile'
|
1074
|
+
- '**/Capfile'
|
1075
|
+
- '**/Guardfile'
|
1076
|
+
- '**/Podfile'
|
1077
|
+
- '**/Thorfile'
|
1078
|
+
- '**/Vagrantfile'
|
1079
|
+
- '**/Berksfile'
|
1080
|
+
- '**/Cheffile'
|
1081
|
+
- '**/Vagabondfile'
|
1082
|
+
Exclude:
|
1083
|
+
- 'vendor/**/*'
|
1084
|
+
DefaultFormatter: progress
|
1085
|
+
DisplayCopNames: false
|
1086
|
+
DisplayStyleGuide: false
|
1087
|
+
ExtraDetails: false
|
1088
|
+
StyleGuideCopsOnly: false
|
1089
|
+
DisabledByDefault: false
|
1090
|
+
UseCache: true
|
1091
|
+
MaxFilesInCache: 20000
|
1092
|
+
CacheRootDirectory: /tmp
|
1093
|
+
TargetRubyVersion: 2.0
|
1094
|
+
Style/AccessModifierIndentation:
|
1095
|
+
EnforcedStyle: indent
|
1096
|
+
SupportedStyles:
|
1097
|
+
- outdent
|
1098
|
+
- indent
|
1099
|
+
IndentationWidth: ~
|
1100
|
+
Style/Alias:
|
1101
|
+
EnforcedStyle: prefer_alias
|
1102
|
+
SupportedStyles:
|
1103
|
+
- prefer_alias
|
1104
|
+
- prefer_alias_method
|
1105
|
+
Style/AlignHash:
|
1106
|
+
EnforcedHashRocketStyle: key
|
1107
|
+
EnforcedColonStyle: key
|
1108
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
1109
|
+
SupportedLastArgumentHashStyles:
|
1110
|
+
- always_inspect
|
1111
|
+
- always_ignore
|
1112
|
+
- ignore_implicit
|
1113
|
+
- ignore_explicit
|
1114
|
+
Style/AlignParameters:
|
1115
|
+
EnforcedStyle: with_first_parameter
|
1116
|
+
SupportedStyles:
|
1117
|
+
- with_first_parameter
|
1118
|
+
- with_fixed_indentation
|
1119
|
+
Style/AndOr:
|
1120
|
+
EnforcedStyle: always
|
1121
|
+
SupportedStyles:
|
1122
|
+
- always
|
1123
|
+
- conditionals
|
1124
|
+
Style/BarePercentLiterals:
|
1125
|
+
EnforcedStyle: bare_percent
|
1126
|
+
SupportedStyles:
|
1127
|
+
- percent_q
|
1128
|
+
- bare_percent
|
1129
|
+
Style/BlockDelimiters:
|
1130
|
+
EnforcedStyle: line_count_based
|
1131
|
+
SupportedStyles:
|
1132
|
+
- line_count_based
|
1133
|
+
- semantic
|
1134
|
+
- braces_for_chaining
|
1135
|
+
ProceduralMethods:
|
1136
|
+
- benchmark
|
1137
|
+
- bm
|
1138
|
+
- bmbm
|
1139
|
+
- create
|
1140
|
+
- each_with_object
|
1141
|
+
- measure
|
1142
|
+
- new
|
1143
|
+
- realtime
|
1144
|
+
- tap
|
1145
|
+
- with_object
|
1146
|
+
FunctionalMethods:
|
1147
|
+
- let
|
1148
|
+
- let!
|
1149
|
+
- subject
|
1150
|
+
- watch
|
1151
|
+
IgnoredMethods:
|
1152
|
+
- lambda
|
1153
|
+
- proc
|
1154
|
+
- it
|
1155
|
+
Style/BracesAroundHashParameters:
|
1156
|
+
EnforcedStyle: no_braces
|
1157
|
+
SupportedStyles:
|
1158
|
+
- braces
|
1159
|
+
- no_braces
|
1160
|
+
- context_dependent
|
1161
|
+
Style/CaseIndentation:
|
1162
|
+
IndentWhenRelativeTo: case
|
1163
|
+
SupportedStyles:
|
1164
|
+
- case
|
1165
|
+
- end
|
1166
|
+
IndentOneStep: false
|
1167
|
+
IndentationWidth: ~
|
1168
|
+
Style/ClassAndModuleChildren:
|
1169
|
+
EnforcedStyle: nested
|
1170
|
+
SupportedStyles:
|
1171
|
+
- nested
|
1172
|
+
- compact
|
1173
|
+
Style/ClassCheck:
|
1174
|
+
EnforcedStyle: is_a?
|
1175
|
+
SupportedStyles:
|
1176
|
+
- is_a?
|
1177
|
+
- kind_of?
|
1178
|
+
Style/CollectionMethods:
|
1179
|
+
PreferredMethods:
|
1180
|
+
collect: 'map'
|
1181
|
+
collect!: 'map!'
|
1182
|
+
inject: 'reduce'
|
1183
|
+
detect: 'find'
|
1184
|
+
find_all: 'select'
|
1185
|
+
Style/CommandLiteral:
|
1186
|
+
EnforcedStyle: backticks
|
1187
|
+
SupportedStyles:
|
1188
|
+
- backticks
|
1189
|
+
- percent_x
|
1190
|
+
- mixed
|
1191
|
+
AllowInnerBackticks: false
|
1192
|
+
Style/CommentAnnotation:
|
1193
|
+
Keywords:
|
1194
|
+
- TODO
|
1195
|
+
- FIXME
|
1196
|
+
- OPTIMIZE
|
1197
|
+
- HACK
|
1198
|
+
- REVIEW
|
1199
|
+
Style/Copyright:
|
1200
|
+
Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
|
1201
|
+
AutocorrectNotice: ''
|
1202
|
+
Style/DotPosition:
|
1203
|
+
EnforcedStyle: leading
|
1204
|
+
SupportedStyles:
|
1205
|
+
- leading
|
1206
|
+
- trailing
|
1207
|
+
Style/EmptyElse:
|
1208
|
+
EnforcedStyle: both
|
1209
|
+
SupportedStyles:
|
1210
|
+
- empty
|
1211
|
+
- nil
|
1212
|
+
- both
|
1213
|
+
Style/EmptyLineBetweenDefs:
|
1214
|
+
AllowAdjacentOneLineDefs: false
|
1215
|
+
Style/EmptyLinesAroundBlockBody:
|
1216
|
+
EnforcedStyle: no_empty_lines
|
1217
|
+
SupportedStyles:
|
1218
|
+
- empty_lines
|
1219
|
+
- no_empty_lines
|
1220
|
+
Style/EmptyLinesAroundClassBody:
|
1221
|
+
EnforcedStyle: no_empty_lines
|
1222
|
+
SupportedStyles:
|
1223
|
+
- empty_lines
|
1224
|
+
- no_empty_lines
|
1225
|
+
Style/EmptyLinesAroundModuleBody:
|
1226
|
+
EnforcedStyle: no_empty_lines
|
1227
|
+
SupportedStyles:
|
1228
|
+
- empty_lines
|
1229
|
+
- no_empty_lines
|
1230
|
+
Style/Encoding:
|
1231
|
+
EnforcedStyle: always
|
1232
|
+
SupportedStyles:
|
1233
|
+
- when_needed
|
1234
|
+
- always
|
1235
|
+
AutoCorrectEncodingComment: '# encoding: utf-8'
|
1236
|
+
Style/ExtraSpacing:
|
1237
|
+
AllowForAlignment: true
|
1238
|
+
ForceEqualSignAlignment: false
|
1239
|
+
Style/FileName:
|
1240
|
+
Exclude: []
|
1241
|
+
ExpectMatchingDefinition: false
|
1242
|
+
Regex: ~
|
1243
|
+
IgnoreExecutableScripts: true
|
1244
|
+
Style/FirstParameterIndentation:
|
1245
|
+
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
1246
|
+
SupportedStyles:
|
1247
|
+
- consistent
|
1248
|
+
- special_for_inner_method_call
|
1249
|
+
- special_for_inner_method_call_in_parentheses
|
1250
|
+
IndentationWidth: ~
|
1251
|
+
Style/For:
|
1252
|
+
EnforcedStyle: each
|
1253
|
+
SupportedStyles:
|
1254
|
+
- for
|
1255
|
+
- each
|
1256
|
+
Style/FormatString:
|
1257
|
+
EnforcedStyle: format
|
1258
|
+
SupportedStyles:
|
1259
|
+
- format
|
1260
|
+
- sprintf
|
1261
|
+
- percent
|
1262
|
+
Style/FrozenStringLiteralComment:
|
1263
|
+
EnforcedStyle: when_needed
|
1264
|
+
SupportedStyles:
|
1265
|
+
- when_needed
|
1266
|
+
- always
|
1267
|
+
Style/GlobalVars:
|
1268
|
+
AllowedVariables: []
|
1269
|
+
Style/GuardClause:
|
1270
|
+
MinBodyLength: 1
|
1271
|
+
Style/HashSyntax:
|
1272
|
+
EnforcedStyle: ruby19
|
1273
|
+
SupportedStyles:
|
1274
|
+
- ruby19
|
1275
|
+
- ruby19_no_mixed_keys
|
1276
|
+
- hash_rockets
|
1277
|
+
UseHashRocketsWithSymbolValues: false
|
1278
|
+
Style/IfUnlessModifier:
|
1279
|
+
MaxLineLength: 80
|
1280
|
+
Style/IndentationConsistency:
|
1281
|
+
EnforcedStyle: normal
|
1282
|
+
SupportedStyles:
|
1283
|
+
- normal
|
1284
|
+
- rails
|
1285
|
+
Style/IndentationWidth:
|
1286
|
+
Width: 2
|
1287
|
+
Style/IndentArray:
|
1288
|
+
EnforcedStyle: special_inside_parentheses
|
1289
|
+
SupportedStyles:
|
1290
|
+
- special_inside_parentheses
|
1291
|
+
- consistent
|
1292
|
+
- align_brackets
|
1293
|
+
IndentationWidth: ~
|
1294
|
+
Style/IndentAssignment:
|
1295
|
+
IndentationWidth: ~
|
1296
|
+
Style/IndentHash:
|
1297
|
+
EnforcedStyle: special_inside_parentheses
|
1298
|
+
SupportedStyles:
|
1299
|
+
- special_inside_parentheses
|
1300
|
+
- consistent
|
1301
|
+
- align_braces
|
1302
|
+
IndentationWidth: ~
|
1303
|
+
Style/LambdaCall:
|
1304
|
+
EnforcedStyle: call
|
1305
|
+
SupportedStyles:
|
1306
|
+
- call
|
1307
|
+
- braces
|
1308
|
+
Style/Next:
|
1309
|
+
EnforcedStyle: skip_modifier_ifs
|
1310
|
+
MinBodyLength: 3
|
1311
|
+
SupportedStyles:
|
1312
|
+
- skip_modifier_ifs
|
1313
|
+
- always
|
1314
|
+
Style/NonNilCheck:
|
1315
|
+
IncludeSemanticChanges: false
|
1316
|
+
Style/MethodDefParentheses:
|
1317
|
+
EnforcedStyle: require_parentheses
|
1318
|
+
SupportedStyles:
|
1319
|
+
- require_parentheses
|
1320
|
+
- require_no_parentheses
|
1321
|
+
- require_no_parentheses_except_multiline
|
1322
|
+
Style/MethodName:
|
1323
|
+
EnforcedStyle: snake_case
|
1324
|
+
SupportedStyles:
|
1325
|
+
- snake_case
|
1326
|
+
- camelCase
|
1327
|
+
Style/MultilineAssignmentLayout:
|
1328
|
+
SupportedTypes:
|
1329
|
+
- block
|
1330
|
+
- case
|
1331
|
+
- class
|
1332
|
+
- if
|
1333
|
+
- kwbegin
|
1334
|
+
- module
|
1335
|
+
EnforcedStyle: new_line
|
1336
|
+
SupportedStyles:
|
1337
|
+
- same_line
|
1338
|
+
- new_line
|
1339
|
+
Style/MultilineMethodCallIndentation:
|
1340
|
+
EnforcedStyle: aligned
|
1341
|
+
SupportedStyles:
|
1342
|
+
- aligned
|
1343
|
+
- indented
|
1344
|
+
IndentationWidth: ~
|
1345
|
+
Style/MultilineOperationIndentation:
|
1346
|
+
EnforcedStyle: aligned
|
1347
|
+
SupportedStyles:
|
1348
|
+
- aligned
|
1349
|
+
- indented
|
1350
|
+
IndentationWidth: ~
|
1351
|
+
Style/NumericLiterals:
|
1352
|
+
MinDigits: 5
|
1353
|
+
Style/OptionHash:
|
1354
|
+
SuspiciousParamNames:
|
1355
|
+
- options
|
1356
|
+
- opts
|
1357
|
+
- args
|
1358
|
+
- params
|
1359
|
+
- parameters
|
1360
|
+
Style/ParenthesesAroundCondition:
|
1361
|
+
AllowSafeAssignment: true
|
1362
|
+
Style/PercentLiteralDelimiters:
|
1363
|
+
PreferredDelimiters:
|
1364
|
+
'%': ()
|
1365
|
+
'%i': ()
|
1366
|
+
'%q': ()
|
1367
|
+
'%Q': ()
|
1368
|
+
'%r': '{}'
|
1369
|
+
'%s': ()
|
1370
|
+
'%w': ()
|
1371
|
+
'%W': ()
|
1372
|
+
'%x': ()
|
1373
|
+
Style/PercentQLiterals:
|
1374
|
+
EnforcedStyle: lower_case_q
|
1375
|
+
SupportedStyles:
|
1376
|
+
- lower_case_q # Use %q when possible, %Q when necessary
|
1377
|
+
- upper_case_q # Always use %Q
|
1378
|
+
Style/PredicateName:
|
1379
|
+
NamePrefix:
|
1380
|
+
- is_
|
1381
|
+
- has_
|
1382
|
+
- have_
|
1383
|
+
NamePrefixBlacklist:
|
1384
|
+
- is_
|
1385
|
+
- has_
|
1386
|
+
- have_
|
1387
|
+
NameWhitelist:
|
1388
|
+
- is_a?
|
1389
|
+
Style/RaiseArgs:
|
1390
|
+
EnforcedStyle: exploded
|
1391
|
+
SupportedStyles:
|
1392
|
+
- compact # raise Exception.new(msg)
|
1393
|
+
- exploded # raise Exception, msg
|
1394
|
+
Style/RedundantReturn:
|
1395
|
+
AllowMultipleReturnValues: false
|
1396
|
+
Style/RegexpLiteral:
|
1397
|
+
EnforcedStyle: slashes
|
1398
|
+
SupportedStyles:
|
1399
|
+
- slashes
|
1400
|
+
- percent_r
|
1401
|
+
- mixed
|
1402
|
+
AllowInnerSlashes: false
|
1403
|
+
Style/Semicolon:
|
1404
|
+
AllowAsExpressionSeparator: false
|
1405
|
+
Style/SignalException:
|
1406
|
+
EnforcedStyle: semantic
|
1407
|
+
SupportedStyles:
|
1408
|
+
- only_raise
|
1409
|
+
- only_fail
|
1410
|
+
- semantic
|
1411
|
+
Style/SingleLineBlockParams:
|
1412
|
+
Methods:
|
1413
|
+
- reduce:
|
1414
|
+
- a
|
1415
|
+
- e
|
1416
|
+
- inject:
|
1417
|
+
- a
|
1418
|
+
- e
|
1419
|
+
Style/SingleLineMethods:
|
1420
|
+
AllowIfMethodIsEmpty: true
|
1421
|
+
Style/SpaceBeforeFirstArg:
|
1422
|
+
AllowForAlignment: true
|
1423
|
+
Style/SpecialGlobalVars:
|
1424
|
+
EnforcedStyle: use_english_names
|
1425
|
+
SupportedStyles:
|
1426
|
+
- use_perl_names
|
1427
|
+
- use_english_names
|
1428
|
+
Style/StabbyLambdaParentheses:
|
1429
|
+
EnforcedStyle: require_parentheses
|
1430
|
+
SupportedStyles:
|
1431
|
+
- require_parentheses
|
1432
|
+
- require_no_parentheses
|
1433
|
+
Style/StringLiterals:
|
1434
|
+
EnforcedStyle: single_quotes
|
1435
|
+
SupportedStyles:
|
1436
|
+
- single_quotes
|
1437
|
+
- double_quotes
|
1438
|
+
ConsistentQuotesInMultiline: false
|
1439
|
+
Style/StringLiteralsInInterpolation:
|
1440
|
+
EnforcedStyle: single_quotes
|
1441
|
+
SupportedStyles:
|
1442
|
+
- single_quotes
|
1443
|
+
- double_quotes
|
1444
|
+
Style/StringMethods:
|
1445
|
+
PreferredMethods:
|
1446
|
+
intern: to_sym
|
1447
|
+
Style/SpaceAroundBlockParameters:
|
1448
|
+
EnforcedStyleInsidePipes: no_space
|
1449
|
+
SupportedStyles:
|
1450
|
+
- space
|
1451
|
+
- no_space
|
1452
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
1453
|
+
EnforcedStyle: space
|
1454
|
+
SupportedStyles:
|
1455
|
+
- space
|
1456
|
+
- no_space
|
1457
|
+
Style/SpaceAroundOperators:
|
1458
|
+
AllowForAlignment: true
|
1459
|
+
Style/SpaceBeforeBlockBraces:
|
1460
|
+
EnforcedStyle: space
|
1461
|
+
SupportedStyles:
|
1462
|
+
- space
|
1463
|
+
- no_space
|
1464
|
+
Style/SpaceInsideBlockBraces:
|
1465
|
+
EnforcedStyle: space
|
1466
|
+
SupportedStyles:
|
1467
|
+
- space
|
1468
|
+
- no_space
|
1469
|
+
EnforcedStyleForEmptyBraces: no_space
|
1470
|
+
SpaceBeforeBlockParameters: true
|
1471
|
+
Style/SpaceInsideHashLiteralBraces:
|
1472
|
+
EnforcedStyle: space
|
1473
|
+
EnforcedStyleForEmptyBraces: no_space
|
1474
|
+
SupportedStyles:
|
1475
|
+
- space
|
1476
|
+
- no_space
|
1477
|
+
Style/SpaceInsideStringInterpolation:
|
1478
|
+
EnforcedStyle: no_space
|
1479
|
+
SupportedStyles:
|
1480
|
+
- space
|
1481
|
+
- no_space
|
1482
|
+
Style/SymbolArray:
|
1483
|
+
EnforcedStyle: percent
|
1484
|
+
SupportedStyles:
|
1485
|
+
- percent
|
1486
|
+
- brackets
|
1487
|
+
Style/SymbolProc:
|
1488
|
+
IgnoredMethods:
|
1489
|
+
- respond_to
|
1490
|
+
Style/TrailingBlankLines:
|
1491
|
+
EnforcedStyle: final_newline
|
1492
|
+
SupportedStyles:
|
1493
|
+
- final_newline
|
1494
|
+
- final_blank_line
|
1495
|
+
Style/TrailingCommaInArguments:
|
1496
|
+
EnforcedStyleForMultiline: no_comma
|
1497
|
+
SupportedStyles:
|
1498
|
+
- comma
|
1499
|
+
- consistent_comma
|
1500
|
+
- no_comma
|
1501
|
+
Style/TrailingCommaInLiteral:
|
1502
|
+
EnforcedStyleForMultiline: no_comma
|
1503
|
+
SupportedStyles:
|
1504
|
+
- comma
|
1505
|
+
- consistent_comma
|
1506
|
+
- no_comma
|
1507
|
+
Style/TrivialAccessors:
|
1508
|
+
ExactNameMatch: true
|
1509
|
+
AllowPredicates: false
|
1510
|
+
AllowDSLWriters: false
|
1511
|
+
IgnoreClassMethods: false
|
1512
|
+
Whitelist:
|
1513
|
+
- to_ary
|
1514
|
+
- to_a
|
1515
|
+
- to_c
|
1516
|
+
- to_enum
|
1517
|
+
- to_h
|
1518
|
+
- to_hash
|
1519
|
+
- to_i
|
1520
|
+
- to_int
|
1521
|
+
- to_io
|
1522
|
+
- to_open
|
1523
|
+
- to_path
|
1524
|
+
- to_proc
|
1525
|
+
- to_r
|
1526
|
+
- to_regexp
|
1527
|
+
- to_str
|
1528
|
+
- to_s
|
1529
|
+
- to_sym
|
1530
|
+
Style/VariableName:
|
1531
|
+
EnforcedStyle: snake_case
|
1532
|
+
SupportedStyles:
|
1533
|
+
- snake_case
|
1534
|
+
- camelCase
|
1535
|
+
Style/WhileUntilModifier:
|
1536
|
+
MaxLineLength: 80
|
1537
|
+
Style/WordArray:
|
1538
|
+
EnforcedStyle: percent
|
1539
|
+
SupportedStyles:
|
1540
|
+
- percent
|
1541
|
+
- brackets
|
1542
|
+
MinSize: 0
|
1543
|
+
WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
|
1544
|
+
Metrics/AbcSize:
|
1545
|
+
Max: 15
|
1546
|
+
Metrics/BlockNesting:
|
1547
|
+
Max: 3
|
1548
|
+
Metrics/ClassLength:
|
1549
|
+
CountComments: false # count full line comments?
|
1550
|
+
Max: 100
|
1551
|
+
Metrics/ModuleLength:
|
1552
|
+
CountComments: false # count full line comments?
|
1553
|
+
Max: 100
|
1554
|
+
Metrics/CyclomaticComplexity:
|
1555
|
+
Max: 6
|
1556
|
+
Metrics/LineLength:
|
1557
|
+
Max: 80
|
1558
|
+
AllowHeredoc: true
|
1559
|
+
AllowURI: true
|
1560
|
+
URISchemes:
|
1561
|
+
- http
|
1562
|
+
- https
|
1563
|
+
Metrics/MethodLength:
|
1564
|
+
CountComments: false # count full line comments?
|
1565
|
+
Max: 10
|
1566
|
+
Metrics/ParameterLists:
|
1567
|
+
Max: 5
|
1568
|
+
CountKeywordArgs: true
|
1569
|
+
Metrics/PerceivedComplexity:
|
1570
|
+
Max: 7
|
1571
|
+
Lint/AssignmentInCondition:
|
1572
|
+
AllowSafeAssignment: true
|
1573
|
+
Lint/EndAlignment:
|
1574
|
+
AlignWith: keyword
|
1575
|
+
SupportedStyles:
|
1576
|
+
- keyword
|
1577
|
+
- variable
|
1578
|
+
- start_of_line
|
1579
|
+
AutoCorrect: false
|
1580
|
+
Lint/DefEndAlignment:
|
1581
|
+
AlignWith: start_of_line
|
1582
|
+
SupportedStyles:
|
1583
|
+
- start_of_line
|
1584
|
+
- def
|
1585
|
+
AutoCorrect: false
|
1586
|
+
Lint/UnusedBlockArgument:
|
1587
|
+
IgnoreEmptyBlocks: true
|
1588
|
+
Lint/UnusedMethodArgument:
|
1589
|
+
AllowUnusedKeywordArguments: false
|
1590
|
+
IgnoreEmptyMethods: true
|
1591
|
+
Rails/ActionFilter:
|
1592
|
+
EnforcedStyle: action
|
1593
|
+
SupportedStyles:
|
1594
|
+
- action
|
1595
|
+
- filter
|
1596
|
+
Include:
|
1597
|
+
- app/controllers/**/*.rb
|
1598
|
+
Rails/Date:
|
1599
|
+
EnforcedStyle: flexible
|
1600
|
+
SupportedStyles:
|
1601
|
+
- strict
|
1602
|
+
- flexible
|
1603
|
+
Rails/FindBy:
|
1604
|
+
Include:
|
1605
|
+
- app/models/**/*.rb
|
1606
|
+
Rails/FindEach:
|
1607
|
+
Include:
|
1608
|
+
- app/models/**/*.rb
|
1609
|
+
Rails/HasAndBelongsToMany:
|
1610
|
+
Include:
|
1611
|
+
- app/models/**/*.rb
|
1612
|
+
Rails/Output:
|
1613
|
+
Include:
|
1614
|
+
- app/**/*.rb
|
1615
|
+
- config/**/*.rb
|
1616
|
+
- db/**/*.rb
|
1617
|
+
- lib/**/*.rb
|
1618
|
+
Rails/ReadWriteAttribute:
|
1619
|
+
Include:
|
1620
|
+
- app/models/**/*.rb
|
1621
|
+
Rails/ScopeArgs:
|
1622
|
+
Include:
|
1623
|
+
- app/models/**/*.rb
|
1624
|
+
Rails/TimeZone:
|
1625
|
+
EnforcedStyle: flexible
|
1626
|
+
SupportedStyles:
|
1627
|
+
- strict
|
1628
|
+
- flexible
|
1629
|
+
Rails/Validation:
|
1630
|
+
Include:
|
1631
|
+
- app/models/**/*.rb
|