seira 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/trunk.yml +21 -0
- data/.trunk/.gitignore +8 -0
- data/.trunk/configs/.markdownlint.yaml +10 -0
- data/.trunk/configs/.shellcheckrc +7 -0
- data/.trunk/configs/.yamllint.yaml +10 -0
- data/.trunk/trunk.yaml +34 -0
- data/lib/seira/pods.rb +1 -2
- data/lib/seira/settings.rb +11 -0
- data/lib/seira/version.rb +2 -1
- data/lib/seira.rb +11 -2
- metadata +8 -4
- data/.default-rubocop.yml +0 -1769
- data/.rubocop.yml +0 -112
data/.default-rubocop.yml
DELETED
@@ -1,1769 +0,0 @@
|
|
1
|
-
# This is the default configuration file. Enabling and disabling is configured
|
2
|
-
# in separate files. This file adds all other parameters apart from Enabled.
|
3
|
-
|
4
|
-
# Common configuration.
|
5
|
-
AllCops:
|
6
|
-
# Include common Ruby source files.
|
7
|
-
Include:
|
8
|
-
- '**/*.arb'
|
9
|
-
- '**/*.axlsx'
|
10
|
-
- '**/*.builder'
|
11
|
-
- '**/*.fcgi'
|
12
|
-
- '**/*.gemfile'
|
13
|
-
- '**/*.gemspec'
|
14
|
-
- '**/*.god'
|
15
|
-
- '**/*.jb'
|
16
|
-
- '**/*.jbuilder'
|
17
|
-
- '**/*.mspec'
|
18
|
-
- '**/*.opal'
|
19
|
-
- '**/*.pluginspec'
|
20
|
-
- '**/*.podspec'
|
21
|
-
- '**/*.rabl'
|
22
|
-
- '**/*.rake'
|
23
|
-
- '**/*.rbuild'
|
24
|
-
- '**/*.rbw'
|
25
|
-
- '**/*.rbx'
|
26
|
-
- '**/*.ru'
|
27
|
-
- '**/*.ruby'
|
28
|
-
- '**/*.spec'
|
29
|
-
- '**/*.thor'
|
30
|
-
- '**/*.watchr'
|
31
|
-
- '**/.irbrc'
|
32
|
-
- '**/.pryrc'
|
33
|
-
- '**/buildfile'
|
34
|
-
- '**/config.ru'
|
35
|
-
- '**/Appraisals'
|
36
|
-
- '**/Berksfile'
|
37
|
-
- '**/Brewfile'
|
38
|
-
- '**/Buildfile'
|
39
|
-
- '**/Capfile'
|
40
|
-
- '**/Cheffile'
|
41
|
-
- '**/Dangerfile'
|
42
|
-
- '**/Deliverfile'
|
43
|
-
- '**/Fastfile'
|
44
|
-
- '**/*Fastfile'
|
45
|
-
- '**/Gemfile'
|
46
|
-
- '**/Guardfile'
|
47
|
-
- '**/Jarfile'
|
48
|
-
- '**/Mavenfile'
|
49
|
-
- '**/Podfile'
|
50
|
-
- '**/Puppetfile'
|
51
|
-
- '**/Rakefile'
|
52
|
-
- '**/Snapfile'
|
53
|
-
- '**/Thorfile'
|
54
|
-
- '**/Vagabondfile'
|
55
|
-
- '**/Vagrantfile'
|
56
|
-
Exclude:
|
57
|
-
- 'node_modules/**/*'
|
58
|
-
- 'vendor/**/*'
|
59
|
-
- '.git/**/*'
|
60
|
-
# Default formatter will be used if no `-f/--format` option is given.
|
61
|
-
DefaultFormatter: progress
|
62
|
-
# Cop names are displayed in offense messages by default. Change behavior
|
63
|
-
# by overriding DisplayCopNames, or by giving the `--no-display-cop-names`
|
64
|
-
# option.
|
65
|
-
DisplayCopNames: true
|
66
|
-
# Style guide URLs are not displayed in offense messages by default. Change
|
67
|
-
# behavior by overriding `DisplayStyleGuide`, or by giving the
|
68
|
-
# `-S/--display-style-guide` option.
|
69
|
-
DisplayStyleGuide: false
|
70
|
-
# When specifying style guide URLs, any paths and/or fragments will be
|
71
|
-
# evaluated relative to the base URL.
|
72
|
-
StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
|
73
|
-
# Extra details are not displayed in offense messages by default. Change
|
74
|
-
# behavior by overriding ExtraDetails, or by giving the
|
75
|
-
# `-E/--extra-details` option.
|
76
|
-
ExtraDetails: false
|
77
|
-
# Additional cops that do not reference a style guide rule may be enabled by
|
78
|
-
# default. Change behavior by overriding `StyleGuideCopsOnly`, or by giving
|
79
|
-
# the `--only-guide-cops` option.
|
80
|
-
StyleGuideCopsOnly: false
|
81
|
-
# All cops except the ones in disabled.yml are enabled by default. Change
|
82
|
-
# this behavior by overriding either `DisabledByDefault` or `EnabledByDefault`.
|
83
|
-
# When `DisabledByDefault` is `true`, all cops in the default configuration
|
84
|
-
# are disabled, and only cops in user configuration are enabled. This makes
|
85
|
-
# cops opt-in instead of opt-out. Note that when `DisabledByDefault` is `true`,
|
86
|
-
# cops in user configuration will be enabled even if they don't set the
|
87
|
-
# Enabled parameter.
|
88
|
-
# When `EnabledByDefault` is `true`, all cops, even those in disabled.yml,
|
89
|
-
# are enabled by default. Cops can still be disabled in user configuration.
|
90
|
-
# Note that it is invalid to set both EnabledByDefault and DisabledByDefault
|
91
|
-
# to true in the same configuration.
|
92
|
-
EnabledByDefault: false
|
93
|
-
DisabledByDefault: false
|
94
|
-
# Enables the result cache if `true`. Can be overridden by the `--cache` command
|
95
|
-
# line option.
|
96
|
-
UseCache: true
|
97
|
-
# Threshold for how many files can be stored in the result cache before some
|
98
|
-
# of the files are automatically removed.
|
99
|
-
MaxFilesInCache: 20000
|
100
|
-
# The cache will be stored in "rubocop_cache" under this directory. If
|
101
|
-
# CacheRootDirectory is ~ (nil), which it is by default, the root will be
|
102
|
-
# taken from the environment variable `$XDG_CACHE_HOME` if it is set, or if
|
103
|
-
# `$XDG_CACHE_HOME` is not set, it will be `$HOME/.cache/`.
|
104
|
-
CacheRootDirectory: ~
|
105
|
-
# It is possible for a malicious user to know the location of RuboCop's cache
|
106
|
-
# directory by looking at CacheRootDirectory, and create a symlink in its
|
107
|
-
# place that could cause RuboCop to overwrite unintended files, or read
|
108
|
-
# malicious input. If you are certain that your cache location is secure from
|
109
|
-
# this kind of attack, and wish to use a symlinked cache location, set this
|
110
|
-
# value to "true".
|
111
|
-
AllowSymlinksInCacheRootDirectory: false
|
112
|
-
# What MRI version of the Ruby interpreter is the inspected code intended to
|
113
|
-
# run on? (If there is more than one, set this to the lowest version.)
|
114
|
-
# If a value is specified for TargetRubyVersion then it is used. Acceptable
|
115
|
-
# values are specificed as a float (i.e. 2.5); the teeny version of Ruby
|
116
|
-
# should not be included. If the project specifies a Ruby version in the
|
117
|
-
# .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
|
118
|
-
# the desired version of Ruby by inspecting the .ruby-version file first,
|
119
|
-
# followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
|
120
|
-
# is specified in the Gemfile or gems.rb file, RuboCop reads the final value
|
121
|
-
# from the lock file.) If the Ruby version is still unresolved, RuboCop will
|
122
|
-
# use the oldest officially supported Ruby version (currently Ruby 2.1).
|
123
|
-
TargetRubyVersion: ~
|
124
|
-
# What version of Rails is the inspected code using? If a value is specified
|
125
|
-
# for TargetRailsVersion then it is used. Acceptable values are specificed
|
126
|
-
# as a float (i.e. 5.1); the patch version of Rails should not be included.
|
127
|
-
# If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
|
128
|
-
# gems.locked file to find the version of Rails that has been bound to the
|
129
|
-
# application. If neither of those files exist, RuboCop will use Rails 5.0
|
130
|
-
# as the default.
|
131
|
-
TargetRailsVersion: ~
|
132
|
-
|
133
|
-
#################### Layout ###########################
|
134
|
-
|
135
|
-
# Indent private/protected/public as deep as method definitions
|
136
|
-
Layout/AccessModifierIndentation:
|
137
|
-
EnforcedStyle: indent
|
138
|
-
SupportedStyles:
|
139
|
-
- outdent
|
140
|
-
- indent
|
141
|
-
# By default, the indentation width from Layout/IndentationWidth is used
|
142
|
-
# But it can be overridden by setting this parameter
|
143
|
-
IndentationWidth: ~
|
144
|
-
|
145
|
-
# Align the elements of a hash literal if they span more than one line.
|
146
|
-
Layout/AlignHash:
|
147
|
-
# Alignment of entries using hash rocket as separator. Valid values are:
|
148
|
-
#
|
149
|
-
# key - left alignment of keys
|
150
|
-
# 'a' => 2
|
151
|
-
# 'bb' => 3
|
152
|
-
# separator - alignment of hash rockets, keys are right aligned
|
153
|
-
# 'a' => 2
|
154
|
-
# 'bb' => 3
|
155
|
-
# table - left alignment of keys, hash rockets, and values
|
156
|
-
# 'a' => 2
|
157
|
-
# 'bb' => 3
|
158
|
-
EnforcedHashRocketStyle: key
|
159
|
-
SupportedHashRocketStyles:
|
160
|
-
- key
|
161
|
-
- separator
|
162
|
-
- table
|
163
|
-
# Alignment of entries using colon as separator. Valid values are:
|
164
|
-
#
|
165
|
-
# key - left alignment of keys
|
166
|
-
# a: 0
|
167
|
-
# bb: 1
|
168
|
-
# separator - alignment of colons, keys are right aligned
|
169
|
-
# a: 0
|
170
|
-
# bb: 1
|
171
|
-
# table - left alignment of keys and values
|
172
|
-
# a: 0
|
173
|
-
# bb: 1
|
174
|
-
EnforcedColonStyle: key
|
175
|
-
SupportedColonStyles:
|
176
|
-
- key
|
177
|
-
- separator
|
178
|
-
- table
|
179
|
-
# Select whether hashes that are the last argument in a method call should be
|
180
|
-
# inspected? Valid values are:
|
181
|
-
#
|
182
|
-
# always_inspect - Inspect both implicit and explicit hashes.
|
183
|
-
# Registers an offense for:
|
184
|
-
# function(a: 1,
|
185
|
-
# b: 2)
|
186
|
-
# Registers an offense for:
|
187
|
-
# function({a: 1,
|
188
|
-
# b: 2})
|
189
|
-
# always_ignore - Ignore both implicit and explicit hashes.
|
190
|
-
# Accepts:
|
191
|
-
# function(a: 1,
|
192
|
-
# b: 2)
|
193
|
-
# Accepts:
|
194
|
-
# function({a: 1,
|
195
|
-
# b: 2})
|
196
|
-
# ignore_implicit - Ignore only implicit hashes.
|
197
|
-
# Accepts:
|
198
|
-
# function(a: 1,
|
199
|
-
# b: 2)
|
200
|
-
# Registers an offense for:
|
201
|
-
# function({a: 1,
|
202
|
-
# b: 2})
|
203
|
-
# ignore_explicit - Ignore only explicit hashes.
|
204
|
-
# Accepts:
|
205
|
-
# function({a: 1,
|
206
|
-
# b: 2})
|
207
|
-
# Registers an offense for:
|
208
|
-
# function(a: 1,
|
209
|
-
# b: 2)
|
210
|
-
EnforcedLastArgumentHashStyle: always_inspect
|
211
|
-
SupportedLastArgumentHashStyles:
|
212
|
-
- always_inspect
|
213
|
-
- always_ignore
|
214
|
-
- ignore_implicit
|
215
|
-
- ignore_explicit
|
216
|
-
|
217
|
-
Layout/AlignParameters:
|
218
|
-
# Alignment of parameters in multi-line method calls.
|
219
|
-
#
|
220
|
-
# The `with_first_parameter` style aligns the following lines along the same
|
221
|
-
# column as the first parameter.
|
222
|
-
#
|
223
|
-
# method_call(a,
|
224
|
-
# b)
|
225
|
-
#
|
226
|
-
# The `with_fixed_indentation` style aligns the following lines with one
|
227
|
-
# level of indentation relative to the start of the line with the method call.
|
228
|
-
#
|
229
|
-
# method_call(a,
|
230
|
-
# b)
|
231
|
-
EnforcedStyle: with_first_parameter
|
232
|
-
SupportedStyles:
|
233
|
-
- with_first_parameter
|
234
|
-
- with_fixed_indentation
|
235
|
-
# By default, the indentation width from Layout/IndentationWidth is used
|
236
|
-
# But it can be overridden by setting this parameter
|
237
|
-
IndentationWidth: ~
|
238
|
-
|
239
|
-
# checks whether the end keywords are aligned properly for `do` `end` blocks.
|
240
|
-
Layout/BlockAlignment:
|
241
|
-
# The value `start_of_block` means that the `end` should be aligned with line
|
242
|
-
# where the `do` keyword appears.
|
243
|
-
# The value `start_of_line` means it should be aligned with the whole
|
244
|
-
# expression's starting line.
|
245
|
-
# The value `either` means both are allowed.
|
246
|
-
EnforcedStyleAlignWith: either
|
247
|
-
SupportedStylesAlignWith:
|
248
|
-
- either
|
249
|
-
- start_of_block
|
250
|
-
- start_of_line
|
251
|
-
|
252
|
-
# Indentation of `when`.
|
253
|
-
Layout/CaseIndentation:
|
254
|
-
EnforcedStyle: case
|
255
|
-
SupportedStyles:
|
256
|
-
- case
|
257
|
-
- end
|
258
|
-
IndentOneStep: false
|
259
|
-
# By default, the indentation width from `Layout/IndentationWidth` is used.
|
260
|
-
# But it can be overridden by setting this parameter.
|
261
|
-
# This only matters if `IndentOneStep` is `true`
|
262
|
-
IndentationWidth: ~
|
263
|
-
|
264
|
-
Layout/DefEndAlignment:
|
265
|
-
# The value `def` means that `end` should be aligned with the def keyword.
|
266
|
-
# The value `start_of_line` means that `end` should be aligned with method
|
267
|
-
# calls like `private`, `public`, etc, if present in front of the `def`
|
268
|
-
# keyword on the same line.
|
269
|
-
EnforcedStyleAlignWith: start_of_line
|
270
|
-
SupportedStylesAlignWith:
|
271
|
-
- start_of_line
|
272
|
-
- def
|
273
|
-
AutoCorrect: false
|
274
|
-
Severity: warning
|
275
|
-
|
276
|
-
# Multi-line method chaining should be done with leading dots.
|
277
|
-
Layout/DotPosition:
|
278
|
-
EnforcedStyle: leading
|
279
|
-
SupportedStyles:
|
280
|
-
- leading
|
281
|
-
- trailing
|
282
|
-
|
283
|
-
Layout/EmptyComment:
|
284
|
-
AllowBorderComment: true
|
285
|
-
AllowMarginComment: true
|
286
|
-
|
287
|
-
# Use empty lines between defs.
|
288
|
-
Layout/EmptyLineBetweenDefs:
|
289
|
-
# If `true`, this parameter means that single line method definitions don't
|
290
|
-
# need an empty line between them.
|
291
|
-
AllowAdjacentOneLineDefs: false
|
292
|
-
# Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
|
293
|
-
NumberOfEmptyLines: 1
|
294
|
-
|
295
|
-
Layout/EmptyLinesAroundBlockBody:
|
296
|
-
EnforcedStyle: no_empty_lines
|
297
|
-
SupportedStyles:
|
298
|
-
- empty_lines
|
299
|
-
- no_empty_lines
|
300
|
-
|
301
|
-
Layout/EmptyLinesAroundClassBody:
|
302
|
-
EnforcedStyle: no_empty_lines
|
303
|
-
SupportedStyles:
|
304
|
-
- empty_lines
|
305
|
-
- empty_lines_except_namespace
|
306
|
-
- empty_lines_special
|
307
|
-
- no_empty_lines
|
308
|
-
- beginning_only
|
309
|
-
- ending_only
|
310
|
-
|
311
|
-
Layout/EmptyLinesAroundModuleBody:
|
312
|
-
EnforcedStyle: no_empty_lines
|
313
|
-
SupportedStyles:
|
314
|
-
- empty_lines
|
315
|
-
- empty_lines_except_namespace
|
316
|
-
- empty_lines_special
|
317
|
-
- no_empty_lines
|
318
|
-
|
319
|
-
# Align ends correctly.
|
320
|
-
Layout/EndAlignment:
|
321
|
-
# The value `keyword` means that `end` should be aligned with the matching
|
322
|
-
# keyword (`if`, `while`, etc.).
|
323
|
-
# The value `variable` means that in assignments, `end` should be aligned
|
324
|
-
# with the start of the variable on the left hand side of `=`. In all other
|
325
|
-
# situations, `end` should still be aligned with the keyword.
|
326
|
-
# The value `start_of_line` means that `end` should be aligned with the start
|
327
|
-
# of the line which the matching keyword appears on.
|
328
|
-
EnforcedStyleAlignWith: keyword
|
329
|
-
SupportedStylesAlignWith:
|
330
|
-
- keyword
|
331
|
-
- variable
|
332
|
-
- start_of_line
|
333
|
-
AutoCorrect: false
|
334
|
-
Severity: warning
|
335
|
-
|
336
|
-
Layout/EndOfLine:
|
337
|
-
# The `native` style means that CR+LF (Carriage Return + Line Feed) is
|
338
|
-
# enforced on Windows, and LF is enforced on other platforms. The other styles
|
339
|
-
# mean LF and CR+LF, respectively.
|
340
|
-
EnforcedStyle: native
|
341
|
-
SupportedStyles:
|
342
|
-
- native
|
343
|
-
- lf
|
344
|
-
- crlf
|
345
|
-
|
346
|
-
Layout/ExtraSpacing:
|
347
|
-
# When true, allows most uses of extra spacing if the intent is to align
|
348
|
-
# things with the previous or next line, not counting empty lines or comment
|
349
|
-
# lines.
|
350
|
-
AllowForAlignment: true
|
351
|
-
# When true, forces the alignment of `=` in assignments on consecutive lines.
|
352
|
-
ForceEqualSignAlignment: false
|
353
|
-
|
354
|
-
Layout/FirstParameterIndentation:
|
355
|
-
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
356
|
-
SupportedStyles:
|
357
|
-
# The first parameter should always be indented one step more than the
|
358
|
-
# preceding line.
|
359
|
-
- consistent
|
360
|
-
# The first parameter should normally be indented one step more than the
|
361
|
-
# preceding line, but if it's a parameter for a method call that is itself
|
362
|
-
# a parameter in a method call, then the inner parameter should be indented
|
363
|
-
# relative to the inner method.
|
364
|
-
- special_for_inner_method_call
|
365
|
-
# Same as `special_for_inner_method_call` except that the special rule only
|
366
|
-
# applies if the outer method call encloses its arguments in parentheses.
|
367
|
-
- special_for_inner_method_call_in_parentheses
|
368
|
-
# By default, the indentation width from `Layout/IndentationWidth` is used
|
369
|
-
# But it can be overridden by setting this parameter
|
370
|
-
IndentationWidth: ~
|
371
|
-
|
372
|
-
Layout/IndentationConsistency:
|
373
|
-
# The difference between `rails` and `normal` is that the `rails` style
|
374
|
-
# prescribes that in classes and modules the `protected` and `private`
|
375
|
-
# modifier keywords shall be indented the same as public methods and that
|
376
|
-
# protected and private members shall be indented one step more than the
|
377
|
-
# modifiers. Other than that, both styles mean that entities on the same
|
378
|
-
# logical depth shall have the same indentation.
|
379
|
-
EnforcedStyle: normal
|
380
|
-
SupportedStyles:
|
381
|
-
- normal
|
382
|
-
- rails
|
383
|
-
|
384
|
-
Layout/IndentationWidth:
|
385
|
-
# Number of spaces for each indentation level.
|
386
|
-
Width: 2
|
387
|
-
IgnoredPatterns: []
|
388
|
-
|
389
|
-
# Checks the indentation of the first element in an array literal.
|
390
|
-
Layout/IndentArray:
|
391
|
-
# The value `special_inside_parentheses` means that array literals with
|
392
|
-
# brackets that have their opening bracket on the same line as a surrounding
|
393
|
-
# opening round parenthesis, shall have their first element indented relative
|
394
|
-
# to the first position inside the parenthesis.
|
395
|
-
#
|
396
|
-
# The value `consistent` means that the indentation of the first element shall
|
397
|
-
# always be relative to the first position of the line where the opening
|
398
|
-
# bracket is.
|
399
|
-
#
|
400
|
-
# The value `align_brackets` means that the indentation of the first element
|
401
|
-
# shall always be relative to the position of the opening bracket.
|
402
|
-
EnforcedStyle: special_inside_parentheses
|
403
|
-
SupportedStyles:
|
404
|
-
- special_inside_parentheses
|
405
|
-
- consistent
|
406
|
-
- align_brackets
|
407
|
-
# By default, the indentation width from `Layout/IndentationWidth` is used
|
408
|
-
# But it can be overridden by setting this parameter
|
409
|
-
IndentationWidth: ~
|
410
|
-
|
411
|
-
# Checks the indentation of assignment RHS, when on a different line from LHS
|
412
|
-
Layout/IndentAssignment:
|
413
|
-
# By default, the indentation width from `Layout/IndentationWidth` is used
|
414
|
-
# But it can be overridden by setting this parameter
|
415
|
-
IndentationWidth: ~
|
416
|
-
|
417
|
-
# Checks the indentation of the first key in a hash literal.
|
418
|
-
Layout/IndentHash:
|
419
|
-
# The value `special_inside_parentheses` means that hash literals with braces
|
420
|
-
# that have their opening brace on the same line as a surrounding opening
|
421
|
-
# round parenthesis, shall have their first key indented relative to the
|
422
|
-
# first position inside the parenthesis.
|
423
|
-
#
|
424
|
-
# The value `consistent` means that the indentation of the first key shall
|
425
|
-
# always be relative to the first position of the line where the opening
|
426
|
-
# brace is.
|
427
|
-
#
|
428
|
-
# The value `align_braces` means that the indentation of the first key shall
|
429
|
-
# always be relative to the position of the opening brace.
|
430
|
-
EnforcedStyle: special_inside_parentheses
|
431
|
-
SupportedStyles:
|
432
|
-
- special_inside_parentheses
|
433
|
-
- consistent
|
434
|
-
- align_braces
|
435
|
-
# By default, the indentation width from `Layout/IndentationWidth` is used
|
436
|
-
# But it can be overridden by setting this parameter
|
437
|
-
IndentationWidth: ~
|
438
|
-
|
439
|
-
Layout/IndentHeredoc:
|
440
|
-
EnforcedStyle: auto_detection
|
441
|
-
SupportedStyles:
|
442
|
-
- auto_detection
|
443
|
-
- squiggly
|
444
|
-
- active_support
|
445
|
-
- powerpack
|
446
|
-
- unindent
|
447
|
-
|
448
|
-
Layout/SpaceInLambdaLiteral:
|
449
|
-
EnforcedStyle: require_no_space
|
450
|
-
SupportedStyles:
|
451
|
-
- require_no_space
|
452
|
-
- require_space
|
453
|
-
|
454
|
-
Layout/MultilineArrayBraceLayout:
|
455
|
-
EnforcedStyle: symmetrical
|
456
|
-
SupportedStyles:
|
457
|
-
# symmetrical: closing brace is positioned in same way as opening brace
|
458
|
-
# new_line: closing brace is always on a new line
|
459
|
-
# same_line: closing brace is always on the same line as last element
|
460
|
-
- symmetrical
|
461
|
-
- new_line
|
462
|
-
- same_line
|
463
|
-
|
464
|
-
Layout/MultilineAssignmentLayout:
|
465
|
-
# The types of assignments which are subject to this rule.
|
466
|
-
SupportedTypes:
|
467
|
-
- block
|
468
|
-
- case
|
469
|
-
- class
|
470
|
-
- if
|
471
|
-
- kwbegin
|
472
|
-
- module
|
473
|
-
EnforcedStyle: new_line
|
474
|
-
SupportedStyles:
|
475
|
-
# Ensures that the assignment operator and the rhs are on the same line for
|
476
|
-
# the set of supported types.
|
477
|
-
- same_line
|
478
|
-
# Ensures that the assignment operator and the rhs are on separate lines
|
479
|
-
# for the set of supported types.
|
480
|
-
- new_line
|
481
|
-
|
482
|
-
Layout/MultilineHashBraceLayout:
|
483
|
-
EnforcedStyle: symmetrical
|
484
|
-
SupportedStyles:
|
485
|
-
# symmetrical: closing brace is positioned in same way as opening brace
|
486
|
-
# new_line: closing brace is always on a new line
|
487
|
-
# same_line: closing brace is always on same line as last element
|
488
|
-
- symmetrical
|
489
|
-
- new_line
|
490
|
-
- same_line
|
491
|
-
|
492
|
-
Layout/MultilineMethodCallBraceLayout:
|
493
|
-
EnforcedStyle: symmetrical
|
494
|
-
SupportedStyles:
|
495
|
-
# symmetrical: closing brace is positioned in same way as opening brace
|
496
|
-
# new_line: closing brace is always on a new line
|
497
|
-
# same_line: closing brace is always on the same line as last argument
|
498
|
-
- symmetrical
|
499
|
-
- new_line
|
500
|
-
- same_line
|
501
|
-
|
502
|
-
Layout/MultilineMethodCallIndentation:
|
503
|
-
EnforcedStyle: aligned
|
504
|
-
SupportedStyles:
|
505
|
-
- aligned
|
506
|
-
- indented
|
507
|
-
- indented_relative_to_receiver
|
508
|
-
# By default, the indentation width from Layout/IndentationWidth is used
|
509
|
-
# But it can be overridden by setting this parameter
|
510
|
-
IndentationWidth: ~
|
511
|
-
|
512
|
-
Layout/MultilineMethodDefinitionBraceLayout:
|
513
|
-
EnforcedStyle: symmetrical
|
514
|
-
SupportedStyles:
|
515
|
-
# symmetrical: closing brace is positioned in same way as opening brace
|
516
|
-
# new_line: closing brace is always on a new line
|
517
|
-
# same_line: closing brace is always on the same line as last parameter
|
518
|
-
- symmetrical
|
519
|
-
- new_line
|
520
|
-
- same_line
|
521
|
-
|
522
|
-
Layout/MultilineOperationIndentation:
|
523
|
-
EnforcedStyle: aligned
|
524
|
-
SupportedStyles:
|
525
|
-
- aligned
|
526
|
-
- indented
|
527
|
-
# By default, the indentation width from `Layout/IndentationWidth` is used
|
528
|
-
# But it can be overridden by setting this parameter
|
529
|
-
IndentationWidth: ~
|
530
|
-
|
531
|
-
Layout/SpaceAroundBlockParameters:
|
532
|
-
EnforcedStyleInsidePipes: no_space
|
533
|
-
SupportedStylesInsidePipes:
|
534
|
-
- space
|
535
|
-
- no_space
|
536
|
-
|
537
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
538
|
-
EnforcedStyle: space
|
539
|
-
SupportedStyles:
|
540
|
-
- space
|
541
|
-
- no_space
|
542
|
-
|
543
|
-
Layout/SpaceAroundOperators:
|
544
|
-
# When `true`, allows most uses of extra spacing if the intent is to align
|
545
|
-
# with an operator on the previous or next line, not counting empty lines
|
546
|
-
# or comment lines.
|
547
|
-
AllowForAlignment: true
|
548
|
-
|
549
|
-
Layout/SpaceBeforeBlockBraces:
|
550
|
-
EnforcedStyle: space
|
551
|
-
SupportedStyles:
|
552
|
-
- space
|
553
|
-
- no_space
|
554
|
-
EnforcedStyleForEmptyBraces: space
|
555
|
-
SupportedStylesForEmptyBraces:
|
556
|
-
- space
|
557
|
-
- no_space
|
558
|
-
|
559
|
-
Layout/SpaceBeforeFirstArg:
|
560
|
-
# When `true`, allows most uses of extra spacing if the intent is to align
|
561
|
-
# things with the previous or next line, not counting empty lines or comment
|
562
|
-
# lines.
|
563
|
-
AllowForAlignment: true
|
564
|
-
|
565
|
-
Layout/SpaceInsideArrayLiteralBrackets:
|
566
|
-
EnforcedStyle: no_space
|
567
|
-
SupportedStyles:
|
568
|
-
- space
|
569
|
-
- no_space
|
570
|
-
# 'compact' normally requires a space inside the brackets, with the exception
|
571
|
-
# that successive left brackets or right brackets are collapsed together
|
572
|
-
- compact
|
573
|
-
EnforcedStyleForEmptyBrackets: no_space
|
574
|
-
SupportedStylesForEmptyBrackets:
|
575
|
-
- space
|
576
|
-
- no_space
|
577
|
-
|
578
|
-
Layout/SpaceInsideBlockBraces:
|
579
|
-
EnforcedStyle: space
|
580
|
-
SupportedStyles:
|
581
|
-
- space
|
582
|
-
- no_space
|
583
|
-
EnforcedStyleForEmptyBraces: no_space
|
584
|
-
SupportedStylesForEmptyBraces:
|
585
|
-
- space
|
586
|
-
- no_space
|
587
|
-
# Space between `{` and `|`. Overrides `EnforcedStyle` if there is a conflict.
|
588
|
-
SpaceBeforeBlockParameters: true
|
589
|
-
|
590
|
-
Layout/SpaceInsideHashLiteralBraces:
|
591
|
-
EnforcedStyle: space
|
592
|
-
SupportedStyles:
|
593
|
-
- space
|
594
|
-
- no_space
|
595
|
-
# 'compact' normally requires a space inside hash braces, with the exception
|
596
|
-
# that successive left braces or right braces are collapsed together
|
597
|
-
- compact
|
598
|
-
EnforcedStyleForEmptyBraces: no_space
|
599
|
-
SupportedStylesForEmptyBraces:
|
600
|
-
- space
|
601
|
-
- no_space
|
602
|
-
|
603
|
-
Layout/SpaceInsideReferenceBrackets:
|
604
|
-
EnforcedStyle: no_space
|
605
|
-
SupportedStyles:
|
606
|
-
- space
|
607
|
-
- no_space
|
608
|
-
EnforcedStyleForEmptyBrackets: no_space
|
609
|
-
SupportedStylesForEmptyBrackets:
|
610
|
-
- space
|
611
|
-
- no_space
|
612
|
-
|
613
|
-
Layout/SpaceInsideStringInterpolation:
|
614
|
-
EnforcedStyle: no_space
|
615
|
-
SupportedStyles:
|
616
|
-
- space
|
617
|
-
- no_space
|
618
|
-
|
619
|
-
Layout/ClassStructure:
|
620
|
-
Categories:
|
621
|
-
module_inclusion:
|
622
|
-
- include
|
623
|
-
- prepend
|
624
|
-
- extend
|
625
|
-
ExpectedOrder:
|
626
|
-
- module_inclusion
|
627
|
-
- constants
|
628
|
-
- public_class_methods
|
629
|
-
- initializer
|
630
|
-
- public_methods
|
631
|
-
- protected_methods
|
632
|
-
- private_methods
|
633
|
-
|
634
|
-
Layout/Tab:
|
635
|
-
# By default, the indentation width from Layout/IndentationWidth is used
|
636
|
-
# But it can be overridden by setting this parameter
|
637
|
-
# It is used during auto-correction to determine how many spaces should
|
638
|
-
# replace each tab.
|
639
|
-
IndentationWidth: ~
|
640
|
-
|
641
|
-
Layout/TrailingBlankLines:
|
642
|
-
EnforcedStyle: final_newline
|
643
|
-
SupportedStyles:
|
644
|
-
- final_newline
|
645
|
-
- final_blank_line
|
646
|
-
|
647
|
-
#################### Naming ##########################
|
648
|
-
|
649
|
-
Naming/FileName:
|
650
|
-
# File names listed in `AllCops:Include` are excluded by default. Add extra
|
651
|
-
# excludes here.
|
652
|
-
Exclude: []
|
653
|
-
# When `true`, requires that each source file should define a class or module
|
654
|
-
# with a name which matches the file name (converted to ... case).
|
655
|
-
# It further expects it to be nested inside modules which match the names
|
656
|
-
# of subdirectories in its path.
|
657
|
-
ExpectMatchingDefinition: false
|
658
|
-
# If non-`nil`, expect all source file names to match the following regex.
|
659
|
-
# Only the file name itself is matched, not the entire file path.
|
660
|
-
# Use anchors as necessary if you want to match the entire name rather than
|
661
|
-
# just a part of it.
|
662
|
-
Regex: ~
|
663
|
-
# With `IgnoreExecutableScripts` set to `true`, this cop does not
|
664
|
-
# report offending filenames for executable scripts (i.e. source
|
665
|
-
# files with a shebang in the first line).
|
666
|
-
IgnoreExecutableScripts: true
|
667
|
-
AllowedAcronyms:
|
668
|
-
- CLI
|
669
|
-
- DSL
|
670
|
-
- ACL
|
671
|
-
- API
|
672
|
-
- ASCII
|
673
|
-
- CPU
|
674
|
-
- CSS
|
675
|
-
- DNS
|
676
|
-
- EOF
|
677
|
-
- GUID
|
678
|
-
- HTML
|
679
|
-
- HTTP
|
680
|
-
- HTTPS
|
681
|
-
- ID
|
682
|
-
- IP
|
683
|
-
- JSON
|
684
|
-
- LHS
|
685
|
-
- QPS
|
686
|
-
- RAM
|
687
|
-
- RHS
|
688
|
-
- RPC
|
689
|
-
- SLA
|
690
|
-
- SMTP
|
691
|
-
- SQL
|
692
|
-
- SSH
|
693
|
-
- TCP
|
694
|
-
- TLS
|
695
|
-
- TTL
|
696
|
-
- UDP
|
697
|
-
- UI
|
698
|
-
- UID
|
699
|
-
- UUID
|
700
|
-
- URI
|
701
|
-
- URL
|
702
|
-
- UTF8
|
703
|
-
- VM
|
704
|
-
- XML
|
705
|
-
- XMPP
|
706
|
-
- XSRF
|
707
|
-
- XSS
|
708
|
-
|
709
|
-
Naming/HeredocDelimiterNaming:
|
710
|
-
Blacklist:
|
711
|
-
- END
|
712
|
-
- !ruby/regexp '/EO[A-Z]{1}/'
|
713
|
-
|
714
|
-
Naming/HeredocDelimiterCase:
|
715
|
-
EnforcedStyle: uppercase
|
716
|
-
SupportedStyles:
|
717
|
-
- lowercase
|
718
|
-
- uppercase
|
719
|
-
|
720
|
-
Naming/MethodName:
|
721
|
-
EnforcedStyle: snake_case
|
722
|
-
SupportedStyles:
|
723
|
-
- snake_case
|
724
|
-
- camelCase
|
725
|
-
|
726
|
-
Naming/PredicateName:
|
727
|
-
# Predicate name prefixes.
|
728
|
-
NamePrefix:
|
729
|
-
- is_
|
730
|
-
- has_
|
731
|
-
- have_
|
732
|
-
# Predicate name prefixes that should be removed.
|
733
|
-
NamePrefixBlacklist:
|
734
|
-
- is_
|
735
|
-
- has_
|
736
|
-
- have_
|
737
|
-
# Predicate names which, despite having a blacklisted prefix, or no `?`,
|
738
|
-
# should still be accepted
|
739
|
-
NameWhitelist:
|
740
|
-
- is_a?
|
741
|
-
# Method definition macros for dynamically generated methods.
|
742
|
-
MethodDefinitionMacros:
|
743
|
-
- define_method
|
744
|
-
- define_singleton_method
|
745
|
-
# Exclude Rspec specs because there is a strong convention to write spec
|
746
|
-
# helpers in the form of `have_something` or `be_something`.
|
747
|
-
Exclude:
|
748
|
-
- 'spec/**/*'
|
749
|
-
|
750
|
-
Naming/UncommunicativeBlockParamName:
|
751
|
-
# Parameter names may be equal to or greater than this value
|
752
|
-
MinNameLength: 1
|
753
|
-
AllowNamesEndingInNumbers: true
|
754
|
-
# Whitelisted names that will not register an offense
|
755
|
-
AllowedNames: []
|
756
|
-
# Blacklisted names that will register an offense
|
757
|
-
ForbiddenNames: []
|
758
|
-
|
759
|
-
Naming/UncommunicativeMethodParamName:
|
760
|
-
# Parameter names may be equal to or greater than this value
|
761
|
-
MinNameLength: 3
|
762
|
-
AllowNamesEndingInNumbers: true
|
763
|
-
# Whitelisted names that will not register an offense
|
764
|
-
AllowedNames:
|
765
|
-
- io
|
766
|
-
- id
|
767
|
-
- to
|
768
|
-
- by
|
769
|
-
- 'on'
|
770
|
-
- in
|
771
|
-
- at
|
772
|
-
# Blacklisted names that will register an offense
|
773
|
-
ForbiddenNames: []
|
774
|
-
|
775
|
-
Naming/VariableName:
|
776
|
-
EnforcedStyle: snake_case
|
777
|
-
SupportedStyles:
|
778
|
-
- snake_case
|
779
|
-
- camelCase
|
780
|
-
|
781
|
-
Naming/VariableNumber:
|
782
|
-
EnforcedStyle: normalcase
|
783
|
-
SupportedStyles:
|
784
|
-
- snake_case
|
785
|
-
- normalcase
|
786
|
-
- non_integer
|
787
|
-
|
788
|
-
#################### Style ###########################
|
789
|
-
|
790
|
-
Style/Alias:
|
791
|
-
EnforcedStyle: prefer_alias
|
792
|
-
SupportedStyles:
|
793
|
-
- prefer_alias
|
794
|
-
- prefer_alias_method
|
795
|
-
|
796
|
-
Style/AndOr:
|
797
|
-
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
798
|
-
# or completely (always).
|
799
|
-
EnforcedStyle: always
|
800
|
-
SupportedStyles:
|
801
|
-
- always
|
802
|
-
- conditionals
|
803
|
-
|
804
|
-
Style/AsciiComments:
|
805
|
-
AllowedChars: []
|
806
|
-
|
807
|
-
# Checks if usage of `%()` or `%Q()` matches configuration.
|
808
|
-
Style/BarePercentLiterals:
|
809
|
-
EnforcedStyle: bare_percent
|
810
|
-
SupportedStyles:
|
811
|
-
- percent_q
|
812
|
-
- bare_percent
|
813
|
-
|
814
|
-
Style/BlockDelimiters:
|
815
|
-
EnforcedStyle: line_count_based
|
816
|
-
SupportedStyles:
|
817
|
-
# The `line_count_based` style enforces braces around single line blocks and
|
818
|
-
# do..end around multi-line blocks.
|
819
|
-
- line_count_based
|
820
|
-
# The `semantic` style enforces braces around functional blocks, where the
|
821
|
-
# primary purpose of the block is to return a value and do..end for
|
822
|
-
# procedural blocks, where the primary purpose of the block is its
|
823
|
-
# side-effects.
|
824
|
-
#
|
825
|
-
# This looks at the usage of a block's method to determine its type (e.g. is
|
826
|
-
# the result of a `map` assigned to a variable or passed to another
|
827
|
-
# method) but exceptions are permitted in the `ProceduralMethods`,
|
828
|
-
# `FunctionalMethods` and `IgnoredMethods` sections below.
|
829
|
-
- semantic
|
830
|
-
# The `braces_for_chaining` style enforces braces around single line blocks
|
831
|
-
# and do..end around multi-line blocks, except for multi-line blocks whose
|
832
|
-
# return value is being chained with another method (in which case braces
|
833
|
-
# are enforced).
|
834
|
-
- braces_for_chaining
|
835
|
-
ProceduralMethods:
|
836
|
-
# Methods that are known to be procedural in nature but look functional from
|
837
|
-
# their usage, e.g.
|
838
|
-
#
|
839
|
-
# time = Benchmark.realtime do
|
840
|
-
# foo.bar
|
841
|
-
# end
|
842
|
-
#
|
843
|
-
# Here, the return value of the block is discarded but the return value of
|
844
|
-
# `Benchmark.realtime` is used.
|
845
|
-
- benchmark
|
846
|
-
- bm
|
847
|
-
- bmbm
|
848
|
-
- create
|
849
|
-
- each_with_object
|
850
|
-
- measure
|
851
|
-
- new
|
852
|
-
- realtime
|
853
|
-
- tap
|
854
|
-
- with_object
|
855
|
-
FunctionalMethods:
|
856
|
-
# Methods that are known to be functional in nature but look procedural from
|
857
|
-
# their usage, e.g.
|
858
|
-
#
|
859
|
-
# let(:foo) { Foo.new }
|
860
|
-
#
|
861
|
-
# Here, the return value of `Foo.new` is used to define a `foo` helper but
|
862
|
-
# doesn't appear to be used from the return value of `let`.
|
863
|
-
- let
|
864
|
-
- let!
|
865
|
-
- subject
|
866
|
-
- watch
|
867
|
-
IgnoredMethods:
|
868
|
-
# Methods that can be either procedural or functional and cannot be
|
869
|
-
# categorised from their usage alone, e.g.
|
870
|
-
#
|
871
|
-
# foo = lambda do |x|
|
872
|
-
# puts "Hello, #{x}"
|
873
|
-
# end
|
874
|
-
#
|
875
|
-
# foo = lambda do |x|
|
876
|
-
# x * 100
|
877
|
-
# end
|
878
|
-
#
|
879
|
-
# Here, it is impossible to tell from the return value of `lambda` whether
|
880
|
-
# the inner block's return value is significant.
|
881
|
-
- lambda
|
882
|
-
- proc
|
883
|
-
- it
|
884
|
-
|
885
|
-
Style/BracesAroundHashParameters:
|
886
|
-
EnforcedStyle: no_braces
|
887
|
-
SupportedStyles:
|
888
|
-
# The `braces` style enforces braces around all method parameters that are
|
889
|
-
# hashes.
|
890
|
-
- braces
|
891
|
-
# The `no_braces` style checks that the last parameter doesn't have braces
|
892
|
-
# around it.
|
893
|
-
- no_braces
|
894
|
-
# The `context_dependent` style checks that the last parameter doesn't have
|
895
|
-
# braces around it, but requires braces if the second to last parameter is
|
896
|
-
# also a hash literal.
|
897
|
-
- context_dependent
|
898
|
-
|
899
|
-
Style/ClassAndModuleChildren:
|
900
|
-
# Checks the style of children definitions at classes and modules.
|
901
|
-
#
|
902
|
-
# Basically there are two different styles:
|
903
|
-
#
|
904
|
-
# `nested` - have each child on a separate line
|
905
|
-
# class Foo
|
906
|
-
# class Bar
|
907
|
-
# end
|
908
|
-
# end
|
909
|
-
#
|
910
|
-
# `compact` - combine definitions as much as possible
|
911
|
-
# class Foo::Bar
|
912
|
-
# end
|
913
|
-
#
|
914
|
-
# The compact style is only forced, for classes or modules with one child.
|
915
|
-
EnforcedStyle: nested
|
916
|
-
SupportedStyles:
|
917
|
-
- nested
|
918
|
-
- compact
|
919
|
-
|
920
|
-
Style/ClassCheck:
|
921
|
-
EnforcedStyle: is_a?
|
922
|
-
SupportedStyles:
|
923
|
-
- is_a?
|
924
|
-
- kind_of?
|
925
|
-
|
926
|
-
# Align with the style guide.
|
927
|
-
Style/CollectionMethods:
|
928
|
-
# Mapping from undesired method to desired_method
|
929
|
-
# e.g. to use `detect` over `find`:
|
930
|
-
#
|
931
|
-
# CollectionMethods:
|
932
|
-
# PreferredMethods:
|
933
|
-
# find: detect
|
934
|
-
PreferredMethods:
|
935
|
-
collect: 'map'
|
936
|
-
collect!: 'map!'
|
937
|
-
inject: 'reduce'
|
938
|
-
detect: 'find'
|
939
|
-
find_all: 'select'
|
940
|
-
|
941
|
-
# Use '`' or '%x' around command literals.
|
942
|
-
Style/CommandLiteral:
|
943
|
-
EnforcedStyle: backticks
|
944
|
-
# backticks: Always use backticks.
|
945
|
-
# percent_x: Always use `%x`.
|
946
|
-
# mixed: Use backticks on single-line commands, and `%x` on multi-line commands.
|
947
|
-
SupportedStyles:
|
948
|
-
- backticks
|
949
|
-
- percent_x
|
950
|
-
- mixed
|
951
|
-
# If `false`, the cop will always recommend using `%x` if one or more backticks
|
952
|
-
# are found in the command string.
|
953
|
-
AllowInnerBackticks: false
|
954
|
-
|
955
|
-
# Checks formatting of special comments
|
956
|
-
Style/CommentAnnotation:
|
957
|
-
Keywords:
|
958
|
-
- TODO
|
959
|
-
- FIXME
|
960
|
-
- OPTIMIZE
|
961
|
-
- HACK
|
962
|
-
- REVIEW
|
963
|
-
|
964
|
-
Style/ConditionalAssignment:
|
965
|
-
EnforcedStyle: assign_to_condition
|
966
|
-
SupportedStyles:
|
967
|
-
- assign_to_condition
|
968
|
-
- assign_inside_condition
|
969
|
-
# When configured to `assign_to_condition`, `SingleLineConditionsOnly`
|
970
|
-
# will only register an offense when all branches of a condition are
|
971
|
-
# a single line.
|
972
|
-
# When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
|
973
|
-
# will only register an offense for assignment to a condition that has
|
974
|
-
# at least one multiline branch.
|
975
|
-
SingleLineConditionsOnly: true
|
976
|
-
IncludeTernaryExpressions: true
|
977
|
-
|
978
|
-
# Checks that you have put a copyright in a comment before any code.
|
979
|
-
#
|
980
|
-
# You can override the default Notice in your .rubocop.yml file.
|
981
|
-
#
|
982
|
-
# In order to use autocorrect, you must supply a value for the
|
983
|
-
# `AutocorrectNotice` key that matches the regexp Notice. A blank
|
984
|
-
# `AutocorrectNotice` will cause an error during autocorrect.
|
985
|
-
#
|
986
|
-
# Autocorrect will add a copyright notice in a comment at the top
|
987
|
-
# of the file immediately after any shebang or encoding comments.
|
988
|
-
#
|
989
|
-
# Example rubocop.yml:
|
990
|
-
#
|
991
|
-
# Style/Copyright:
|
992
|
-
# Enabled: true
|
993
|
-
# Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
|
994
|
-
# AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
|
995
|
-
#
|
996
|
-
Style/Copyright:
|
997
|
-
Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
|
998
|
-
AutocorrectNotice: ''
|
999
|
-
|
1000
|
-
Style/DocumentationMethod:
|
1001
|
-
RequireForNonPublicMethods: false
|
1002
|
-
|
1003
|
-
# Warn on empty else statements
|
1004
|
-
# empty - warn only on empty `else`
|
1005
|
-
# nil - warn on `else` with nil in it
|
1006
|
-
# both - warn on empty `else` and `else` with `nil` in it
|
1007
|
-
Style/EmptyElse:
|
1008
|
-
EnforcedStyle: both
|
1009
|
-
SupportedStyles:
|
1010
|
-
- empty
|
1011
|
-
- nil
|
1012
|
-
- both
|
1013
|
-
|
1014
|
-
Style/EmptyMethod:
|
1015
|
-
EnforcedStyle: compact
|
1016
|
-
SupportedStyles:
|
1017
|
-
- compact
|
1018
|
-
- expanded
|
1019
|
-
|
1020
|
-
# Checks use of for or each in multiline loops.
|
1021
|
-
Style/For:
|
1022
|
-
EnforcedStyle: each
|
1023
|
-
SupportedStyles:
|
1024
|
-
- each
|
1025
|
-
- for
|
1026
|
-
|
1027
|
-
# Enforce the method used for string formatting.
|
1028
|
-
Style/FormatString:
|
1029
|
-
EnforcedStyle: format
|
1030
|
-
SupportedStyles:
|
1031
|
-
- format
|
1032
|
-
- sprintf
|
1033
|
-
- percent
|
1034
|
-
|
1035
|
-
# Enforce using either `%<token>s` or `%{token}`
|
1036
|
-
Style/FormatStringToken:
|
1037
|
-
EnforcedStyle: annotated
|
1038
|
-
SupportedStyles:
|
1039
|
-
# Prefer tokens which contain a sprintf like type annotation like
|
1040
|
-
# `%<name>s`, `%<age>d`, `%<score>f`
|
1041
|
-
- annotated
|
1042
|
-
# Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
|
1043
|
-
- template
|
1044
|
-
- unannotated
|
1045
|
-
|
1046
|
-
Style/FrozenStringLiteralComment:
|
1047
|
-
EnforcedStyle: when_needed
|
1048
|
-
SupportedStyles:
|
1049
|
-
# `when_needed` will add the frozen string literal comment to files
|
1050
|
-
# only when the `TargetRubyVersion` is set to 2.3+.
|
1051
|
-
- when_needed
|
1052
|
-
# `always` will always add the frozen string literal comment to a file
|
1053
|
-
# regardless of the Ruby version or if `freeze` or `<<` are called on a
|
1054
|
-
# string literal. If you run code against multiple versions of Ruby, it is
|
1055
|
-
# possible that this will create errors in Ruby 2.3.0+.
|
1056
|
-
- always
|
1057
|
-
# `never` will enforce that the frozen string literal comment does not
|
1058
|
-
# exist in a file.
|
1059
|
-
- never
|
1060
|
-
|
1061
|
-
# Built-in global variables are allowed by default.
|
1062
|
-
Style/GlobalVars:
|
1063
|
-
AllowedVariables: []
|
1064
|
-
|
1065
|
-
# `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
|
1066
|
-
# needs to have to trigger this cop
|
1067
|
-
Style/GuardClause:
|
1068
|
-
MinBodyLength: 1
|
1069
|
-
|
1070
|
-
Style/HashSyntax:
|
1071
|
-
EnforcedStyle: ruby19
|
1072
|
-
SupportedStyles:
|
1073
|
-
# checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
|
1074
|
-
- ruby19
|
1075
|
-
# checks for hash rocket syntax for all hashes
|
1076
|
-
- hash_rockets
|
1077
|
-
# forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
|
1078
|
-
- no_mixed_keys
|
1079
|
-
# enforces both ruby19 and no_mixed_keys styles
|
1080
|
-
- ruby19_no_mixed_keys
|
1081
|
-
# Force hashes that have a symbol value to use hash rockets
|
1082
|
-
UseHashRocketsWithSymbolValues: false
|
1083
|
-
# Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
|
1084
|
-
PreferHashRocketsForNonAlnumEndingSymbols: false
|
1085
|
-
|
1086
|
-
Style/InverseMethods:
|
1087
|
-
# `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
|
1088
|
-
# The relationship of inverse methods only needs to be defined in one direction.
|
1089
|
-
# Keys and values both need to be defined as symbols.
|
1090
|
-
InverseMethods:
|
1091
|
-
:any?: :none?
|
1092
|
-
:even?: :odd?
|
1093
|
-
:==: :!=
|
1094
|
-
:=~: :!~
|
1095
|
-
:<: :>=
|
1096
|
-
:>: :<=
|
1097
|
-
# `ActiveSupport` defines some common inverse methods. They are listed below,
|
1098
|
-
# and not enabled by default.
|
1099
|
-
#:present?: :blank?,
|
1100
|
-
#:include?: :exclude?
|
1101
|
-
# `InverseBlocks` are methods that are inverted by inverting the return
|
1102
|
-
# of the block that is passed to the method
|
1103
|
-
InverseBlocks:
|
1104
|
-
:select: :reject
|
1105
|
-
:select!: :reject!
|
1106
|
-
|
1107
|
-
Style/Lambda:
|
1108
|
-
EnforcedStyle: line_count_dependent
|
1109
|
-
SupportedStyles:
|
1110
|
-
- line_count_dependent
|
1111
|
-
- lambda
|
1112
|
-
- literal
|
1113
|
-
|
1114
|
-
Style/LambdaCall:
|
1115
|
-
EnforcedStyle: call
|
1116
|
-
SupportedStyles:
|
1117
|
-
- call
|
1118
|
-
- braces
|
1119
|
-
|
1120
|
-
Style/MethodCallWithArgsParentheses:
|
1121
|
-
IgnoreMacros: true
|
1122
|
-
IgnoredMethods: []
|
1123
|
-
|
1124
|
-
Style/MethodDefParentheses:
|
1125
|
-
EnforcedStyle: require_parentheses
|
1126
|
-
SupportedStyles:
|
1127
|
-
- require_parentheses
|
1128
|
-
- require_no_parentheses
|
1129
|
-
- require_no_parentheses_except_multiline
|
1130
|
-
|
1131
|
-
Style/MissingElse:
|
1132
|
-
EnforcedStyle: both
|
1133
|
-
SupportedStyles:
|
1134
|
-
# if - warn when an if expression is missing an else branch
|
1135
|
-
# case - warn when a case expression is missing an else branch
|
1136
|
-
# both - warn when an if or case expression is missing an else branch
|
1137
|
-
- if
|
1138
|
-
- case
|
1139
|
-
- both
|
1140
|
-
|
1141
|
-
# Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
|
1142
|
-
# `module` bodies.
|
1143
|
-
Style/MixinGrouping:
|
1144
|
-
EnforcedStyle: separated
|
1145
|
-
SupportedStyles:
|
1146
|
-
# separated: each mixed in module goes in a separate statement.
|
1147
|
-
# grouped: mixed in modules are grouped into a single statement.
|
1148
|
-
- separated
|
1149
|
-
- grouped
|
1150
|
-
|
1151
|
-
Style/ModuleFunction:
|
1152
|
-
EnforcedStyle: module_function
|
1153
|
-
SupportedStyles:
|
1154
|
-
- module_function
|
1155
|
-
- extend_self
|
1156
|
-
|
1157
|
-
Style/MultilineMemoization:
|
1158
|
-
EnforcedStyle: keyword
|
1159
|
-
SupportedStyles:
|
1160
|
-
- keyword
|
1161
|
-
- braces
|
1162
|
-
|
1163
|
-
Style/NegatedIf:
|
1164
|
-
EnforcedStyle: both
|
1165
|
-
SupportedStyles:
|
1166
|
-
# both: prefix and postfix negated `if` should both use `unless`
|
1167
|
-
# prefix: only use `unless` for negated `if` statements positioned before the body of the statement
|
1168
|
-
# postfix: only use `unless` for negated `if` statements positioned after the body of the statement
|
1169
|
-
- both
|
1170
|
-
- prefix
|
1171
|
-
- postfix
|
1172
|
-
|
1173
|
-
Style/NestedParenthesizedCalls:
|
1174
|
-
Whitelist:
|
1175
|
-
- be
|
1176
|
-
- be_a
|
1177
|
-
- be_an
|
1178
|
-
- be_between
|
1179
|
-
- be_falsey
|
1180
|
-
- be_kind_of
|
1181
|
-
- be_instance_of
|
1182
|
-
- be_truthy
|
1183
|
-
- be_within
|
1184
|
-
- eq
|
1185
|
-
- eql
|
1186
|
-
- end_with
|
1187
|
-
- include
|
1188
|
-
- match
|
1189
|
-
- raise_error
|
1190
|
-
- respond_to
|
1191
|
-
- start_with
|
1192
|
-
|
1193
|
-
Style/Next:
|
1194
|
-
# With `always` all conditions at the end of an iteration needs to be
|
1195
|
-
# replaced by next - with `skip_modifier_ifs` the modifier if like this one
|
1196
|
-
# are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
|
1197
|
-
EnforcedStyle: skip_modifier_ifs
|
1198
|
-
# `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
|
1199
|
-
# needs to have to trigger this cop
|
1200
|
-
MinBodyLength: 3
|
1201
|
-
SupportedStyles:
|
1202
|
-
- skip_modifier_ifs
|
1203
|
-
- always
|
1204
|
-
|
1205
|
-
Style/NonNilCheck:
|
1206
|
-
# With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
|
1207
|
-
# `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
|
1208
|
-
# **usually** OK, but might change behavior.
|
1209
|
-
#
|
1210
|
-
# With `IncludeSemanticChanges` set to `false`, this cop does not report
|
1211
|
-
# offenses for `!x.nil?` and does no changes that might change behavior.
|
1212
|
-
IncludeSemanticChanges: false
|
1213
|
-
|
1214
|
-
Style/NumericLiterals:
|
1215
|
-
MinDigits: 5
|
1216
|
-
Strict: false
|
1217
|
-
|
1218
|
-
Style/NumericLiteralPrefix:
|
1219
|
-
EnforcedOctalStyle: zero_with_o
|
1220
|
-
SupportedOctalStyles:
|
1221
|
-
- zero_with_o
|
1222
|
-
- zero_only
|
1223
|
-
|
1224
|
-
Style/NumericPredicate:
|
1225
|
-
EnforcedStyle: predicate
|
1226
|
-
SupportedStyles:
|
1227
|
-
- predicate
|
1228
|
-
- comparison
|
1229
|
-
# Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
|
1230
|
-
# false positives.
|
1231
|
-
Exclude:
|
1232
|
-
- 'spec/**/*'
|
1233
|
-
|
1234
|
-
Style/OptionHash:
|
1235
|
-
# A list of parameter names that will be flagged by this cop.
|
1236
|
-
SuspiciousParamNames:
|
1237
|
-
- options
|
1238
|
-
- opts
|
1239
|
-
- args
|
1240
|
-
- params
|
1241
|
-
- parameters
|
1242
|
-
|
1243
|
-
# Allow safe assignment in conditions.
|
1244
|
-
Style/ParenthesesAroundCondition:
|
1245
|
-
AllowSafeAssignment: true
|
1246
|
-
|
1247
|
-
Style/PercentLiteralDelimiters:
|
1248
|
-
# Specify the default preferred delimiter for all types with the 'default' key
|
1249
|
-
# Override individual delimiters (even with default specified) by specifying
|
1250
|
-
# an individual key
|
1251
|
-
PreferredDelimiters:
|
1252
|
-
default: ()
|
1253
|
-
'%i': '[]'
|
1254
|
-
'%I': '[]'
|
1255
|
-
'%r': '{}'
|
1256
|
-
'%w': '[]'
|
1257
|
-
'%W': '[]'
|
1258
|
-
|
1259
|
-
Style/PercentQLiterals:
|
1260
|
-
EnforcedStyle: lower_case_q
|
1261
|
-
SupportedStyles:
|
1262
|
-
- lower_case_q # Use `%q` when possible, `%Q` when necessary
|
1263
|
-
- upper_case_q # Always use `%Q`
|
1264
|
-
|
1265
|
-
Style/PreferredHashMethods:
|
1266
|
-
EnforcedStyle: short
|
1267
|
-
SupportedStyles:
|
1268
|
-
- short
|
1269
|
-
- verbose
|
1270
|
-
|
1271
|
-
Style/RaiseArgs:
|
1272
|
-
EnforcedStyle: exploded
|
1273
|
-
SupportedStyles:
|
1274
|
-
- compact # raise Exception.new(msg)
|
1275
|
-
- exploded # raise Exception, msg
|
1276
|
-
|
1277
|
-
Style/RedundantReturn:
|
1278
|
-
# When `true` allows code like `return x, y`.
|
1279
|
-
AllowMultipleReturnValues: false
|
1280
|
-
|
1281
|
-
# Use `/` or `%r` around regular expressions.
|
1282
|
-
Style/RegexpLiteral:
|
1283
|
-
EnforcedStyle: slashes
|
1284
|
-
# slashes: Always use slashes.
|
1285
|
-
# percent_r: Always use `%r`.
|
1286
|
-
# mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
|
1287
|
-
SupportedStyles:
|
1288
|
-
- slashes
|
1289
|
-
- percent_r
|
1290
|
-
- mixed
|
1291
|
-
# If `false`, the cop will always recommend using `%r` if one or more slashes
|
1292
|
-
# are found in the regexp string.
|
1293
|
-
AllowInnerSlashes: false
|
1294
|
-
|
1295
|
-
Style/RescueStandardError:
|
1296
|
-
EnforcedStyle: explicit
|
1297
|
-
# implicit: Do not include the error class, `rescue`
|
1298
|
-
# explicit: Require an error class `rescue StandardError`
|
1299
|
-
SupportedStyles:
|
1300
|
-
- implicit
|
1301
|
-
- explicit
|
1302
|
-
|
1303
|
-
Style/ReturnNil:
|
1304
|
-
EnforcedStyle: return
|
1305
|
-
SupportedStyles:
|
1306
|
-
- return
|
1307
|
-
- return_nil
|
1308
|
-
|
1309
|
-
Style/SafeNavigation:
|
1310
|
-
# Safe navigation may cause a statement to start returning `nil` in addition
|
1311
|
-
# to whatever it used to return.
|
1312
|
-
ConvertCodeThatCanStartToReturnNil: false
|
1313
|
-
Whitelist:
|
1314
|
-
- present?
|
1315
|
-
- blank?
|
1316
|
-
- presence
|
1317
|
-
- try
|
1318
|
-
|
1319
|
-
Style/Semicolon:
|
1320
|
-
# Allow `;` to separate several expressions on the same line.
|
1321
|
-
AllowAsExpressionSeparator: false
|
1322
|
-
|
1323
|
-
Style/SignalException:
|
1324
|
-
EnforcedStyle: only_raise
|
1325
|
-
SupportedStyles:
|
1326
|
-
- only_raise
|
1327
|
-
- only_fail
|
1328
|
-
- semantic
|
1329
|
-
|
1330
|
-
Style/SingleLineBlockParams:
|
1331
|
-
Methods:
|
1332
|
-
- reduce:
|
1333
|
-
- acc
|
1334
|
-
- elem
|
1335
|
-
- inject:
|
1336
|
-
- acc
|
1337
|
-
- elem
|
1338
|
-
|
1339
|
-
Style/SingleLineMethods:
|
1340
|
-
AllowIfMethodIsEmpty: true
|
1341
|
-
|
1342
|
-
Style/SpecialGlobalVars:
|
1343
|
-
EnforcedStyle: use_english_names
|
1344
|
-
SupportedStyles:
|
1345
|
-
- use_perl_names
|
1346
|
-
- use_english_names
|
1347
|
-
|
1348
|
-
Style/StabbyLambdaParentheses:
|
1349
|
-
EnforcedStyle: require_parentheses
|
1350
|
-
SupportedStyles:
|
1351
|
-
- require_parentheses
|
1352
|
-
- require_no_parentheses
|
1353
|
-
|
1354
|
-
Style/StringLiterals:
|
1355
|
-
EnforcedStyle: single_quotes
|
1356
|
-
SupportedStyles:
|
1357
|
-
- single_quotes
|
1358
|
-
- double_quotes
|
1359
|
-
# If `true`, strings which span multiple lines using `\` for continuation must
|
1360
|
-
# use the same type of quotes on each line.
|
1361
|
-
ConsistentQuotesInMultiline: false
|
1362
|
-
|
1363
|
-
Style/StringLiteralsInInterpolation:
|
1364
|
-
EnforcedStyle: single_quotes
|
1365
|
-
SupportedStyles:
|
1366
|
-
- single_quotes
|
1367
|
-
- double_quotes
|
1368
|
-
|
1369
|
-
Style/StringMethods:
|
1370
|
-
# Mapping from undesired method to desired_method
|
1371
|
-
# e.g. to use `to_sym` over `intern`:
|
1372
|
-
#
|
1373
|
-
# StringMethods:
|
1374
|
-
# PreferredMethods:
|
1375
|
-
# intern: to_sym
|
1376
|
-
PreferredMethods:
|
1377
|
-
intern: to_sym
|
1378
|
-
|
1379
|
-
Style/SymbolArray:
|
1380
|
-
EnforcedStyle: percent
|
1381
|
-
MinSize: 0
|
1382
|
-
SupportedStyles:
|
1383
|
-
- percent
|
1384
|
-
- brackets
|
1385
|
-
|
1386
|
-
Style/SymbolProc:
|
1387
|
-
# A list of method names to be ignored by the check.
|
1388
|
-
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
1389
|
-
IgnoredMethods:
|
1390
|
-
- respond_to
|
1391
|
-
- define_method
|
1392
|
-
|
1393
|
-
Style/TernaryParentheses:
|
1394
|
-
EnforcedStyle: require_no_parentheses
|
1395
|
-
SupportedStyles:
|
1396
|
-
- require_parentheses
|
1397
|
-
- require_no_parentheses
|
1398
|
-
- require_parentheses_when_complex
|
1399
|
-
AllowSafeAssignment: true
|
1400
|
-
|
1401
|
-
Style/TrailingCommaInArguments:
|
1402
|
-
# If `comma`, the cop requires a comma after the last argument, but only for
|
1403
|
-
# parenthesized method calls where each argument is on its own line.
|
1404
|
-
# If `consistent_comma`, the cop requires a comma after the last argument,
|
1405
|
-
# for all parenthesized method calls with arguments.
|
1406
|
-
EnforcedStyleForMultiline: no_comma
|
1407
|
-
SupportedStylesForMultiline:
|
1408
|
-
- comma
|
1409
|
-
- consistent_comma
|
1410
|
-
- no_comma
|
1411
|
-
|
1412
|
-
Style/TrailingCommaInArrayLiteral:
|
1413
|
-
# If `comma`, the cop requires a comma after the last item in an array,
|
1414
|
-
# but only when each item is on its own line.
|
1415
|
-
# If `consistent_comma`, the cop requires a comma after the last item of all
|
1416
|
-
# non-empty array literals.
|
1417
|
-
EnforcedStyleForMultiline: no_comma
|
1418
|
-
SupportedStylesForMultiline:
|
1419
|
-
- comma
|
1420
|
-
- consistent_comma
|
1421
|
-
- no_comma
|
1422
|
-
|
1423
|
-
Style/TrailingCommaInHashLiteral:
|
1424
|
-
# If `comma`, the cop requires a comma after the last item in a hash,
|
1425
|
-
# but only when each item is on its own line.
|
1426
|
-
# If `consistent_comma`, the cop requires a comma after the last item of all
|
1427
|
-
# non-empty hash literals.
|
1428
|
-
EnforcedStyleForMultiline: no_comma
|
1429
|
-
SupportedStylesForMultiline:
|
1430
|
-
- comma
|
1431
|
-
- consistent_comma
|
1432
|
-
- no_comma
|
1433
|
-
|
1434
|
-
# `TrivialAccessors` requires exact name matches and doesn't allow
|
1435
|
-
# predicated methods by default.
|
1436
|
-
Style/TrivialAccessors:
|
1437
|
-
# When set to `false` the cop will suggest the use of accessor methods
|
1438
|
-
# in situations like:
|
1439
|
-
#
|
1440
|
-
# def name
|
1441
|
-
# @other_name
|
1442
|
-
# end
|
1443
|
-
#
|
1444
|
-
# This way you can uncover "hidden" attributes in your code.
|
1445
|
-
ExactNameMatch: true
|
1446
|
-
AllowPredicates: true
|
1447
|
-
# Allows trivial writers that don't end in an equal sign. e.g.
|
1448
|
-
#
|
1449
|
-
# def on_exception(action)
|
1450
|
-
# @on_exception=action
|
1451
|
-
# end
|
1452
|
-
# on_exception :restart
|
1453
|
-
#
|
1454
|
-
# Commonly used in DSLs
|
1455
|
-
AllowDSLWriters: false
|
1456
|
-
IgnoreClassMethods: false
|
1457
|
-
Whitelist:
|
1458
|
-
- to_ary
|
1459
|
-
- to_a
|
1460
|
-
- to_c
|
1461
|
-
- to_enum
|
1462
|
-
- to_h
|
1463
|
-
- to_hash
|
1464
|
-
- to_i
|
1465
|
-
- to_int
|
1466
|
-
- to_io
|
1467
|
-
- to_open
|
1468
|
-
- to_path
|
1469
|
-
- to_proc
|
1470
|
-
- to_r
|
1471
|
-
- to_regexp
|
1472
|
-
- to_str
|
1473
|
-
- to_s
|
1474
|
-
- to_sym
|
1475
|
-
|
1476
|
-
# `WordArray` enforces how array literals of word-like strings should be expressed.
|
1477
|
-
Style/WordArray:
|
1478
|
-
EnforcedStyle: percent
|
1479
|
-
SupportedStyles:
|
1480
|
-
# percent style: %w(word1 word2)
|
1481
|
-
- percent
|
1482
|
-
# bracket style: ['word1', 'word2']
|
1483
|
-
- brackets
|
1484
|
-
# The `MinSize` option causes the `WordArray` rule to be ignored for arrays
|
1485
|
-
# smaller than a certain size. The rule is only applied to arrays
|
1486
|
-
# whose element count is greater than or equal to `MinSize`.
|
1487
|
-
MinSize: 0
|
1488
|
-
# The regular expression `WordRegex` decides what is considered a word.
|
1489
|
-
WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
|
1490
|
-
|
1491
|
-
Style/YodaCondition:
|
1492
|
-
EnforcedStyle: all_comparison_operators
|
1493
|
-
SupportedStyles:
|
1494
|
-
# check all comparison operators
|
1495
|
-
- all_comparison_operators
|
1496
|
-
# check only equality operators: `!=` and `==`
|
1497
|
-
- equality_operators_only
|
1498
|
-
|
1499
|
-
#################### Metrics ###############################
|
1500
|
-
|
1501
|
-
Metrics/AbcSize:
|
1502
|
-
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
1503
|
-
# a Float.
|
1504
|
-
Max: 15
|
1505
|
-
|
1506
|
-
Metrics/BlockLength:
|
1507
|
-
CountComments: false # count full line comments?
|
1508
|
-
Max: 25
|
1509
|
-
ExcludedMethods: []
|
1510
|
-
|
1511
|
-
Metrics/BlockNesting:
|
1512
|
-
CountBlocks: false
|
1513
|
-
Max: 3
|
1514
|
-
|
1515
|
-
Metrics/ClassLength:
|
1516
|
-
CountComments: false # count full line comments?
|
1517
|
-
Max: 100
|
1518
|
-
|
1519
|
-
# Avoid complex methods.
|
1520
|
-
Metrics/CyclomaticComplexity:
|
1521
|
-
Max: 6
|
1522
|
-
|
1523
|
-
Metrics/LineLength:
|
1524
|
-
Max: 80
|
1525
|
-
# To make it possible to copy or click on URIs in the code, we allow lines
|
1526
|
-
# containing a URI to be longer than Max.
|
1527
|
-
AllowHeredoc: true
|
1528
|
-
AllowURI: true
|
1529
|
-
URISchemes:
|
1530
|
-
- http
|
1531
|
-
- https
|
1532
|
-
# The IgnoreCopDirectives option causes the LineLength rule to ignore cop
|
1533
|
-
# directives like '# rubocop: enable ...' when calculating a line's length.
|
1534
|
-
IgnoreCopDirectives: false
|
1535
|
-
# The IgnoredPatterns option is a list of !ruby/regexp and/or string
|
1536
|
-
# elements. Strings will be converted to Regexp objects. A line that matches
|
1537
|
-
# any regular expression listed in this option will be ignored by LineLength.
|
1538
|
-
IgnoredPatterns: []
|
1539
|
-
|
1540
|
-
Metrics/MethodLength:
|
1541
|
-
CountComments: false # count full line comments?
|
1542
|
-
Max: 10
|
1543
|
-
|
1544
|
-
Metrics/ModuleLength:
|
1545
|
-
CountComments: false # count full line comments?
|
1546
|
-
Max: 100
|
1547
|
-
|
1548
|
-
Metrics/ParameterLists:
|
1549
|
-
Max: 5
|
1550
|
-
CountKeywordArgs: true
|
1551
|
-
|
1552
|
-
Metrics/PerceivedComplexity:
|
1553
|
-
Max: 7
|
1554
|
-
|
1555
|
-
#################### Lint ##################################
|
1556
|
-
|
1557
|
-
# Allow safe assignment in conditions.
|
1558
|
-
Lint/AssignmentInCondition:
|
1559
|
-
AllowSafeAssignment: true
|
1560
|
-
|
1561
|
-
Lint/InheritException:
|
1562
|
-
# The default base class in favour of `Exception`.
|
1563
|
-
EnforcedStyle: runtime_error
|
1564
|
-
SupportedStyles:
|
1565
|
-
- runtime_error
|
1566
|
-
- standard_error
|
1567
|
-
|
1568
|
-
Lint/MissingCopEnableDirective:
|
1569
|
-
# Maximum number of consecutive lines the cop can be disabled for.
|
1570
|
-
# 0 allows only single-line disables
|
1571
|
-
# 1 would mean the maximum allowed is the following:
|
1572
|
-
# # rubocop:disable SomeCop
|
1573
|
-
# a = 1
|
1574
|
-
# # rubocop:enable SomeCop
|
1575
|
-
# .inf for any size
|
1576
|
-
MaximumRangeSize: .inf
|
1577
|
-
|
1578
|
-
Lint/SafeNavigationChain:
|
1579
|
-
Whitelist:
|
1580
|
-
- present?
|
1581
|
-
- blank?
|
1582
|
-
- presence
|
1583
|
-
- try
|
1584
|
-
|
1585
|
-
# Checks for shadowed arguments
|
1586
|
-
Lint/ShadowedArgument:
|
1587
|
-
IgnoreImplicitReferences: false
|
1588
|
-
|
1589
|
-
# Checks for unused block arguments
|
1590
|
-
Lint/UnusedBlockArgument:
|
1591
|
-
IgnoreEmptyBlocks: true
|
1592
|
-
AllowUnusedKeywordArguments: false
|
1593
|
-
|
1594
|
-
# Checks for unused method arguments.
|
1595
|
-
Lint/UnusedMethodArgument:
|
1596
|
-
AllowUnusedKeywordArguments: false
|
1597
|
-
IgnoreEmptyMethods: true
|
1598
|
-
|
1599
|
-
Lint/Void:
|
1600
|
-
CheckForMethodsWithNoSideEffects: false
|
1601
|
-
|
1602
|
-
#################### Performance ###########################
|
1603
|
-
|
1604
|
-
Performance/DoubleStartEndWith:
|
1605
|
-
# Used to check for `starts_with?` and `ends_with?`.
|
1606
|
-
# These methods are defined by `ActiveSupport`.
|
1607
|
-
IncludeActiveSupportAliases: false
|
1608
|
-
|
1609
|
-
Performance/RedundantMerge:
|
1610
|
-
# Max number of key-value pairs to consider an offense
|
1611
|
-
MaxKeyValuePairs: 2
|
1612
|
-
|
1613
|
-
#################### Rails #################################
|
1614
|
-
|
1615
|
-
Rails/ActionFilter:
|
1616
|
-
EnforcedStyle: action
|
1617
|
-
SupportedStyles:
|
1618
|
-
- action
|
1619
|
-
- filter
|
1620
|
-
Include:
|
1621
|
-
- app/controllers/**/*.rb
|
1622
|
-
|
1623
|
-
Rails/CreateTableWithTimestamps:
|
1624
|
-
Include:
|
1625
|
-
- db/migrate/*.rb
|
1626
|
-
|
1627
|
-
Rails/Date:
|
1628
|
-
# The value `strict` disallows usage of `Date.today`, `Date.current`,
|
1629
|
-
# `Date#to_time` etc.
|
1630
|
-
# The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
|
1631
|
-
# (but not `Date.today`) which are overridden by ActiveSupport to handle current
|
1632
|
-
# time zone.
|
1633
|
-
EnforcedStyle: flexible
|
1634
|
-
SupportedStyles:
|
1635
|
-
- strict
|
1636
|
-
- flexible
|
1637
|
-
|
1638
|
-
Rails/Delegate:
|
1639
|
-
# When set to true, using the target object as a prefix of the
|
1640
|
-
# method name without using the `delegate` method will be a
|
1641
|
-
# violation. When set to false, this case is legal.
|
1642
|
-
EnforceForPrefixed: true
|
1643
|
-
|
1644
|
-
Rails/DynamicFindBy:
|
1645
|
-
Whitelist:
|
1646
|
-
- find_by_sql
|
1647
|
-
|
1648
|
-
Rails/EnumUniqueness:
|
1649
|
-
Include:
|
1650
|
-
- app/models/**/*.rb
|
1651
|
-
|
1652
|
-
Rails/Exit:
|
1653
|
-
Include:
|
1654
|
-
- app/**/*.rb
|
1655
|
-
- config/**/*.rb
|
1656
|
-
- lib/**/*.rb
|
1657
|
-
Exclude:
|
1658
|
-
- lib/**/*.rake
|
1659
|
-
|
1660
|
-
Rails/FindBy:
|
1661
|
-
Include:
|
1662
|
-
- app/models/**/*.rb
|
1663
|
-
|
1664
|
-
Rails/FindEach:
|
1665
|
-
Include:
|
1666
|
-
- app/models/**/*.rb
|
1667
|
-
|
1668
|
-
Rails/HasAndBelongsToMany:
|
1669
|
-
Include:
|
1670
|
-
- app/models/**/*.rb
|
1671
|
-
|
1672
|
-
Rails/HasManyOrHasOneDependent:
|
1673
|
-
Include:
|
1674
|
-
- app/models/**/*.rb
|
1675
|
-
|
1676
|
-
Rails/HttpStatus:
|
1677
|
-
EnforcedStyle: symbolic
|
1678
|
-
SupportedStyles:
|
1679
|
-
- numeric
|
1680
|
-
- symbolic
|
1681
|
-
|
1682
|
-
Rails/InverseOf:
|
1683
|
-
Include:
|
1684
|
-
- app/models/**/*.rb
|
1685
|
-
|
1686
|
-
Rails/LexicallyScopedActionFilter:
|
1687
|
-
Include:
|
1688
|
-
- app/controllers/**/*.rb
|
1689
|
-
|
1690
|
-
Rails/NotNullColumn:
|
1691
|
-
Include:
|
1692
|
-
- db/migrate/*.rb
|
1693
|
-
|
1694
|
-
Rails/Output:
|
1695
|
-
Include:
|
1696
|
-
- app/**/*.rb
|
1697
|
-
- config/**/*.rb
|
1698
|
-
- db/**/*.rb
|
1699
|
-
- lib/**/*.rb
|
1700
|
-
|
1701
|
-
Rails/ReadWriteAttribute:
|
1702
|
-
Include:
|
1703
|
-
- app/models/**/*.rb
|
1704
|
-
|
1705
|
-
Rails/RequestReferer:
|
1706
|
-
EnforcedStyle: referer
|
1707
|
-
SupportedStyles:
|
1708
|
-
- referer
|
1709
|
-
- referrer
|
1710
|
-
|
1711
|
-
Rails/ReversibleMigration:
|
1712
|
-
Include:
|
1713
|
-
- db/migrate/*.rb
|
1714
|
-
|
1715
|
-
Rails/SafeNavigation:
|
1716
|
-
# This will convert usages of `try` to use safe navigation as well as `try!`.
|
1717
|
-
# `try` and `try!` work slightly differently. `try!` and safe navigation will
|
1718
|
-
# both raise a `NoMethodError` if the receiver of the method call does not
|
1719
|
-
# implement the intended method. `try` will not raise an exception for this.
|
1720
|
-
ConvertTry: false
|
1721
|
-
|
1722
|
-
Rails/ScopeArgs:
|
1723
|
-
Include:
|
1724
|
-
- app/models/**/*.rb
|
1725
|
-
|
1726
|
-
Rails/TimeZone:
|
1727
|
-
# The value `strict` means that `Time` should be used with `zone`.
|
1728
|
-
# The value `flexible` allows usage of `in_time_zone` instead of `zone`.
|
1729
|
-
EnforcedStyle: flexible
|
1730
|
-
SupportedStyles:
|
1731
|
-
- strict
|
1732
|
-
- flexible
|
1733
|
-
|
1734
|
-
Rails/UniqBeforePluck:
|
1735
|
-
EnforcedStyle: conservative
|
1736
|
-
SupportedStyles:
|
1737
|
-
- conservative
|
1738
|
-
- aggressive
|
1739
|
-
AutoCorrect: false
|
1740
|
-
|
1741
|
-
Rails/UnknownEnv:
|
1742
|
-
Environments:
|
1743
|
-
- development
|
1744
|
-
- test
|
1745
|
-
- production
|
1746
|
-
|
1747
|
-
Rails/SkipsModelValidations:
|
1748
|
-
Blacklist:
|
1749
|
-
- decrement!
|
1750
|
-
- decrement_counter
|
1751
|
-
- increment!
|
1752
|
-
- increment_counter
|
1753
|
-
- toggle!
|
1754
|
-
- touch
|
1755
|
-
- update_all
|
1756
|
-
- update_attribute
|
1757
|
-
- update_column
|
1758
|
-
- update_columns
|
1759
|
-
- update_counters
|
1760
|
-
|
1761
|
-
Rails/Validation:
|
1762
|
-
Include:
|
1763
|
-
- app/models/**/*.rb
|
1764
|
-
|
1765
|
-
Bundler/OrderedGems:
|
1766
|
-
TreatCommentsAsGroupSeparators: true
|
1767
|
-
|
1768
|
-
Gemspec/OrderedDependencies:
|
1769
|
-
TreatCommentsAsGroupSeparators: true
|