revit 0.10.9

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 965aed2aa7979c6d826615de4e8b132b0950af49
4
+ data.tar.gz: 25fdd12e33796b2fe820cd0c3ea4f100156425f6
5
+ SHA512:
6
+ metadata.gz: 65e85d5cc8961e3905f7d1355b894722ec8342723797cb98e98240fdd1b1a9c4fa6bd3788bade3cb8dec3dd162a468b0ca10f2a8bd46705454f98a3fa703e29e
7
+ data.tar.gz: 4bb877886d91a43db1517ac5111e665b146fa166301c226d6bdbac2f0a1f22a5b4a3933dd579f9fd13290cf060a250ecac0538852a117d673b75b95fbdad0547
@@ -0,0 +1,17 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ fixme:
9
+ enabled: true
10
+ rubocop:
11
+ enabled: true
12
+ ratings:
13
+ paths:
14
+ - "lib/"
15
+ exclude_paths:
16
+ - .rubocop.yml
17
+ - spec/
data/.gemrc ADDED
@@ -0,0 +1 @@
1
+ gem: --no-document
@@ -0,0 +1,15 @@
1
+ *.sublime-workspace
2
+ .bundle/
3
+ _yardoc/
4
+ coverage/
5
+ doc/
6
+ pkg/
7
+ spec/reports/
8
+ tmp/
9
+ vendor/
10
+ spec/spec_resources/repo
11
+ spec/spec_resources/repo_2
12
+ .yardoc
13
+ Gemfile.lock
14
+ *.sublime-workspace
15
+ *-*.gem
@@ -0,0 +1,1151 @@
1
+ AllCops:
2
+ # Include common Ruby source files.
3
+ Include:
4
+ - '**/*.gemspec'
5
+ - '**/*.rake'
6
+ - '**/Gemfile'
7
+ - '**/Rakefile'
8
+ - '**/Thorfile'
9
+ Exclude:
10
+ - 'vendor/**/*'
11
+ - 'spec/spec_resources/**/*'
12
+ # Default formatter will be used if no -f/--format option is given.
13
+ DefaultFormatter: progress
14
+ # Cop names are not displayed in offense messages by default. Change behavior
15
+ # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
16
+ # option.
17
+ DisplayCopNames: false
18
+ # Style guide URLs are not displayed in offense messages by default. Change
19
+ # behavior by overriding DisplayStyleGuide, or by giving the
20
+ # -S/--display-style-guide option.
21
+ DisplayStyleGuide: false
22
+ # Extra details are not displayed in offense messages by default. Change
23
+ # behavior by overriding ExtraDetails, or by giving the
24
+ # -E/--extra-details option.
25
+ ExtraDetails: true
26
+ # Additional cops that do not reference a style guide rule may be enabled by
27
+ # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
28
+ # the --only-guide-cops option.
29
+ StyleGuideCopsOnly: false
30
+ # All cops except the ones in disabled.yml are enabled by default. Change
31
+ # this behavior by overriding DisabledByDefault. When DisabledByDefault is
32
+ # true, all cops in the default configuration are disabled, and and only cops
33
+ # in user configuration are enabled. This makes cops opt-in instead of
34
+ # opt-out. Note that when DisabledByDefault is true, cops in user
35
+ # configuration will be enabled even if they don't set the Enabled parameter.
36
+ DisabledByDefault: false
37
+ # Enables the result cache if true. Can be overridden by the --cache command
38
+ # line option.
39
+ UseCache: true
40
+ # Threshold for how many files can be stored in the result cache before some
41
+ # of the files are automatically removed.
42
+ MaxFilesInCache: 20000
43
+ # The cache will be stored in "rubocop_cache" under this directory. The name
44
+ # "/tmp" is special and will be converted to the system temporary directory,
45
+ # which is "/tmp" on Unix-like systems, but could be something else on other
46
+ # systems.
47
+ CacheRootDirectory: /tmp
48
+ # The default cache root directory is /tmp, which on most systems is
49
+ # writable by any system user. This means that it is possible for a
50
+ # malicious user to anticipate the location of Rubocop's cache directory,
51
+ # and create a symlink in its place that could cause Rubocop to overwrite
52
+ # unintended files, or read malicious input. If you are certain that your
53
+ # cache location is secure from this kind of attack, and wish to use a
54
+ # symlinked cache location, set this value to "true".
55
+ AllowSymlinksInCacheRootDirectory: false
56
+ # What MRI version of the Ruby interpreter is the inspected code intended to
57
+ # run on? (If there is more than one, set this to the lowest version.)
58
+ # If a value is specified for TargetRubyVersion then it is used.
59
+ # Else if .ruby-version exists and it contains an MRI version it is used.
60
+ # Otherwise we fallback to the oldest officially supported Ruby version (2.0).
61
+ TargetRubyVersion: 2.3
62
+
63
+ # Indent private/protected/public as deep as method definitions
64
+ Layout/AccessModifierIndentation:
65
+ EnforcedStyle: indent
66
+ SupportedStyles:
67
+ - outdent
68
+ - indent
69
+ # By default, the indentation width from Style/IndentationWidth is used
70
+ # But it can be overridden by setting this parameter
71
+ IndentationWidth: ~
72
+
73
+ Style/Alias:
74
+ EnforcedStyle: prefer_alias
75
+ SupportedStyles:
76
+ - prefer_alias
77
+ - prefer_alias_method
78
+
79
+ # Align the elements of a hash literal if they span more than one line.
80
+ Layout/AlignHash:
81
+ # Alignment of entries using hash rocket as separator. Valid values are:
82
+ #
83
+ # key - left alignment of keys
84
+ # 'a' => 2
85
+ # 'bb' => 3
86
+ # separator - alignment of hash rockets, keys are right aligned
87
+ # 'a' => 2
88
+ # 'bb' => 3
89
+ # table - left alignment of keys, hash rockets, and values
90
+ # 'a' => 2
91
+ # 'bb' => 3
92
+ EnforcedHashRocketStyle: key
93
+ # Alignment of entries using colon as separator. Valid values are:
94
+ #
95
+ # key - left alignment of keys
96
+ # a: 0
97
+ # bb: 1
98
+ # separator - alignment of colons, keys are right aligned
99
+ # a: 0
100
+ # bb: 1
101
+ # table - left alignment of keys and values
102
+ # a: 0
103
+ # bb: 1
104
+ EnforcedColonStyle: key
105
+ # Select whether hashes that are the last argument in a method call should be
106
+ # inspected? Valid values are:
107
+ #
108
+ # always_inspect - Inspect both implicit and explicit hashes.
109
+ # Registers an offense for:
110
+ # function(a: 1,
111
+ # b: 2)
112
+ # Registers an offense for:
113
+ # function({a: 1,
114
+ # b: 2})
115
+ # always_ignore - Ignore both implicit and explicit hashes.
116
+ # Accepts:
117
+ # function(a: 1,
118
+ # b: 2)
119
+ # Accepts:
120
+ # function({a: 1,
121
+ # b: 2})
122
+ # ignore_implicit - Ignore only implicit hashes.
123
+ # Accepts:
124
+ # function(a: 1,
125
+ # b: 2)
126
+ # Registers an offense for:
127
+ # function({a: 1,
128
+ # b: 2})
129
+ # ignore_explicit - Ignore only explicit hashes.
130
+ # Accepts:
131
+ # function({a: 1,
132
+ # b: 2})
133
+ # Registers an offense for:
134
+ # function(a: 1,
135
+ # b: 2)
136
+ EnforcedLastArgumentHashStyle: always_inspect
137
+ SupportedLastArgumentHashStyles:
138
+ - always_inspect
139
+ - always_ignore
140
+ - ignore_implicit
141
+ - ignore_explicit
142
+
143
+ Layout/AlignParameters:
144
+ # Alignment of parameters in multi-line method calls.
145
+ #
146
+ # The `with_first_parameter` style aligns the following lines along the same
147
+ # column as the first parameter.
148
+ #
149
+ # method_call(a,
150
+ # b)
151
+ #
152
+ # The `with_fixed_indentation` style aligns the following lines with one
153
+ # level of indentation relative to the start of the line with the method call.
154
+ #
155
+ # method_call(a,
156
+ # b)
157
+ EnforcedStyle: with_first_parameter
158
+ SupportedStyles:
159
+ - with_first_parameter
160
+ - with_fixed_indentation
161
+ # By default, the indentation width from Style/IndentationWidth is used
162
+ # But it can be overridden by setting this parameter
163
+ IndentationWidth: ~
164
+
165
+ Style/AndOr:
166
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
167
+ # or completely (always).
168
+ EnforcedStyle: always
169
+ SupportedStyles:
170
+ - always
171
+ - conditionals
172
+
173
+
174
+ # Checks if usage of %() or %Q() matches configuration.
175
+ Style/BarePercentLiterals:
176
+ EnforcedStyle: bare_percent
177
+ SupportedStyles:
178
+ - percent_q
179
+ - bare_percent
180
+
181
+ Style/BlockDelimiters:
182
+ EnforcedStyle: line_count_based
183
+ SupportedStyles:
184
+ # The `line_count_based` style enforces braces around single line blocks and
185
+ # do..end around multi-line blocks.
186
+ - line_count_based
187
+ # The `semantic` style enforces braces around functional blocks, where the
188
+ # primary purpose of the block is to return a value and do..end for
189
+ # procedural blocks, where the primary purpose of the block is its
190
+ # side-effects.
191
+ #
192
+ # This looks at the usage of a block's method to determine its type (e.g. is
193
+ # the result of a `map` assigned to a variable or passed to another
194
+ # method) but exceptions are permitted in the `ProceduralMethods`,
195
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
196
+ - semantic
197
+ # The `braces_for_chaining` style enforces braces around single line blocks
198
+ # and do..end around multi-line blocks, except for multi-line blocks whose
199
+ # return value is being chained with another method (in which case braces
200
+ # are enforced).
201
+ - braces_for_chaining
202
+ ProceduralMethods:
203
+ # Methods that are known to be procedural in nature but look functional from
204
+ # their usage, e.g.
205
+ #
206
+ # time = Benchmark.realtime do
207
+ # foo.bar
208
+ # end
209
+ #
210
+ # Here, the return value of the block is discarded but the return value of
211
+ # `Benchmark.realtime` is used.
212
+ - benchmark
213
+ - bm
214
+ - bmbm
215
+ - create
216
+ - each_with_object
217
+ - measure
218
+ - new
219
+ - realtime
220
+ - tap
221
+ - with_object
222
+ FunctionalMethods:
223
+ # Methods that are known to be functional in nature but look procedural from
224
+ # their usage, e.g.
225
+ #
226
+ # let(:foo) { Foo.new }
227
+ #
228
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
229
+ # doesn't appear to be used from the return value of `let`.
230
+ - let
231
+ - let!
232
+ - subject
233
+ - watch
234
+ IgnoredMethods:
235
+ # Methods that can be either procedural or functional and cannot be
236
+ # categorised from their usage alone, e.g.
237
+ #
238
+ # foo = lambda do |x|
239
+ # puts "Hello, #{x}"
240
+ # end
241
+ #
242
+ # foo = lambda do |x|
243
+ # x * 100
244
+ # end
245
+ #
246
+ # Here, it is impossible to tell from the return value of `lambda` whether
247
+ # the inner block's return value is significant.
248
+ - lambda
249
+ - proc
250
+ - it
251
+
252
+ Style/BracesAroundHashParameters:
253
+ EnforcedStyle: no_braces
254
+ SupportedStyles:
255
+ # The `braces` style enforces braces around all method parameters that are
256
+ # hashes.
257
+ - braces
258
+ # The `no_braces` style checks that the last parameter doesn't have braces
259
+ # around it.
260
+ - no_braces
261
+ # The `context_dependent` style checks that the last parameter doesn't have
262
+ # braces around it, but requires braces if the second to last parameter is
263
+ # also a hash literal.
264
+ - context_dependent
265
+
266
+ # Indentation of `when`.
267
+ Layout/CaseIndentation:
268
+ EnforcedStyle: case
269
+ SupportedStyles:
270
+ - case
271
+ - end
272
+ IndentOneStep: false
273
+ # By default, the indentation width from Style/IndentationWidth is used
274
+ # But it can be overridden by setting this parameter
275
+ # This only matters if IndentOneStep is true
276
+ IndentationWidth: ~
277
+
278
+ Style/ClassAndModuleChildren:
279
+ # Checks the style of children definitions at classes and modules.
280
+ #
281
+ # Basically there are two different styles:
282
+ #
283
+ # `nested` - have each child on a separate line
284
+ # class Foo
285
+ # class Bar
286
+ # end
287
+ # end
288
+ #
289
+ # `compact` - combine definitions as much as possible
290
+ # class Foo::Bar
291
+ # end
292
+ #
293
+ # The compact style is only forced, for classes / modules with one child.
294
+ EnforcedStyle: nested
295
+ SupportedStyles:
296
+ - nested
297
+ - compact
298
+
299
+ Style/ClassCheck:
300
+ EnforcedStyle: is_a?
301
+ SupportedStyles:
302
+ - is_a?
303
+ - kind_of?
304
+
305
+ # Align with the style guide.
306
+ Style/CollectionMethods:
307
+ # Mapping from undesired method to desired_method
308
+ # e.g. to use `detect` over `find`:
309
+ #
310
+ # CollectionMethods:
311
+ # PreferredMethods:
312
+ # find: detect
313
+ PreferredMethods:
314
+ collect: 'map'
315
+ collect!: 'map!'
316
+ inject: 'reduce'
317
+ detect: 'find'
318
+ find_all: 'select'
319
+
320
+ # Use ` or %x around command literals.
321
+ Style/CommandLiteral:
322
+ EnforcedStyle: backticks
323
+ # backticks: Always use backticks.
324
+ # percent_x: Always use %x.
325
+ # mixed: Use backticks on single-line commands, and %x on multi-line commands.
326
+ SupportedStyles:
327
+ - backticks
328
+ - percent_x
329
+ - mixed
330
+ # If false, the cop will always recommend using %x if one or more backticks
331
+ # are found in the command string.
332
+ AllowInnerBackticks: false
333
+
334
+ # Checks formatting of special comments
335
+ Style/CommentAnnotation:
336
+ Keywords:
337
+ - TODO
338
+ - FIXME
339
+ - OPTIMIZE
340
+ - HACK
341
+ - REVIEW
342
+
343
+ Style/ConditionalAssignment:
344
+ EnforcedStyle: assign_to_condition
345
+ SupportedStyles:
346
+ - assign_to_condition
347
+ - assign_inside_condition
348
+ # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
349
+ # will only register an offense when all branches of a condition are
350
+ # a single line.
351
+ # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
352
+ # will only register an offense for assignment to a condition that has
353
+ # at least one multiline branch.
354
+ SingleLineConditionsOnly: true
355
+
356
+ # Checks that you have put a copyright in a comment before any code.
357
+ #
358
+ # You can override the default Notice in your .rubocop.yml file.
359
+ #
360
+ # In order to use autocorrect, you must supply a value for the
361
+ # AutocorrectNotice key that matches the regexp Notice. A blank
362
+ # AutocorrectNotice will cause an error during autocorrect.
363
+ #
364
+ # Autocorrect will add a copyright notice in a comment at the top
365
+ # of the file immediately after any shebang or encoding comments.
366
+ #
367
+ # Example rubocop.yml:
368
+ #
369
+ # Style/Copyright:
370
+ # Enabled: true
371
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
372
+ # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
373
+ #
374
+ Style/Copyright:
375
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
376
+ AutocorrectNotice: ''
377
+
378
+ Style/DocumentationMethod:
379
+ RequireForNonPublicMethods: false
380
+
381
+ # Multi-line method chaining should be done with leading dots.
382
+ Layout/DotPosition:
383
+ EnforcedStyle: leading
384
+ SupportedStyles:
385
+ - leading
386
+ - trailing
387
+
388
+ # Warn on empty else statements
389
+ # empty - warn only on empty else
390
+ # nil - warn on else with nil in it
391
+ # both - warn on empty else and else with nil in it
392
+ Style/EmptyElse:
393
+ EnforcedStyle: both
394
+ SupportedStyles:
395
+ - empty
396
+ - nil
397
+ - both
398
+
399
+ # Use empty lines between defs.
400
+ Layout/EmptyLineBetweenDefs:
401
+ # If true, this parameter means that single line method definitions don't
402
+ # need an empty line between them.
403
+ AllowAdjacentOneLineDefs: false
404
+
405
+ Layout/EmptyLinesAroundBlockBody:
406
+ EnforcedStyle: no_empty_lines
407
+ SupportedStyles:
408
+ - empty_lines
409
+ - no_empty_lines
410
+
411
+ Layout/EmptyLinesAroundClassBody:
412
+ EnforcedStyle: no_empty_lines
413
+ SupportedStyles:
414
+ - empty_lines
415
+ - no_empty_lines
416
+
417
+ Layout/EmptyLinesAroundModuleBody:
418
+ EnforcedStyle: no_empty_lines
419
+ SupportedStyles:
420
+ - empty_lines
421
+ - no_empty_lines
422
+
423
+ Layout/ExtraSpacing:
424
+ # When true, allows most uses of extra spacing if the intent is to align
425
+ # things with the previous or next line, not counting empty lines or comment
426
+ # lines.
427
+ AllowForAlignment: true
428
+ # When true, forces the alignment of = in assignments on consecutive lines.
429
+ ForceEqualSignAlignment: false
430
+
431
+ Naming/FileName:
432
+ # File names listed in AllCops:Include are excluded by default. Add extra
433
+ # excludes here.
434
+ Exclude: []
435
+ # When true, requires that each source file should define a class or module
436
+ # with a name which matches the file name (converted to ... case).
437
+ # It further expects it to be nested inside modules which match the names
438
+ # of subdirectories in its path.
439
+ ExpectMatchingDefinition: false
440
+ # If non-nil, expect all source file names to match the following regex.
441
+ # Only the file name itself is matched, not the entire file path.
442
+ # Use anchors as necessary if you want to match the entire name rather than
443
+ # just a part of it.
444
+ Regex: ~
445
+ # With `IgnoreExecutableScripts` set to `true`, this cop does not
446
+ # report offending filenames for executable scripts (i.e. source
447
+ # files with a shebang in the first line).
448
+ IgnoreExecutableScripts: true
449
+
450
+ Layout/FirstParameterIndentation:
451
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
452
+ SupportedStyles:
453
+ # The first parameter should always be indented one step more than the
454
+ # preceding line.
455
+ - consistent
456
+ # The first parameter should normally be indented one step more than the
457
+ # preceding line, but if it's a parameter for a method call that is itself
458
+ # a parameter in a method call, then the inner parameter should be indented
459
+ # relative to the inner method.
460
+ - special_for_inner_method_call
461
+ # Same as special_for_inner_method_call except that the special rule only
462
+ # applies if the outer method call encloses its arguments in parentheses.
463
+ - special_for_inner_method_call_in_parentheses
464
+ # By default, the indentation width from Style/IndentationWidth is used
465
+ # But it can be overridden by setting this parameter
466
+ IndentationWidth: ~
467
+
468
+ # Checks use of for or each in multiline loops.
469
+ Style/For:
470
+ EnforcedStyle: each
471
+ SupportedStyles:
472
+ - for
473
+ - each
474
+
475
+ # Enforce the method used for string formatting.
476
+ Style/FormatString:
477
+ EnforcedStyle: format
478
+ SupportedStyles:
479
+ - format
480
+ - sprintf
481
+ - percent
482
+
483
+ Style/FrozenStringLiteralComment:
484
+ Enabled: false
485
+
486
+ # Built-in global variables are allowed by default.
487
+ Style/GlobalVars:
488
+ AllowedVariables: []
489
+
490
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
491
+ # needs to have to trigger this cop
492
+ Style/GuardClause:
493
+ MinBodyLength: 1
494
+
495
+ Style/HashSyntax:
496
+ EnforcedStyle: ruby19
497
+ SupportedStyles:
498
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
499
+ - ruby19
500
+ # checks for hash rocket syntax for all hashes
501
+ - hash_rockets
502
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
503
+ - no_mixed_keys
504
+ # enforces both ruby19 and no_mixed_keys styles
505
+ - ruby19_no_mixed_keys
506
+ # Force hashes that have a symbol value to use hash rockets
507
+ UseHashRocketsWithSymbolValues: false
508
+ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
509
+ PreferHashRocketsForNonAlnumEndingSymbols: false
510
+
511
+ Layout/IndentationConsistency:
512
+ # The difference between `rails` and `normal` is that the `rails` style
513
+ # prescribes that in classes and modules the `protected` and `private`
514
+ # modifier keywords shall be indented the same as public methods and that
515
+ # protected and private members shall be indented one step more than the
516
+ # modifiers. Other than that, both styles mean that entities on the same
517
+ # logical depth shall have the same indentation.
518
+ EnforcedStyle: normal
519
+ SupportedStyles:
520
+ - normal
521
+ - rails
522
+
523
+ Layout/IndentationWidth:
524
+ # Number of spaces for each indentation level.
525
+ Width: 2
526
+
527
+ # Checks the indentation of the first element in an array literal.
528
+ Layout/IndentArray:
529
+ # The value `special_inside_parentheses` means that array literals with
530
+ # brackets that have their opening bracket on the same line as a surrounding
531
+ # opening round parenthesis, shall have their first element indented relative
532
+ # to the first position inside the parenthesis.
533
+ #
534
+ # The value `consistent` means that the indentation of the first element shall
535
+ # always be relative to the first position of the line where the opening
536
+ # bracket is.
537
+ #
538
+ # The value `align_brackets` means that the indentation of the first element
539
+ # shall always be relative to the position of the opening bracket.
540
+ EnforcedStyle: special_inside_parentheses
541
+ SupportedStyles:
542
+ - special_inside_parentheses
543
+ - consistent
544
+ - align_brackets
545
+ # By default, the indentation width from Style/IndentationWidth is used
546
+ # But it can be overridden by setting this parameter
547
+ IndentationWidth: ~
548
+
549
+ # Checks the indentation of assignment RHS, when on a different line from LHS
550
+ Layout/IndentAssignment:
551
+ # By default, the indentation width from Style/IndentationWidth is used
552
+ # But it can be overridden by setting this parameter
553
+ IndentationWidth: ~
554
+
555
+ # Checks the indentation of the first key in a hash literal.
556
+ Layout/IndentHash:
557
+ # The value `special_inside_parentheses` means that hash literals with braces
558
+ # that have their opening brace on the same line as a surrounding opening
559
+ # round parenthesis, shall have their first key indented relative to the
560
+ # first position inside the parenthesis.
561
+ #
562
+ # The value `consistent` means that the indentation of the first key shall
563
+ # always be relative to the first position of the line where the opening
564
+ # brace is.
565
+ #
566
+ # The value `align_braces` means that the indentation of the first key shall
567
+ # always be relative to the position of the opening brace.
568
+ EnforcedStyle: special_inside_parentheses
569
+ SupportedStyles:
570
+ - special_inside_parentheses
571
+ - consistent
572
+ - align_braces
573
+ # By default, the indentation width from Style/IndentationWidth is used
574
+ # But it can be overridden by setting this parameter
575
+ IndentationWidth: ~
576
+
577
+ Style/Lambda:
578
+ EnforcedStyle: line_count_dependent
579
+ SupportedStyles:
580
+ - line_count_dependent
581
+ - lambda
582
+ - literal
583
+
584
+ Style/LambdaCall:
585
+ EnforcedStyle: call
586
+ SupportedStyles:
587
+ - call
588
+ - braces
589
+
590
+ Style/Next:
591
+ # With `always` all conditions at the end of an iteration needs to be
592
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
593
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
594
+ EnforcedStyle: skip_modifier_ifs
595
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
596
+ # needs to have to trigger this cop
597
+ MinBodyLength: 3
598
+ SupportedStyles:
599
+ - skip_modifier_ifs
600
+ - always
601
+
602
+ Style/NonNilCheck:
603
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
604
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
605
+ # **usually** OK, but might change behavior.
606
+ #
607
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
608
+ # offenses for `!x.nil?` and does no changes that might change behavior.
609
+ IncludeSemanticChanges: false
610
+
611
+ Style/NumericPredicate:
612
+ EnforcedStyle: predicate
613
+ SupportedStyles:
614
+ - predicate
615
+ - comparison
616
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
617
+ # false positives.
618
+ Exclude:
619
+ - 'spec/**/*'
620
+
621
+ Style/MethodDefParentheses:
622
+ EnforcedStyle: require_parentheses
623
+ SupportedStyles:
624
+ - require_parentheses
625
+ - require_no_parentheses
626
+ - require_no_parentheses_except_multiline
627
+
628
+ Naming/MethodName:
629
+ EnforcedStyle: snake_case
630
+ SupportedStyles:
631
+ - snake_case
632
+ - camelCase
633
+
634
+ Style/ModuleFunction:
635
+ EnforcedStyle: module_function
636
+ SupportedStyles:
637
+ - module_function
638
+ - extend_self
639
+
640
+ Layout/MultilineArrayBraceLayout:
641
+ EnforcedStyle: symmetrical
642
+ SupportedStyles:
643
+ # symmetrical: closing brace is positioned in same way as opening brace
644
+ # new_line: closing brace is always on a new line
645
+ # same_line: closing brace is always on the same line as last element
646
+ - symmetrical
647
+ - new_line
648
+ - same_line
649
+
650
+ Layout/MultilineAssignmentLayout:
651
+ # The types of assignments which are subject to this rule.
652
+ SupportedTypes:
653
+ - block
654
+ - case
655
+ - class
656
+ - if
657
+ - kwbegin
658
+ - module
659
+ EnforcedStyle: new_line
660
+ SupportedStyles:
661
+ # Ensures that the assignment operator and the rhs are on the same line for
662
+ # the set of supported types.
663
+ - same_line
664
+ # Ensures that the assignment operator and the rhs are on separate lines
665
+ # for the set of supported types.
666
+ - new_line
667
+
668
+ Layout/MultilineHashBraceLayout:
669
+ EnforcedStyle: symmetrical
670
+ SupportedStyles:
671
+ # symmetrical: closing brace is positioned in same way as opening brace
672
+ # new_line: closing brace is always on a new line
673
+ # same_line: closing brace is always on same line as last element
674
+ - symmetrical
675
+ - new_line
676
+ - same_line
677
+
678
+ Layout/MultilineMethodCallBraceLayout:
679
+ EnforcedStyle: symmetrical
680
+ SupportedStyles:
681
+ # symmetrical: closing brace is positioned in same way as opening brace
682
+ # new_line: closing brace is always on a new line
683
+ # same_line: closing brace is always on the same line as last argument
684
+ - symmetrical
685
+ - new_line
686
+ - same_line
687
+
688
+ Layout/MultilineMethodCallIndentation:
689
+ EnforcedStyle: aligned
690
+ SupportedStyles:
691
+ - aligned
692
+ - indented
693
+ - indented_relative_to_receiver
694
+ # By default, the indentation width from Style/IndentationWidth is used
695
+ # But it can be overridden by setting this parameter
696
+ IndentationWidth: ~
697
+
698
+ Layout/MultilineMethodDefinitionBraceLayout:
699
+ EnforcedStyle: symmetrical
700
+ SupportedStyles:
701
+ # symmetrical: closing brace is positioned in same way as opening brace
702
+ # new_line: closing brace is always on a new line
703
+ # same_line: closing brace is always on the same line as last parameter
704
+ - symmetrical
705
+ - new_line
706
+ - same_line
707
+
708
+ Layout/MultilineOperationIndentation:
709
+ EnforcedStyle: aligned
710
+ SupportedStyles:
711
+ - aligned
712
+ - indented
713
+ # By default, the indentation width from Style/IndentationWidth is used
714
+ # But it can be overridden by setting this parameter
715
+ IndentationWidth: ~
716
+
717
+ Style/NumericLiterals:
718
+ MinDigits: 5
719
+
720
+ Style/NumericLiteralPrefix:
721
+ EnforcedOctalStyle: zero_with_o
722
+ SupportedOctalStyles:
723
+ - zero_with_o
724
+ - zero_only
725
+
726
+ Style/OptionHash:
727
+ # A list of parameter names that will be flagged by this cop.
728
+ SuspiciousParamNames:
729
+ - options
730
+ - opts
731
+ - args
732
+ - params
733
+ - parameters
734
+
735
+ # Allow safe assignment in conditions.
736
+ Style/ParenthesesAroundCondition:
737
+ AllowSafeAssignment: true
738
+
739
+ Style/PercentLiteralDelimiters:
740
+ PreferredDelimiters:
741
+ '%': ()
742
+ '%i': ()
743
+ '%q': ()
744
+ '%Q': ()
745
+ '%r': '{}'
746
+ '%s': ()
747
+ '%w': ()
748
+ '%W': ()
749
+ '%x': ()
750
+
751
+ Style/PercentQLiterals:
752
+ EnforcedStyle: lower_case_q
753
+ SupportedStyles:
754
+ - lower_case_q # Use %q when possible, %Q when necessary
755
+ - upper_case_q # Always use %Q
756
+
757
+ Naming/PredicateName:
758
+ # Predicate name prefixes.
759
+ NamePrefix:
760
+ - is_
761
+ - has_
762
+ - have_
763
+ # Predicate name prefixes that should be removed.
764
+ NamePrefixBlacklist:
765
+ - is_
766
+ - has_
767
+ - have_
768
+ # Predicate names which, despite having a blacklisted prefix, or no ?,
769
+ # should still be accepted
770
+ NameWhitelist:
771
+ - is_a?
772
+ # Exclude Rspec specs because there is a strong convetion to write spec
773
+ # helpers in the form of `have_something` or `be_something`.
774
+ Exclude:
775
+ - 'spec/**/*'
776
+
777
+ Style/RaiseArgs:
778
+ EnforcedStyle: exploded
779
+ SupportedStyles:
780
+ - compact # raise Exception.new(msg)
781
+ - exploded # raise Exception, msg
782
+
783
+ Style/RedundantReturn:
784
+ # When true allows code like `return x, y`.
785
+ AllowMultipleReturnValues: false
786
+
787
+ # Use / or %r around regular expressions.
788
+ Style/RegexpLiteral:
789
+ EnforcedStyle: slashes
790
+ # slashes: Always use slashes.
791
+ # percent_r: Always use %r.
792
+ # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
793
+ SupportedStyles:
794
+ - slashes
795
+ - percent_r
796
+ - mixed
797
+ # If false, the cop will always recommend using %r if one or more slashes
798
+ # are found in the regexp string.
799
+ AllowInnerSlashes: false
800
+
801
+ Style/Semicolon:
802
+ # Allow ; to separate several expressions on the same line.
803
+ AllowAsExpressionSeparator: false
804
+
805
+ Style/SignalException:
806
+ EnforcedStyle: only_raise
807
+ SupportedStyles:
808
+ - only_raise
809
+ - only_fail
810
+ - semantic
811
+
812
+ Style/SingleLineBlockParams:
813
+ Methods:
814
+ - reduce:
815
+ - a
816
+ - e
817
+ - inject:
818
+ - a
819
+ - e
820
+
821
+ Style/SingleLineMethods:
822
+ AllowIfMethodIsEmpty: true
823
+
824
+ Layout/SpaceBeforeFirstArg:
825
+ # When true, allows most uses of extra spacing if the intent is to align
826
+ # things with the previous or next line, not counting empty lines or comment
827
+ # lines.
828
+ AllowForAlignment: true
829
+
830
+ Style/SpecialGlobalVars:
831
+ EnforcedStyle: use_english_names
832
+ SupportedStyles:
833
+ - use_perl_names
834
+ - use_english_names
835
+
836
+ Style/StabbyLambdaParentheses:
837
+ EnforcedStyle: require_parentheses
838
+ SupportedStyles:
839
+ - require_parentheses
840
+ - require_no_parentheses
841
+
842
+ Style/StringLiterals:
843
+ EnforcedStyle: single_quotes
844
+ SupportedStyles:
845
+ - single_quotes
846
+ - double_quotes
847
+ # If true, strings which span multiple lines using \ for continuation must
848
+ # use the same type of quotes on each line.
849
+ ConsistentQuotesInMultiline: false
850
+
851
+ Style/StringLiteralsInInterpolation:
852
+ EnforcedStyle: single_quotes
853
+ SupportedStyles:
854
+ - single_quotes
855
+ - double_quotes
856
+
857
+ Style/StringMethods:
858
+ # Mapping from undesired method to desired_method
859
+ # e.g. to use `to_sym` over `intern`:
860
+ #
861
+ # StringMethods:
862
+ # PreferredMethods:
863
+ # intern: to_sym
864
+ PreferredMethods:
865
+ intern: to_sym
866
+
867
+ Layout/SpaceAroundBlockParameters:
868
+ EnforcedStyleInsidePipes: no_space
869
+ SupportedStylesInsidePipes:
870
+ - space
871
+ - no_space
872
+
873
+ Layout/SpaceAroundEqualsInParameterDefault:
874
+ EnforcedStyle: space
875
+ SupportedStyles:
876
+ - space
877
+ - no_space
878
+
879
+ Layout/SpaceAroundOperators:
880
+ # When true, allows most uses of extra spacing if the intent is to align
881
+ # with an operator on the previous or next line, not counting empty lines
882
+ # or comment lines.
883
+ AllowForAlignment: true
884
+
885
+ Layout/SpaceBeforeBlockBraces:
886
+ EnforcedStyle: space
887
+ SupportedStyles:
888
+ - space
889
+ - no_space
890
+
891
+ Layout/SpaceInsideBlockBraces:
892
+ EnforcedStyle: space
893
+ SupportedStyles:
894
+ - space
895
+ - no_space
896
+ # Valid values are: space, no_space
897
+ EnforcedStyleForEmptyBraces: no_space
898
+ # Space between { and |. Overrides EnforcedStyle if there is a conflict.
899
+ SpaceBeforeBlockParameters: true
900
+
901
+ Layout/SpaceInsideHashLiteralBraces:
902
+ EnforcedStyle: space
903
+ EnforcedStyleForEmptyBraces: no_space
904
+ SupportedStyles:
905
+ - space
906
+ - no_space
907
+ # 'compact' normally requires a space inside hash braces, with the exception
908
+ # that successive left braces or right braces are collapsed together
909
+ - compact
910
+
911
+ Layout/SpaceInsideStringInterpolation:
912
+ EnforcedStyle: no_space
913
+ SupportedStyles:
914
+ - space
915
+ - no_space
916
+
917
+ Style/SymbolArray:
918
+ EnforcedStyle: percent
919
+ SupportedStyles:
920
+ - percent
921
+ - brackets
922
+
923
+ Style/SymbolProc:
924
+ # A list of method names to be ignored by the check.
925
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
926
+ IgnoredMethods:
927
+ - respond_to
928
+ - define_method
929
+ - assert_received
930
+
931
+ Style/TernaryParentheses:
932
+ EnforcedStyle: require_no_parentheses
933
+ SupportedStyles:
934
+ - require_parentheses
935
+ - require_no_parentheses
936
+ AllowSafeAssignment: true
937
+
938
+ Layout/TrailingBlankLines:
939
+ EnforcedStyle: final_newline
940
+ SupportedStyles:
941
+ - final_newline
942
+ - final_blank_line
943
+
944
+ Style/TrailingCommaInArguments:
945
+ # If `comma`, the cop requires a comma after the last argument, but only for
946
+ # parenthesized method calls where each argument is on its own line.
947
+ # If `consistent_comma`, the cop requires a comma after the last argument,
948
+ # for all parenthesized method calls with arguments.
949
+ EnforcedStyleForMultiline: no_comma
950
+ SupportedStylesForMultiline:
951
+ - comma
952
+ - consistent_comma
953
+ - no_comma
954
+
955
+ Style/TrailingCommaInLiteral:
956
+ # If `comma`, the cop requires a comma after the last item in an array or
957
+ # hash, but only when each item is on its own line.
958
+ # If `consistent_comma`, the cop requires a comma after the last item of all
959
+ # non-empty array and hash literals.
960
+ EnforcedStyleForMultiline: no_comma
961
+ SupportedStylesForMultiline:
962
+ - comma
963
+ - consistent_comma
964
+ - no_comma
965
+
966
+ # TrivialAccessors requires exact name matches and doesn't allow
967
+ # predicated methods by default.
968
+ Style/TrivialAccessors:
969
+ # When set to false the cop will suggest the use of accessor methods
970
+ # in situations like:
971
+ #
972
+ # def name
973
+ # @other_name
974
+ # end
975
+ #
976
+ # This way you can uncover "hidden" attributes in your code.
977
+ ExactNameMatch: true
978
+ AllowPredicates: true
979
+ # Allows trivial writers that don't end in an equal sign. e.g.
980
+ #
981
+ # def on_exception(action)
982
+ # @on_exception=action
983
+ # end
984
+ # on_exception :restart
985
+ #
986
+ # Commonly used in DSLs
987
+ AllowDSLWriters: false
988
+ IgnoreClassMethods: false
989
+ Whitelist:
990
+ - to_ary
991
+ - to_a
992
+ - to_c
993
+ - to_enum
994
+ - to_h
995
+ - to_hash
996
+ - to_i
997
+ - to_int
998
+ - to_io
999
+ - to_open
1000
+ - to_path
1001
+ - to_proc
1002
+ - to_r
1003
+ - to_regexp
1004
+ - to_str
1005
+ - to_s
1006
+ - to_sym
1007
+
1008
+ Naming/VariableName:
1009
+ EnforcedStyle: snake_case
1010
+ SupportedStyles:
1011
+ - snake_case
1012
+ - camelCase
1013
+
1014
+ Naming/VariableNumber:
1015
+ EnforcedStyle: normalcase
1016
+ SupportedStyles:
1017
+ - snake_case
1018
+ - normalcase
1019
+ - non_integer
1020
+
1021
+ # WordArray enforces how array literals of word-like strings should be expressed.
1022
+ Style/WordArray:
1023
+ EnforcedStyle: percent
1024
+ SupportedStyles:
1025
+ # percent style: %w(word1 word2)
1026
+ - percent
1027
+ # bracket style: ['word1', 'word2']
1028
+ - brackets
1029
+ # The MinSize option causes the WordArray rule to be ignored for arrays
1030
+ # smaller than a certain size. The rule is only applied to arrays
1031
+ # whose element count is greater than or equal to MinSize.
1032
+ MinSize: 0
1033
+ # The regular expression WordRegex decides what is considered a word.
1034
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1035
+
1036
+ ##################### Metrics ##################################
1037
+
1038
+ Metrics/AbcSize:
1039
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1040
+ # a Float.
1041
+ Max: 25
1042
+
1043
+ Metrics/BlockNesting:
1044
+ Max: 3
1045
+
1046
+ Metrics/BlockLength:
1047
+ Exclude:
1048
+ - 'Rakefile'
1049
+ - '*.gemspec'
1050
+
1051
+ Metrics/ClassLength:
1052
+ CountComments: false # count full line comments?
1053
+ Max: 100
1054
+
1055
+ Metrics/ModuleLength:
1056
+ CountComments: false # count full line comments?
1057
+ Max: 100
1058
+
1059
+ # Avoid complex methods.
1060
+ Metrics/CyclomaticComplexity:
1061
+ Max: 10
1062
+
1063
+ Metrics/LineLength:
1064
+ Max: 80
1065
+ # To make it possible to copy or click on URIs in the code, we allow lines
1066
+ # containing a URI to be longer than Max.
1067
+ AllowHeredoc: true
1068
+ AllowURI: true
1069
+ URISchemes:
1070
+ - http
1071
+ - https
1072
+
1073
+ Metrics/MethodLength:
1074
+ CountComments: false # count full line comments?
1075
+ Max: 30
1076
+
1077
+ Metrics/ParameterLists:
1078
+ Max: 5
1079
+ CountKeywordArgs: true
1080
+
1081
+ Metrics/PerceivedComplexity:
1082
+ Max: 15
1083
+
1084
+ ##################### Lint ##################################
1085
+
1086
+ # Allow safe assignment in conditions.
1087
+ Lint/AssignmentInCondition:
1088
+ AllowSafeAssignment: true
1089
+
1090
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
1091
+ Lint/BlockAlignment:
1092
+ # The value `start_of_block` means that the `end` should be aligned with line
1093
+ # where the `do` keyword appears.
1094
+ # The value `start_of_line` means it should be aligned with the whole
1095
+ # expression's starting line.
1096
+ # The value `either` means both are allowed.
1097
+ EnforcedStyleAlignWith: either
1098
+ SupportedStylesAlignWith:
1099
+ - either
1100
+ - start_of_block
1101
+ - start_of_line
1102
+
1103
+ # Align ends correctly.
1104
+ Lint/EndAlignment:
1105
+ # The value `keyword` means that `end` should be aligned with the matching
1106
+ # keyword (if, while, etc.).
1107
+ # The value `variable` means that in assignments, `end` should be aligned
1108
+ # with the start of the variable on the left hand side of `=`. In all other
1109
+ # situations, `end` should still be aligned with the keyword.
1110
+ # The value `start_of_line` means that `end` should be aligned with the start
1111
+ # of the line which the matching keyword appears on.
1112
+ EnforcedStyleAlignWith: keyword
1113
+ SupportedStylesAlignWith:
1114
+ - keyword
1115
+ - variable
1116
+ - start_of_line
1117
+ AutoCorrect: false
1118
+
1119
+ Lint/DefEndAlignment:
1120
+ # The value `def` means that `end` should be aligned with the def keyword.
1121
+ # The value `start_of_line` means that `end` should be aligned with method
1122
+ # calls like `private`, `public`, etc, if present in front of the `def`
1123
+ # keyword on the same line.
1124
+ EnforcedStyleAlignWith: start_of_line
1125
+ SupportedStylesAlignWith:
1126
+ - start_of_line
1127
+ - def
1128
+ AutoCorrect: false
1129
+
1130
+ Lint/InheritException:
1131
+ # The default base class in favour of `Exception`.
1132
+ EnforcedStyle: runtime_error
1133
+ SupportedStyles:
1134
+ - runtime_error
1135
+ - standard_error
1136
+
1137
+ # Checks for unused block arguments
1138
+ Lint/UnusedBlockArgument:
1139
+ IgnoreEmptyBlocks: true
1140
+ AllowUnusedKeywordArguments: false
1141
+
1142
+ # Checks for unused method arguments.
1143
+ Lint/UnusedMethodArgument:
1144
+ AllowUnusedKeywordArguments: false
1145
+ IgnoreEmptyMethods: true
1146
+
1147
+ ##################### Performance ############################
1148
+
1149
+ Performance/RedundantMerge:
1150
+ # Max number of key-value pairs to consider an offense
1151
+ MaxKeyValuePairs: 2