rails_form_builder_param_name 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c1bd39966236e1a1a2050e5a4601540df808d98
4
+ data.tar.gz: d92480b33480645fad00fcfa2aadce1c3b7884d7
5
+ SHA512:
6
+ metadata.gz: 8533e73eae464300d1c7b3050ad55f1bafa95976d70a9493f52c35a941ef4f17fd20030f2e2cf2220dfb1a112b5ef61c31c85a0da17b2aa1f416175ea4bfac98
7
+ data.tar.gz: 8802ac1edfc07757440ce92d02f812cca42e00d9272a762e0c8ba9f58f16fbe354995e0b7faa937d7c0b028f605042b01d58c5ed9671ab8155ef842c0ea90595
data/.codeclimate.yml ADDED
@@ -0,0 +1,47 @@
1
+ # This is a sample .codeclimate.yml configured for Engine analysis on Code
2
+ # Climate Platform. For an overview of the Code Climate Platform, see here:
3
+ # http://docs.codeclimate.com/article/300-the-codeclimate-platform
4
+
5
+ # Under the engines key, you can configure which engines will analyze your repo.
6
+ # Each key is an engine name. For each value, you need to specify enabled: true
7
+ # to enable the engine as well as any other engines-specific configuration.
8
+
9
+ # For more details, see here:
10
+ # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
11
+
12
+ # For a list of all available engines, see here:
13
+ # http://docs.codeclimate.com/article/296-engines-available-engines
14
+
15
+ engines:
16
+ # to turn on an engine, add it here and set enabled to `true`
17
+ # to turn off an engine, set enabled to `false` or remove it
18
+ rubocop:
19
+ enabled: true
20
+ golint:
21
+ enabled: true
22
+ gofmt:
23
+ enabled: true
24
+ eslint:
25
+ enabled: true
26
+ csslint:
27
+ enabled: true
28
+
29
+ # Engines can analyze files and report issues on them, but you can separately
30
+ # decide which files will receive ratings based on those issues. This is
31
+ # specified by path patterns under the ratings key.
32
+
33
+ # For more details see here:
34
+ # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
35
+
36
+ # Note: If the ratings key is not specified, this will result in a 0.0 GPA on your dashboard.
37
+
38
+ ratings:
39
+ paths:
40
+ - lib/**
41
+
42
+ # You can globally exclude files from being analyzed by any engine using the
43
+ # exclude_paths key.
44
+
45
+ #exclude_paths:
46
+ #- spec/**/*
47
+ #- vendor/**/*
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,913 @@
1
+ # Common configuration.
2
+ AllCops:
3
+ # Include common Ruby source files.
4
+ Include:
5
+ - '**/*.gemspec'
6
+ - '**/*.podspec'
7
+ - '**/*.jbuilder'
8
+ - '**/*.rake'
9
+ - '**/*.opal'
10
+ - '**/config.ru'
11
+ - '**/Gemfile'
12
+ - '**/Rakefile'
13
+ - '**/Capfile'
14
+ - '**/Guardfile'
15
+ - '**/Podfile'
16
+ - '**/Thorfile'
17
+ - '**/Vagrantfile'
18
+ - '**/Berksfile'
19
+ - '**/Cheffile'
20
+ - '**/Vagabondfile'
21
+ Exclude:
22
+ - 'bin/**/*'
23
+ - 'vendor/**/*'
24
+ - 'test/**/*'
25
+ # By default, the rails cops are not run. Override in project or home
26
+ # directory .rubocop.yml files, or by giving the -R/--rails option.
27
+ RunRailsCops: true
28
+ # Cop names are not displayed in offense messages by default. Change behavior
29
+ # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
30
+ # option.
31
+ DisplayCopNames: false
32
+ # Style guide URLs are not displayed in offense messages by default. Change
33
+ # behavior by overriding DisplayStyleGuide, or by giving the
34
+ # -S/--display-style-guide option.
35
+ DisplayStyleGuide: false
36
+ # Additional cops that do not reference a style guide rule may be enabled by
37
+ # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
38
+ # the --only-guide-cops option.
39
+ StyleGuideCopsOnly: false
40
+ # All cops except the ones in disabled.yml are enabled by default. Change
41
+ # this behavior by overriding DisabledByDefault. When DisabledByDefault is
42
+ # true, all cops in the default configuration are disabled, and and only cops
43
+ # in user configuration are enabled. This makes cops opt-in instead of
44
+ # opt-out. Note that when DisabledByDefault is true, cops in user
45
+ # configuration will be enabled even if they don't set the Enabled parameter.
46
+ DisabledByDefault: false
47
+ # Enables the result cache if true. Can be overridden by the --cache command
48
+ # line option.
49
+ UseCache: true
50
+ # Threshold for how many files can be stored in the result cache before some
51
+ # of the files are automatically removed.
52
+ MaxFilesInCache: 20000
53
+ # The cache will be stored in "rubocop_cache" under this directory. The name
54
+ # "/tmp" is special and will be converted to the system temporary directory,
55
+ # which is "/tmp" on Unix-like systems, but could be something else on other
56
+ # systems.
57
+ CacheRootDirectory: /tmp
58
+
59
+ # Indent private/protected/public as deep as method definitions
60
+ Style/AccessModifierIndentation:
61
+ EnforcedStyle: indent
62
+ SupportedStyles:
63
+ - outdent
64
+ - indent
65
+
66
+ # Align the elements of a hash literal if they span more than one line.
67
+ Style/AlignHash:
68
+ # Alignment of entries using hash rocket as separator. Valid values are:
69
+ #
70
+ # key - left alignment of keys
71
+ # 'a' => 2
72
+ # 'bb' => 3
73
+ # separator - alignment of hash rockets, keys are right aligned
74
+ # 'a' => 2
75
+ # 'bb' => 3
76
+ # table - left alignment of keys, hash rockets, and values
77
+ # 'a' => 2
78
+ # 'bb' => 3
79
+ EnforcedHashRocketStyle: key
80
+ # Alignment of entries using colon as separator. Valid values are:
81
+ #
82
+ # key - left alignment of keys
83
+ # a: 0
84
+ # bb: 1
85
+ # separator - alignment of colons, keys are right aligned
86
+ # a: 0
87
+ # bb: 1
88
+ # table - left alignment of keys and values
89
+ # a: 0
90
+ # bb: 1
91
+ EnforcedColonStyle: key
92
+ # Select whether hashes that are the last argument in a method call should be
93
+ # inspected? Valid values are:
94
+ #
95
+ # always_inspect - Inspect both implicit and explicit hashes.
96
+ # Registers an offense for:
97
+ # function(a: 1,
98
+ # b: 2)
99
+ # Registers an offense for:
100
+ # function({a: 1,
101
+ # b: 2})
102
+ # always_ignore - Ignore both implicit and explicit hashes.
103
+ # Accepts:
104
+ # function(a: 1,
105
+ # b: 2)
106
+ # Accepts:
107
+ # function({a: 1,
108
+ # b: 2})
109
+ # ignore_implicit - Ignore only implicit hashes.
110
+ # Accepts:
111
+ # function(a: 1,
112
+ # b: 2)
113
+ # Registers an offense for:
114
+ # function({a: 1,
115
+ # b: 2})
116
+ # ignore_explicit - Ignore only explicit hashes.
117
+ # Accepts:
118
+ # function({a: 1,
119
+ # b: 2})
120
+ # Registers an offense for:
121
+ # function(a: 1,
122
+ # b: 2)
123
+ EnforcedLastArgumentHashStyle: always_inspect
124
+ SupportedLastArgumentHashStyles:
125
+ - always_inspect
126
+ - always_ignore
127
+ - ignore_implicit
128
+ - ignore_explicit
129
+
130
+ Style/AlignParameters:
131
+ # Alignment of parameters in multi-line method calls.
132
+ #
133
+ # The `with_first_parameter` style aligns the following lines along the same
134
+ # column as the first parameter.
135
+ #
136
+ # method_call(a,
137
+ # b)
138
+ #
139
+ # The `with_fixed_indentation` style aligns the following lines with one
140
+ # level of indentation relative to the start of the line with the method call.
141
+ #
142
+ # method_call(a,
143
+ # b)
144
+ EnforcedStyle: with_first_parameter
145
+ SupportedStyles:
146
+ - with_first_parameter
147
+ - with_fixed_indentation
148
+
149
+ Style/AndOr:
150
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
151
+ # or completely (always).
152
+ EnforcedStyle: always
153
+ SupportedStyles:
154
+ - always
155
+ - conditionals
156
+
157
+
158
+ # Checks if usage of %() or %Q() matches configuration.
159
+ Style/BarePercentLiterals:
160
+ EnforcedStyle: bare_percent
161
+ SupportedStyles:
162
+ - percent_q
163
+ - bare_percent
164
+
165
+ Style/BlockDelimiters:
166
+ EnforcedStyle: line_count_based
167
+ SupportedStyles:
168
+ # The `line_count_based` style enforces braces around single line blocks and
169
+ # do..end around multi-line blocks.
170
+ - line_count_based
171
+ # The `semantic` style enforces braces around functional blocks, where the
172
+ # primary purpose of the block is to return a value and do..end for
173
+ # procedural blocks, where the primary purpose of the block is its
174
+ # side-effects.
175
+ #
176
+ # This looks at the usage of a block's method to determine its type (e.g. is
177
+ # the result of a `map` assigned to a variable or passed to another
178
+ # method) but exceptions are permitted in the `ProceduralMethods`,
179
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
180
+ - semantic
181
+ ProceduralMethods:
182
+ # Methods that are known to be procedural in nature but look functional from
183
+ # their usage, e.g.
184
+ #
185
+ # time = Benchmark.realtime do
186
+ # foo.bar
187
+ # end
188
+ #
189
+ # Here, the return value of the block is discarded but the return value of
190
+ # `Benchmark.realtime` is used.
191
+ - benchmark
192
+ - bm
193
+ - bmbm
194
+ - create
195
+ - each_with_object
196
+ - measure
197
+ - new
198
+ - realtime
199
+ - tap
200
+ - with_object
201
+ FunctionalMethods:
202
+ # Methods that are known to be functional in nature but look procedural from
203
+ # their usage, e.g.
204
+ #
205
+ # let(:foo) { Foo.new }
206
+ #
207
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
208
+ # doesn't appear to be used from the return value of `let`.
209
+ - let
210
+ - let!
211
+ - subject
212
+ - watch
213
+ IgnoredMethods:
214
+ # Methods that can be either procedural or functional and cannot be
215
+ # categorised from their usage alone, e.g.
216
+ #
217
+ # foo = lambda do |x|
218
+ # puts "Hello, #{x}"
219
+ # end
220
+ #
221
+ # foo = lambda do |x|
222
+ # x * 100
223
+ # end
224
+ #
225
+ # Here, it is impossible to tell from the return value of `lambda` whether
226
+ # the inner block's return value is significant.
227
+ - lambda
228
+ - proc
229
+ - it
230
+
231
+ Style/BracesAroundHashParameters:
232
+ EnforcedStyle: no_braces
233
+ SupportedStyles:
234
+ # The `braces` style enforces braces around all method parameters that are
235
+ # hashes.
236
+ - braces
237
+ # The `no_braces` style checks that the last parameter doesn't have braces
238
+ # around it.
239
+ - no_braces
240
+ # The `context_dependent` style checks that the last parameter doesn't have
241
+ # braces around it, but requires braces if the second to last parameter is
242
+ # also a hash literal.
243
+ - context_dependent
244
+
245
+ # Indentation of `when`.
246
+ Style/CaseIndentation:
247
+ IndentWhenRelativeTo: case
248
+ SupportedStyles:
249
+ - case
250
+ - end
251
+ IndentOneStep: false
252
+
253
+ Style/ClassAndModuleChildren:
254
+ # Checks the style of children definitions at classes and modules.
255
+ #
256
+ # Basically there are two different styles:
257
+ #
258
+ # `nested` - have each child on a separate line
259
+ # class Foo
260
+ # class Bar
261
+ # end
262
+ # end
263
+ #
264
+ # `compact` - combine definitions as much as possible
265
+ # class Foo::Bar
266
+ # end
267
+ #
268
+ # The compact style is only forced, for classes / modules with one child.
269
+ EnforcedStyle: nested
270
+ SupportedStyles:
271
+ - nested
272
+ - compact
273
+
274
+ Style/ClassCheck:
275
+ EnforcedStyle: is_a?
276
+ SupportedStyles:
277
+ - is_a?
278
+ - kind_of?
279
+
280
+ # Align with the style guide.
281
+ Style/CollectionMethods:
282
+ # Mapping from undesired method to desired_method
283
+ # e.g. to use `detect` over `find`:
284
+ #
285
+ # CollectionMethods:
286
+ # PreferredMethods:
287
+ # find: detect
288
+ PreferredMethods:
289
+ collect: 'map'
290
+ collect!: 'map!'
291
+ inject: 'reduce'
292
+ detect: 'find'
293
+ find_all: 'select'
294
+
295
+ # Use ` or %x around command literals.
296
+ Style/CommandLiteral:
297
+ EnforcedStyle: backticks
298
+ # backticks: Always use backticks.
299
+ # percent_x: Always use %x.
300
+ # mixed: Use backticks on single-line commands, and %x on multi-line commands.
301
+ SupportedStyles:
302
+ - backticks
303
+ - percent_x
304
+ - mixed
305
+ # If false, the cop will always recommend using %x if one or more backticks
306
+ # are found in the command string.
307
+ AllowInnerBackticks: false
308
+
309
+ # Checks formatting of special comments
310
+ Style/CommentAnnotation:
311
+ Keywords:
312
+ - TODO
313
+ - FIXME
314
+ - OPTIMIZE
315
+ - HACK
316
+ - REVIEW
317
+
318
+ # Checks that you have put a copyright in a comment before any code.
319
+ #
320
+ # You can override the default Notice in your .rubocop.yml file.
321
+ #
322
+ # In order to use autocorrect, you must supply a value for the
323
+ # AutocorrectNotice key that matches the regexp Notice. A blank
324
+ # AutocorrectNotice will cause an error during autocorrect.
325
+ #
326
+ # Autocorrect will add a copyright notice in a comment at the top
327
+ # of the file immediately after any shebang or encoding comments.
328
+ #
329
+ # Example rubocop.yml:
330
+ #
331
+ # Style/Copyright:
332
+ # Enabled: true
333
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
334
+ # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
335
+ #
336
+ Style/Copyright:
337
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
338
+ AutocorrectNotice: ''
339
+
340
+ # Multi-line method chaining should be done with leading dots.
341
+ Style/DotPosition:
342
+ EnforcedStyle: leading
343
+ SupportedStyles:
344
+ - leading
345
+ - trailing
346
+
347
+ # Warn on empty else statements
348
+ # empty - warn only on empty else
349
+ # nil - warn on else with nil in it
350
+ # both - warn on empty else and else with nil in it
351
+ Style/EmptyElse:
352
+ EnforcedStyle: both
353
+ SupportedStyles:
354
+ - empty
355
+ - nil
356
+ - both
357
+
358
+ # Use empty lines between defs.
359
+ Style/EmptyLineBetweenDefs:
360
+ # If true, this parameter means that single line method definitions don't
361
+ # need an empty line between them.
362
+ AllowAdjacentOneLineDefs: false
363
+
364
+ Style/EmptyLinesAroundBlockBody:
365
+ EnforcedStyle: no_empty_lines
366
+ SupportedStyles:
367
+ - empty_lines
368
+ - no_empty_lines
369
+
370
+ Style/EmptyLinesAroundClassBody:
371
+ EnforcedStyle: no_empty_lines
372
+ SupportedStyles:
373
+ - empty_lines
374
+ - no_empty_lines
375
+
376
+ Style/EmptyLinesAroundModuleBody:
377
+ EnforcedStyle: no_empty_lines
378
+ SupportedStyles:
379
+ - empty_lines
380
+ - no_empty_lines
381
+
382
+ # Checks whether the source file has a utf-8 encoding comment or not
383
+ # AutoCorrectEncodingComment must match the regex
384
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
385
+ Style/Encoding:
386
+ EnforcedStyle: always
387
+ SupportedStyles:
388
+ - when_needed
389
+ - always
390
+ AutoCorrectEncodingComment: '# encoding: utf-8'
391
+
392
+ Style/ExtraSpacing:
393
+ # When true, allows most uses of extra spacing if the intent is to align
394
+ # things with the previous or next line, not counting empty lines or comment
395
+ # lines.
396
+ AllowForAlignment: true
397
+
398
+ Style/FileName:
399
+ # File names listed in AllCops:Include are excluded by default. Add extra
400
+ # excludes here.
401
+ Exclude: []
402
+
403
+ Style/FirstParameterIndentation:
404
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
405
+ SupportedStyles:
406
+ # The first parameter should always be indented one step more than the
407
+ # preceding line.
408
+ - consistent
409
+ # The first parameter should normally be indented one step more than the
410
+ # preceding line, but if it's a parameter for a method call that is itself
411
+ # a parameter in a method call, then the inner parameter should be indented
412
+ # relative to the inner method.
413
+ - special_for_inner_method_call
414
+ # Same as special_for_inner_method_call except that the special rule only
415
+ # applies if the outer method call encloses its arguments in parentheses.
416
+ - special_for_inner_method_call_in_parentheses
417
+
418
+ # Checks use of for or each in multiline loops.
419
+ Style/For:
420
+ EnforcedStyle: each
421
+ SupportedStyles:
422
+ - for
423
+ - each
424
+
425
+ # Enforce the method used for string formatting.
426
+ Style/FormatString:
427
+ EnforcedStyle: format
428
+ SupportedStyles:
429
+ - format
430
+ - sprintf
431
+ - percent
432
+
433
+ # Built-in global variables are allowed by default.
434
+ Style/GlobalVars:
435
+ AllowedVariables: []
436
+
437
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
438
+ # needs to have to trigger this cop
439
+ Style/GuardClause:
440
+ MinBodyLength: 1
441
+
442
+ Style/HashSyntax:
443
+ EnforcedStyle: ruby19
444
+ SupportedStyles:
445
+ - ruby19
446
+ - ruby19_no_mixed_keys
447
+ - hash_rockets
448
+ # Force hashes that have a symbol value to use hash rockets
449
+ UseHashRocketsWithSymbolValues: false
450
+
451
+ Style/IfUnlessModifier:
452
+ MaxLineLength: 80
453
+
454
+ Style/IndentationConsistency:
455
+ # The difference between `rails` and `normal` is that the `rails` style
456
+ # prescribes that in classes and modules the `protected` and `private`
457
+ # modifier keywords shall be indented the same as public methods and that
458
+ # protected and private members shall be indented one step more than the
459
+ # modifiers. Other than that, both styles mean that entities on the same
460
+ # logical depth shall have the same indentation.
461
+ EnforcedStyle: normal
462
+ SupportedStyles:
463
+ - normal
464
+ - rails
465
+
466
+ Style/IndentationWidth:
467
+ # Number of spaces for each indentation level.
468
+ Width: 2
469
+
470
+ # Checks the indentation of the first key in a hash literal.
471
+ Style/IndentHash:
472
+ # The value `special_inside_parentheses` means that hash literals with braces
473
+ # that have their opening brace on the same line as a surrounding opening
474
+ # round parenthesis, shall have their first key indented relative to the
475
+ # first position inside the parenthesis.
476
+ # The value `consistent` means that the indentation of the first key shall
477
+ # always be relative to the first position of the line where the opening
478
+ # brace is.
479
+ EnforcedStyle: special_inside_parentheses
480
+ SupportedStyles:
481
+ - special_inside_parentheses
482
+ - consistent
483
+
484
+ Style/LambdaCall:
485
+ EnforcedStyle: call
486
+ SupportedStyles:
487
+ - call
488
+ - braces
489
+
490
+ Style/Next:
491
+ # With `always` all conditions at the end of an iteration needs to be
492
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
493
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
494
+ EnforcedStyle: skip_modifier_ifs
495
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
496
+ # needs to have to trigger this cop
497
+ MinBodyLength: 3
498
+ SupportedStyles:
499
+ - skip_modifier_ifs
500
+ - always
501
+
502
+ Style/NonNilCheck:
503
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
504
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
505
+ # **usually** OK, but might change behavior.
506
+ #
507
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
508
+ # offenses for `!x.nil?` and does no changes that might change behavior.
509
+ IncludeSemanticChanges: false
510
+
511
+ Style/MethodDefParentheses:
512
+ EnforcedStyle: require_parentheses
513
+ SupportedStyles:
514
+ - require_parentheses
515
+ - require_no_parentheses
516
+
517
+ Style/MethodName:
518
+ EnforcedStyle: snake_case
519
+ SupportedStyles:
520
+ - snake_case
521
+ - camelCase
522
+
523
+ Style/MultilineOperationIndentation:
524
+ EnforcedStyle: aligned
525
+ SupportedStyles:
526
+ - aligned
527
+ - indented
528
+
529
+ Style/NumericLiterals:
530
+ MinDigits: 5
531
+
532
+ Style/OptionHash:
533
+ # A list of parameter names that will be flagged by this cop.
534
+ SuspiciousParamNames:
535
+ - options
536
+ - opts
537
+ - args
538
+ - params
539
+ - parameters
540
+
541
+ # Allow safe assignment in conditions.
542
+ Style/ParenthesesAroundCondition:
543
+ AllowSafeAssignment: true
544
+
545
+ Style/PercentLiteralDelimiters:
546
+ PreferredDelimiters:
547
+ '%': ()
548
+ '%i': ()
549
+ '%q': ()
550
+ '%Q': ()
551
+ '%r': '{}'
552
+ '%s': ()
553
+ '%w': ()
554
+ '%W': ()
555
+ '%x': ()
556
+
557
+ Style/PercentQLiterals:
558
+ EnforcedStyle: lower_case_q
559
+ SupportedStyles:
560
+ - lower_case_q # Use %q when possible, %Q when necessary
561
+ - upper_case_q # Always use %Q
562
+
563
+ Style/PredicateName:
564
+ # Predicate name prefices.
565
+ NamePrefix:
566
+ - is_
567
+ - has_
568
+ - have_
569
+ # Predicate name prefices that should be removed.
570
+ NamePrefixBlacklist:
571
+ - is_
572
+ - has_
573
+ - have_
574
+
575
+ Style/RaiseArgs:
576
+ EnforcedStyle: exploded
577
+ SupportedStyles:
578
+ - compact # raise Exception.new(msg)
579
+ - exploded # raise Exception, msg
580
+
581
+ Style/RedundantReturn:
582
+ # When true allows code like `return x, y`.
583
+ AllowMultipleReturnValues: false
584
+
585
+ # Use / or %r around regular expressions.
586
+ Style/RegexpLiteral:
587
+ EnforcedStyle: slashes
588
+ # slashes: Always use slashes.
589
+ # percent_r: Always use %r.
590
+ # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
591
+ SupportedStyles:
592
+ - slashes
593
+ - percent_r
594
+ - mixed
595
+ # If false, the cop will always recommend using %r if one or more slashes
596
+ # are found in the regexp string.
597
+ AllowInnerSlashes: false
598
+
599
+ Style/Semicolon:
600
+ # Allow ; to separate several expressions on the same line.
601
+ AllowAsExpressionSeparator: false
602
+
603
+ Style/SignalException:
604
+ EnforcedStyle: semantic
605
+ SupportedStyles:
606
+ - only_raise
607
+ - only_fail
608
+ - semantic
609
+
610
+ Style/SingleLineBlockParams:
611
+ Methods:
612
+ - reduce:
613
+ - a
614
+ - e
615
+ - inject:
616
+ - a
617
+ - e
618
+
619
+ Style/SingleLineMethods:
620
+ AllowIfMethodIsEmpty: true
621
+
622
+ Style/StabbyLambdaParentheses:
623
+ EnforcedStyle: require_parentheses
624
+ SupportedStyles:
625
+ - require_parentheses
626
+ - require_no_parentheses
627
+
628
+ Style/StringLiteralsInInterpolation:
629
+ EnforcedStyle: single_quotes
630
+ SupportedStyles:
631
+ - single_quotes
632
+ - double_quotes
633
+
634
+ Style/StringMethods:
635
+ # Mapping from undesired method to desired_method
636
+ # e.g. to use `to_sym` over `intern`:
637
+ #
638
+ # StringMethods:
639
+ # PreferredMethods:
640
+ # intern: to_sym
641
+ PreferredMethods:
642
+ intern: to_sym
643
+
644
+ Style/SpaceAroundBlockParameters:
645
+ EnforcedStyleInsidePipes: no_space
646
+ SupportedStyles:
647
+ - space
648
+ - no_space
649
+
650
+ Style/SpaceAroundEqualsInParameterDefault:
651
+ EnforcedStyle: space
652
+ SupportedStyles:
653
+ - space
654
+ - no_space
655
+
656
+ Style/SpaceAroundOperators:
657
+ MultiSpaceAllowedForOperators:
658
+ - '='
659
+ - '=>'
660
+
661
+ Style/SpaceBeforeBlockBraces:
662
+ EnforcedStyle: space
663
+ SupportedStyles:
664
+ - space
665
+ - no_space
666
+
667
+ Style/SpaceInsideBlockBraces:
668
+ EnforcedStyle: space
669
+ SupportedStyles:
670
+ - space
671
+ - no_space
672
+ # Valid values are: space, no_space
673
+ EnforcedStyleForEmptyBraces: no_space
674
+ # Space between { and |. Overrides EnforcedStyle if there is a conflict.
675
+ SpaceBeforeBlockParameters: true
676
+
677
+ Style/SpaceInsideHashLiteralBraces:
678
+ EnforcedStyle: space
679
+ EnforcedStyleForEmptyBraces: no_space
680
+ SupportedStyles:
681
+ - space
682
+ - no_space
683
+
684
+ Style/SpaceInsideStringInterpolation:
685
+ EnforcedStyle: no_space
686
+ SupportedStyles:
687
+ - space
688
+ - no_space
689
+
690
+ Style/StringLiterals:
691
+ Enabled: false
692
+ EnforcedStyle: single_quotes
693
+ SupportedStyles:
694
+ - single_quotes
695
+ - double_quotes
696
+
697
+ Style/SymbolProc:
698
+ # A list of method names to be ignored by the check.
699
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
700
+ IgnoredMethods:
701
+ - respond_to
702
+
703
+ Style/TrailingBlankLines:
704
+ EnforcedStyle: final_newline
705
+ SupportedStyles:
706
+ - final_newline
707
+ - final_blank_line
708
+
709
+ Style/TrailingComma:
710
+ # If EnforcedStyleForMultiline is comma, the cop requires a comma after the
711
+ # last item of a list, but only for lists where each item is on its own line.
712
+ # If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
713
+ # after the last item of a list, for all lists.
714
+ EnforcedStyleForMultiline: no_comma
715
+ SupportedStyles:
716
+ - comma
717
+ - consistent_comma
718
+ - no_comma
719
+
720
+ Style/TrailingWhitespace:
721
+ Enabled: false
722
+
723
+ # TrivialAccessors requires exact name matches and doesn't allow
724
+ # predicated methods by default.
725
+ Style/TrivialAccessors:
726
+ # When set to false the cop will suggest the use of accessor methods
727
+ # in situations like:
728
+ #
729
+ # def name
730
+ # @other_name
731
+ # end
732
+ #
733
+ # This way you can uncover "hidden" attributes in your code.
734
+ ExactNameMatch: true
735
+ AllowPredicates: false
736
+ # Allows trivial writers that don't end in an equal sign. e.g.
737
+ #
738
+ # def on_exception(action)
739
+ # @on_exception=action
740
+ # end
741
+ # on_exception :restart
742
+ #
743
+ # Commonly used in DSLs
744
+ AllowDSLWriters: false
745
+ IgnoreClassMethods: false
746
+ Whitelist:
747
+ - to_ary
748
+ - to_a
749
+ - to_c
750
+ - to_enum
751
+ - to_h
752
+ - to_hash
753
+ - to_i
754
+ - to_int
755
+ - to_io
756
+ - to_open
757
+ - to_path
758
+ - to_proc
759
+ - to_r
760
+ - to_regexp
761
+ - to_str
762
+ - to_s
763
+ - to_sym
764
+
765
+ Style/VariableName:
766
+ EnforcedStyle: snake_case
767
+ SupportedStyles:
768
+ - snake_case
769
+ - camelCase
770
+
771
+ Style/WhileUntilModifier:
772
+ MaxLineLength: 80
773
+
774
+ Style/WordArray:
775
+ MinSize: 0
776
+ # The regular expression WordRegex decides what is considered a word.
777
+ WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
778
+
779
+ ##################### Metrics ##################################
780
+
781
+ Metrics/AbcSize:
782
+ # The ABC size is a calculated magnitude, so this number can be a Fixnum or
783
+ # a Float.
784
+ Max: 15
785
+
786
+ Metrics/BlockNesting:
787
+ Max: 3
788
+
789
+ Metrics/ClassLength:
790
+ CountComments: false # count full line comments?
791
+ Max: 100
792
+
793
+ Metrics/ModuleLength:
794
+ CountComments: false # count full line comments?
795
+ Max: 100
796
+
797
+ # Avoid complex methods.
798
+ Metrics/CyclomaticComplexity:
799
+ Max: 6
800
+
801
+ Metrics/LineLength:
802
+ Max: 120
803
+ # To make it possible to copy or click on URIs in the code, we allow lines
804
+ # contaning a URI to be longer than Max.
805
+ AllowURI: true
806
+ URISchemes:
807
+ - http
808
+ - https
809
+
810
+ Metrics/MethodLength:
811
+ CountComments: false # count full line comments?
812
+ Max: 10
813
+
814
+ Metrics/ParameterLists:
815
+ Max: 5
816
+ CountKeywordArgs: true
817
+
818
+ Metrics/PerceivedComplexity:
819
+ Max: 7
820
+
821
+ ##################### Lint ##################################
822
+
823
+ # Allow safe assignment in conditions.
824
+ Lint/AssignmentInCondition:
825
+ AllowSafeAssignment: true
826
+
827
+ # Align ends correctly.
828
+ Lint/EndAlignment:
829
+ # The value `keyword` means that `end` should be aligned with the matching
830
+ # keyword (if, while, etc.).
831
+ # The value `variable` means that in assignments, `end` should be aligned
832
+ # with the start of the variable on the left hand side of `=`. In all other
833
+ # situations, `end` should still be aligned with the keyword.
834
+ AlignWith: keyword
835
+ SupportedStyles:
836
+ - keyword
837
+ - variable
838
+ AutoCorrect: false
839
+
840
+ Lint/DefEndAlignment:
841
+ # The value `def` means that `end` should be aligned with the def keyword.
842
+ # The value `start_of_line` means that `end` should be aligned with method
843
+ # calls like `private`, `public`, etc, if present in front of the `def`
844
+ # keyword on the same line.
845
+ AlignWith: start_of_line
846
+ SupportedStyles:
847
+ - start_of_line
848
+ - def
849
+ AutoCorrect: false
850
+
851
+ ##################### Rails ##################################
852
+
853
+ Rails/ActionFilter:
854
+ EnforcedStyle: action
855
+ SupportedStyles:
856
+ - action
857
+ - filter
858
+ Include:
859
+ - app/controllers/**/*.rb
860
+
861
+ Rails/Date:
862
+ # The value `strict` disallows usage of `Date.today`, `Date.current`,
863
+ # `Date#to_time` etc.
864
+ # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
865
+ # (but not `Date.today`) which are overriden by ActiveSupport to handle current
866
+ # time zone.
867
+ EnforcedStyle: flexible
868
+ SupportedStyles:
869
+ - strict
870
+ - flexible
871
+
872
+ Rails/DefaultScope:
873
+ Include:
874
+ - app/models/**/*.rb
875
+
876
+ Rails/FindBy:
877
+ Include:
878
+ - app/models/**/*.rb
879
+
880
+ Rails/FindEach:
881
+ Include:
882
+ - app/models/**/*.rb
883
+
884
+ Rails/HasAndBelongsToMany:
885
+ Include:
886
+ - app/models/**/*.rb
887
+
888
+ Rails/Output:
889
+ Include:
890
+ - app/**/*.rb
891
+ - config/**/*.rb
892
+ - db/**/*.rb
893
+ - lib/**/*.rb
894
+
895
+ Rails/ReadWriteAttribute:
896
+ Include:
897
+ - app/models/**/*.rb
898
+
899
+ Rails/ScopeArgs:
900
+ Include:
901
+ - app/models/**/*.rb
902
+
903
+ Rails/TimeZone:
904
+ # The value `strict` means that `Time` should be used with `zone`.
905
+ # The value `flexible` allows usage of `in_time_zone` instead of `zone`.
906
+ EnforcedStyle: flexible
907
+ SupportedStyles:
908
+ - strict
909
+ - flexible
910
+
911
+ Rails/Validation:
912
+ Include:
913
+ - app/models/**/*.rb