gatemedia_rubocop 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/.rubocop.2.3.yml +618 -0
- data/lib/gatemedia_rubocop/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7642ab1b731f56b114eff09f475b9290fa905d5f
|
4
|
+
data.tar.gz: 0f32422783f85f94626170c139c94457aa3a7baa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c17b590a5706280cb912cd1891bb9d3e32405260fe23f72f5517ebf4f2de22af320d3bc5a5ebdb6b22c5aa1b8ad6f3ef0732281753c9bc1803a673693a9db3a6
|
7
|
+
data.tar.gz: 4f7ca6e8368aaabdbb602ecb1b5bd899ab833fa3409fb30f3856e4529cef35a8d93c2fda0a18c7bc30c6f554a0931e6450d12e904f629c7266f302bfc9570816
|
@@ -0,0 +1,618 @@
|
|
1
|
+
# Common configuration.
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.3
|
4
|
+
|
5
|
+
# Include gemspec and Rakefile
|
6
|
+
Include:
|
7
|
+
- '**/*.gemspec'
|
8
|
+
- '**/*.podspec'
|
9
|
+
- '**/*.jbuilder'
|
10
|
+
- '**/*.rake'
|
11
|
+
- '**/*.opal'
|
12
|
+
- '**/Gemfile'
|
13
|
+
- '**/Rakefile'
|
14
|
+
- '**/Capfile'
|
15
|
+
- '**/Guardfile'
|
16
|
+
- '**/Podfile'
|
17
|
+
- '**/Thorfile'
|
18
|
+
- '**/Vagrantfile'
|
19
|
+
- '**/Berksfile'
|
20
|
+
- '**/Cheffile'
|
21
|
+
- '**/Vagabondfile'
|
22
|
+
Exclude:
|
23
|
+
- 'vendor/**/*'
|
24
|
+
- 'tmp/**/*'
|
25
|
+
- 'db/schema.rb'
|
26
|
+
# By default, the rails cops are not run. Override in project or home
|
27
|
+
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
28
|
+
Rails:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# Indent private/protected/public as deep as method definitions
|
32
|
+
Style/AccessModifierIndentation:
|
33
|
+
EnforcedStyle: indent
|
34
|
+
SupportedStyles:
|
35
|
+
- outdent
|
36
|
+
- indent
|
37
|
+
|
38
|
+
# Align the elements of a hash literal if they span more than one line.
|
39
|
+
Style/AlignHash:
|
40
|
+
# Alignment of entries using hash rocket as separator. Valid values are:
|
41
|
+
#
|
42
|
+
# key - left alignment of keys
|
43
|
+
# 'a' => 2
|
44
|
+
# 'bb' => 3
|
45
|
+
# separator - alignment of hash rockets, keys are right aligned
|
46
|
+
# 'a' => 2
|
47
|
+
# 'bb' => 3
|
48
|
+
# table - left alignment of keys, hash rockets, and values
|
49
|
+
# 'a' => 2
|
50
|
+
# 'bb' => 3
|
51
|
+
EnforcedHashRocketStyle: key
|
52
|
+
# Alignment of entries using colon as separator. Valid values are:
|
53
|
+
#
|
54
|
+
# key - left alignment of keys
|
55
|
+
# a: 0
|
56
|
+
# bb: 1
|
57
|
+
# separator - alignment of colons, keys are right aligned
|
58
|
+
# a: 0
|
59
|
+
# bb: 1
|
60
|
+
# table - left alignment of keys and values
|
61
|
+
# a: 0
|
62
|
+
# bb: 1
|
63
|
+
EnforcedColonStyle: key
|
64
|
+
# Select whether hashes that are the last argument in a method call should be
|
65
|
+
# inspected? Valid values are:
|
66
|
+
#
|
67
|
+
# always_inspect - Inspect both implicit and explicit hashes.
|
68
|
+
# Registers an offense for:
|
69
|
+
# function(a: 1,
|
70
|
+
# b: 2)
|
71
|
+
# Registers an offense for:
|
72
|
+
# function({a: 1,
|
73
|
+
# b: 2})
|
74
|
+
# always_ignore - Ignore both implicit and explicit hashes.
|
75
|
+
# Accepts:
|
76
|
+
# function(a: 1,
|
77
|
+
# b: 2)
|
78
|
+
# Accepts:
|
79
|
+
# function({a: 1,
|
80
|
+
# b: 2})
|
81
|
+
# ignore_implicit - Ignore only implicit hashes.
|
82
|
+
# Accepts:
|
83
|
+
# function(a: 1,
|
84
|
+
# b: 2)
|
85
|
+
# Registers an offense for:
|
86
|
+
# function({a: 1,
|
87
|
+
# b: 2})
|
88
|
+
# ignore_explicit - Ignore only explicit hashes.
|
89
|
+
# Accepts:
|
90
|
+
# function({a: 1,
|
91
|
+
# b: 2})
|
92
|
+
# Registers an offense for:
|
93
|
+
# function(a: 1,
|
94
|
+
# b: 2)
|
95
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
96
|
+
SupportedLastArgumentHashStyles:
|
97
|
+
- always_inspect
|
98
|
+
- always_ignore
|
99
|
+
- ignore_implicit
|
100
|
+
- ignore_explicit
|
101
|
+
|
102
|
+
Style/AlignParameters:
|
103
|
+
# Alignment of parameters in multi-line method calls.
|
104
|
+
#
|
105
|
+
# The `with_first_parameter` style aligns the following lines along the same
|
106
|
+
# column as the first parameter.
|
107
|
+
#
|
108
|
+
# method_call(a,
|
109
|
+
# b)
|
110
|
+
#
|
111
|
+
# The `with_fixed_indentation` style aligns the following lines with one
|
112
|
+
# level of indentation relative to the start of the line with the method call.
|
113
|
+
#
|
114
|
+
# method_call(a,
|
115
|
+
# b)
|
116
|
+
EnforcedStyle: with_first_parameter
|
117
|
+
SupportedStyles:
|
118
|
+
- with_first_parameter
|
119
|
+
- with_fixed_indentation
|
120
|
+
|
121
|
+
Style/AndOr:
|
122
|
+
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
123
|
+
# or completely (always).
|
124
|
+
EnforcedStyle: always
|
125
|
+
SupportedStyles:
|
126
|
+
- always
|
127
|
+
- conditionals
|
128
|
+
|
129
|
+
|
130
|
+
# Checks if usage of %() or %Q() matches configuration.
|
131
|
+
Style/BarePercentLiterals:
|
132
|
+
EnforcedStyle: bare_percent
|
133
|
+
SupportedStyles:
|
134
|
+
- percent_q
|
135
|
+
- bare_percent
|
136
|
+
|
137
|
+
Style/BracesAroundHashParameters:
|
138
|
+
EnforcedStyle: no_braces
|
139
|
+
SupportedStyles:
|
140
|
+
- braces
|
141
|
+
- no_braces
|
142
|
+
|
143
|
+
# Indentation of `when`.
|
144
|
+
Style/CaseIndentation:
|
145
|
+
IndentWhenRelativeTo: case
|
146
|
+
SupportedStyles:
|
147
|
+
- case
|
148
|
+
- end
|
149
|
+
IndentOneStep: false
|
150
|
+
|
151
|
+
Style/ClassAndModuleChildren:
|
152
|
+
# Checks the style of children definitions at classes and modules.
|
153
|
+
#
|
154
|
+
# Basically there are two different styles:
|
155
|
+
#
|
156
|
+
# `nested` - have each child on a separate line
|
157
|
+
# class Foo
|
158
|
+
# class Bar
|
159
|
+
# end
|
160
|
+
# end
|
161
|
+
#
|
162
|
+
# `compact` - combine definitions as much as possible
|
163
|
+
# class Foo::Bar
|
164
|
+
# end
|
165
|
+
#
|
166
|
+
# The compact style is only forced, for classes / modules with one child.
|
167
|
+
EnforcedStyle: nested
|
168
|
+
SupportedStyles:
|
169
|
+
- nested
|
170
|
+
- compact
|
171
|
+
|
172
|
+
Style/ClassCheck:
|
173
|
+
EnforcedStyle: is_a?
|
174
|
+
SupportedStyles:
|
175
|
+
- is_a?
|
176
|
+
- kind_of?
|
177
|
+
|
178
|
+
# Align with the style guide.
|
179
|
+
Style/CollectionMethods:
|
180
|
+
# Mapping from undesired method to desired_method
|
181
|
+
# e.g. to use `detect` over `find`:
|
182
|
+
#
|
183
|
+
# CollectionMethods:
|
184
|
+
# PreferredMethods:
|
185
|
+
# find: detect
|
186
|
+
PreferredMethods:
|
187
|
+
collect: 'map'
|
188
|
+
collect!: 'map!'
|
189
|
+
inject: 'reduce'
|
190
|
+
detect: 'find'
|
191
|
+
find_all: 'select'
|
192
|
+
|
193
|
+
# Checks formatting of special comments
|
194
|
+
Style/CommentAnnotation:
|
195
|
+
Keywords:
|
196
|
+
- TODO
|
197
|
+
- FIXME
|
198
|
+
- OPTIMIZE
|
199
|
+
- HACK
|
200
|
+
- REVIEW
|
201
|
+
|
202
|
+
Style/Documentation:
|
203
|
+
Enabled: false
|
204
|
+
|
205
|
+
# Multi-line method chaining should be done with leading dots.
|
206
|
+
Style/DotPosition:
|
207
|
+
EnforcedStyle: leading
|
208
|
+
SupportedStyles:
|
209
|
+
- leading
|
210
|
+
- trailing
|
211
|
+
|
212
|
+
# Use empty lines between defs.
|
213
|
+
Style/EmptyLineBetweenDefs:
|
214
|
+
# If true, this parameter means that single line method definitions don't
|
215
|
+
# need an empty line between them.
|
216
|
+
AllowAdjacentOneLineDefs: false
|
217
|
+
|
218
|
+
# Checks whether the source file has a utf-8 encoding comment or not
|
219
|
+
Style/Encoding:
|
220
|
+
EnforcedStyle: always
|
221
|
+
SupportedStyles:
|
222
|
+
- when_needed
|
223
|
+
- always
|
224
|
+
|
225
|
+
Style/FileName:
|
226
|
+
# File names listed in AllCops:Include are excluded by default. Add extra
|
227
|
+
# excludes here.
|
228
|
+
Exclude: []
|
229
|
+
|
230
|
+
# Checks use of for or each in multiline loops.
|
231
|
+
Style/For:
|
232
|
+
EnforcedStyle: each
|
233
|
+
SupportedStyles:
|
234
|
+
- for
|
235
|
+
- each
|
236
|
+
|
237
|
+
# Enforce the method used for string formatting.
|
238
|
+
Style/FormatString:
|
239
|
+
EnforcedStyle: format
|
240
|
+
SupportedStyles:
|
241
|
+
- format
|
242
|
+
- sprintf
|
243
|
+
- percent
|
244
|
+
|
245
|
+
# Built-in global variables are allowed by default.
|
246
|
+
Style/GlobalVars:
|
247
|
+
AllowedVariables: []
|
248
|
+
|
249
|
+
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
250
|
+
# needs to have to trigger this cop
|
251
|
+
Style/GuardClause:
|
252
|
+
MinBodyLength: 1
|
253
|
+
|
254
|
+
Style/HashSyntax:
|
255
|
+
EnforcedStyle: hash_rockets
|
256
|
+
SupportedStyles:
|
257
|
+
- ruby19
|
258
|
+
- hash_rockets
|
259
|
+
|
260
|
+
Style/IfUnlessModifier:
|
261
|
+
MaxLineLength: 80
|
262
|
+
|
263
|
+
Style/IndentationWidth:
|
264
|
+
# Number of spaces for each indentation level.
|
265
|
+
Width: 2
|
266
|
+
|
267
|
+
# Checks the indentation of the first key in a hash literal.
|
268
|
+
Style/IndentHash:
|
269
|
+
# The value `special_inside_parentheses` means that hash literals with braces
|
270
|
+
# that have their opening brace on the same line as a surrounding opening
|
271
|
+
# round parenthesis, shall have their first key indented relative to the
|
272
|
+
# first position inside the parenthesis.
|
273
|
+
# The value `consistent` means that the indentation of the first key shall
|
274
|
+
# always be relative to the first position of the line where the opening
|
275
|
+
# brace is.
|
276
|
+
EnforcedStyle: special_inside_parentheses
|
277
|
+
SupportedStyles:
|
278
|
+
- special_inside_parentheses
|
279
|
+
- consistent
|
280
|
+
|
281
|
+
Style/LambdaCall:
|
282
|
+
EnforcedStyle: call
|
283
|
+
SupportedStyles:
|
284
|
+
- call
|
285
|
+
- braces
|
286
|
+
|
287
|
+
Style/Next:
|
288
|
+
# With `always` all conditions at the end of an iteration needs to be
|
289
|
+
# replaced by next - with `skip_modifier_ifs` the modifier if like this one
|
290
|
+
# are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
|
291
|
+
EnforcedStyle: skip_modifier_ifs
|
292
|
+
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
293
|
+
# needs to have to trigger this cop
|
294
|
+
MinBodyLength: 3
|
295
|
+
SupportedStyles:
|
296
|
+
- skip_modifier_ifs
|
297
|
+
- always
|
298
|
+
|
299
|
+
Style/NonNilCheck:
|
300
|
+
# With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
|
301
|
+
# `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
|
302
|
+
# **usually** OK, but might change behavior.
|
303
|
+
#
|
304
|
+
# With `IncludeSemanticChanges` set to `false`, this cop does not report
|
305
|
+
# offenses for `!x.nil?` and does no changes that might change behavior.
|
306
|
+
IncludeSemanticChanges: false
|
307
|
+
|
308
|
+
Style/MethodDefParentheses:
|
309
|
+
EnforcedStyle: require_parentheses
|
310
|
+
SupportedStyles:
|
311
|
+
- require_parentheses
|
312
|
+
- require_no_parentheses
|
313
|
+
|
314
|
+
Style/MethodName:
|
315
|
+
EnforcedStyle: snake_case
|
316
|
+
SupportedStyles:
|
317
|
+
- snake_case
|
318
|
+
- camelCase
|
319
|
+
|
320
|
+
Style/MultilineOperationIndentation:
|
321
|
+
EnforcedStyle: aligned
|
322
|
+
SupportedStyles:
|
323
|
+
- aligned
|
324
|
+
- indented
|
325
|
+
|
326
|
+
Style/NumericLiterals:
|
327
|
+
Enabled: false
|
328
|
+
|
329
|
+
# Allow safe assignment in conditions.
|
330
|
+
Style/ParenthesesAroundCondition:
|
331
|
+
AllowSafeAssignment: true
|
332
|
+
|
333
|
+
Style/PercentLiteralDelimiters:
|
334
|
+
PreferredDelimiters:
|
335
|
+
'%': ()
|
336
|
+
'%i': ()
|
337
|
+
'%q': ()
|
338
|
+
'%Q': ()
|
339
|
+
'%r': '{}'
|
340
|
+
'%s': ()
|
341
|
+
'%w': ()
|
342
|
+
'%W': ()
|
343
|
+
'%x': ()
|
344
|
+
|
345
|
+
Style/PercentQLiterals:
|
346
|
+
EnforcedStyle: lower_case_q
|
347
|
+
SupportedStyles:
|
348
|
+
- lower_case_q # Use %q when possible, %Q when necessary
|
349
|
+
- upper_case_q # Always use %Q
|
350
|
+
|
351
|
+
Style/PredicateName:
|
352
|
+
# Predicate name prefices.
|
353
|
+
NamePrefix:
|
354
|
+
- is_
|
355
|
+
- has_
|
356
|
+
- have_
|
357
|
+
# Predicate name prefices that should be removed.
|
358
|
+
NamePrefixBlacklist:
|
359
|
+
- is_
|
360
|
+
- has_
|
361
|
+
- have_
|
362
|
+
|
363
|
+
Style/RaiseArgs:
|
364
|
+
EnforcedStyle: exploded
|
365
|
+
SupportedStyles:
|
366
|
+
- compact # raise Exception.new(msg)
|
367
|
+
- exploded # raise Exception, msg
|
368
|
+
|
369
|
+
Style/RedundantReturn:
|
370
|
+
# When true allows code like `return x, y`.
|
371
|
+
AllowMultipleReturnValues: false
|
372
|
+
|
373
|
+
Style/RegexpLiteral:
|
374
|
+
# The maximum number of (escaped) slashes that a slash-delimited regexp is
|
375
|
+
# allowed to have. If there are more slashes, a %r regexp shall be used.
|
376
|
+
MaxSlashes: 1
|
377
|
+
|
378
|
+
Style/Semicolon:
|
379
|
+
# Allow ; to separate several expressions on the same line.
|
380
|
+
AllowAsExpressionSeparator: false
|
381
|
+
|
382
|
+
Style/SignalException:
|
383
|
+
EnforcedStyle: semantic
|
384
|
+
SupportedStyles:
|
385
|
+
- only_raise
|
386
|
+
- only_fail
|
387
|
+
- semantic
|
388
|
+
|
389
|
+
Style/SingleLineBlockParams:
|
390
|
+
Methods:
|
391
|
+
- reduce:
|
392
|
+
- a
|
393
|
+
- e
|
394
|
+
- inject:
|
395
|
+
- a
|
396
|
+
- e
|
397
|
+
|
398
|
+
Style/SingleLineMethods:
|
399
|
+
AllowIfMethodIsEmpty: true
|
400
|
+
|
401
|
+
Style/StringLiterals:
|
402
|
+
EnforcedStyle: double_quotes
|
403
|
+
SupportedStyles:
|
404
|
+
- single_quotes
|
405
|
+
- double_quotes
|
406
|
+
|
407
|
+
Style/StringLiteralsInInterpolation:
|
408
|
+
EnforcedStyle: double_quotes
|
409
|
+
SupportedStyles:
|
410
|
+
- single_quotes
|
411
|
+
- double_quotes
|
412
|
+
|
413
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
414
|
+
EnforcedStyle: space
|
415
|
+
SupportedStyles:
|
416
|
+
- space
|
417
|
+
- no_space
|
418
|
+
|
419
|
+
Style/SpaceBeforeBlockBraces:
|
420
|
+
EnforcedStyle: space
|
421
|
+
SupportedStyles:
|
422
|
+
- space
|
423
|
+
- no_space
|
424
|
+
|
425
|
+
Style/SpaceInsideBlockBraces:
|
426
|
+
EnforcedStyle: space
|
427
|
+
SupportedStyles:
|
428
|
+
- space
|
429
|
+
- no_space
|
430
|
+
# Valid values are: space, no_space
|
431
|
+
EnforcedStyleForEmptyBraces: no_space
|
432
|
+
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
|
433
|
+
SpaceBeforeBlockParameters: true
|
434
|
+
|
435
|
+
Style/SpaceInsideHashLiteralBraces:
|
436
|
+
EnforcedStyle: space
|
437
|
+
EnforcedStyleForEmptyBraces: no_space
|
438
|
+
SupportedStyles:
|
439
|
+
- space
|
440
|
+
- no_space
|
441
|
+
|
442
|
+
Style/SymbolProc:
|
443
|
+
# A list of method names to be ignored by the check.
|
444
|
+
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
445
|
+
IgnoredMethods:
|
446
|
+
- respond_to
|
447
|
+
|
448
|
+
Style/TrailingBlankLines:
|
449
|
+
EnforcedStyle: final_newline
|
450
|
+
SupportedStyles:
|
451
|
+
- final_newline
|
452
|
+
- final_blank_line
|
453
|
+
|
454
|
+
Style/TrailingCommaInArguments:
|
455
|
+
# If `comma`, the cop requires a comma after the last argument, but only for
|
456
|
+
# parenthesized method calls where each argument is on its own line.
|
457
|
+
# If `consistent_comma`, the cop requires a comma after the last argument,
|
458
|
+
# for all parenthesized method calls with arguments.
|
459
|
+
EnforcedStyleForMultiline: no_comma
|
460
|
+
SupportedStyles:
|
461
|
+
- comma
|
462
|
+
- consistent_comma
|
463
|
+
- no_comma
|
464
|
+
|
465
|
+
Style/TrailingCommaInLiteral:
|
466
|
+
# If `comma`, the cop requires a comma after the last item in an array or
|
467
|
+
# hash, but only when each item is on its own line.
|
468
|
+
# If `consistent_comma`, the cop requires a comma after the last item of all
|
469
|
+
# non-empty array and hash literals.
|
470
|
+
EnforcedStyleForMultiline: no_comma
|
471
|
+
SupportedStyles:
|
472
|
+
- comma
|
473
|
+
- consistent_comma
|
474
|
+
- no_comma
|
475
|
+
|
476
|
+
# TrivialAccessors doesn't require exact name matches and doesn't allow
|
477
|
+
# predicated methods by default.
|
478
|
+
Style/TrivialAccessors:
|
479
|
+
ExactNameMatch: false
|
480
|
+
AllowPredicates: false
|
481
|
+
# Allows trivial writers that don't end in an equal sign. e.g.
|
482
|
+
#
|
483
|
+
# def on_exception(action)
|
484
|
+
# @on_exception=action
|
485
|
+
# end
|
486
|
+
# on_exception :restart
|
487
|
+
#
|
488
|
+
# Commonly used in DSLs
|
489
|
+
AllowDSLWriters: false
|
490
|
+
Whitelist:
|
491
|
+
- to_ary
|
492
|
+
- to_a
|
493
|
+
- to_c
|
494
|
+
- to_enum
|
495
|
+
- to_h
|
496
|
+
- to_hash
|
497
|
+
- to_i
|
498
|
+
- to_int
|
499
|
+
- to_io
|
500
|
+
- to_open
|
501
|
+
- to_path
|
502
|
+
- to_proc
|
503
|
+
- to_r
|
504
|
+
- to_regexp
|
505
|
+
- to_str
|
506
|
+
- to_s
|
507
|
+
- to_sym
|
508
|
+
|
509
|
+
Style/VariableName:
|
510
|
+
EnforcedStyle: snake_case
|
511
|
+
SupportedStyles:
|
512
|
+
- snake_case
|
513
|
+
- camelCase
|
514
|
+
|
515
|
+
Style/WhileUntilModifier:
|
516
|
+
MaxLineLength: 80
|
517
|
+
|
518
|
+
Style/WordArray:
|
519
|
+
MinSize: 0
|
520
|
+
# The regular expression WordRegex decides what is considered a word.
|
521
|
+
WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
|
522
|
+
|
523
|
+
##################### Metrics ##################################
|
524
|
+
|
525
|
+
Metrics/AbcSize:
|
526
|
+
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
527
|
+
# a Float.
|
528
|
+
Max: 20
|
529
|
+
|
530
|
+
Metrics/BlockNesting:
|
531
|
+
Max: 3
|
532
|
+
|
533
|
+
Metrics/ClassLength:
|
534
|
+
CountComments: false # count full line comments?
|
535
|
+
Max: 100
|
536
|
+
|
537
|
+
# Avoid complex methods.
|
538
|
+
Metrics/CyclomaticComplexity:
|
539
|
+
Max: 6
|
540
|
+
|
541
|
+
Metrics/LineLength:
|
542
|
+
Max: 80
|
543
|
+
AllowURI: true
|
544
|
+
URISchemes:
|
545
|
+
- http
|
546
|
+
- https
|
547
|
+
|
548
|
+
Metrics/MethodLength:
|
549
|
+
CountComments: false # count full line comments?
|
550
|
+
Max: 20
|
551
|
+
|
552
|
+
Metrics/ParameterLists:
|
553
|
+
Max: 5
|
554
|
+
CountKeywordArgs: true
|
555
|
+
|
556
|
+
Metrics/PerceivedComplexity:
|
557
|
+
Max: 7
|
558
|
+
|
559
|
+
##################### Lint ##################################
|
560
|
+
|
561
|
+
# Allow safe assignment in conditions.
|
562
|
+
Lint/AssignmentInCondition:
|
563
|
+
AllowSafeAssignment: true
|
564
|
+
|
565
|
+
# Align ends correctly.
|
566
|
+
Lint/EndAlignment:
|
567
|
+
# The value `keyword` means that `end` should be aligned with the matching
|
568
|
+
# keyword (if, while, etc.).
|
569
|
+
# The value `variable` means that in assignments, `end` should be aligned
|
570
|
+
# with the start of the variable on the left hand side of `=`. In all other
|
571
|
+
# situations, `end` should still be aligned with the keyword.
|
572
|
+
AlignWith: keyword
|
573
|
+
SupportedStyles:
|
574
|
+
- keyword
|
575
|
+
- variable
|
576
|
+
|
577
|
+
Lint/DefEndAlignment:
|
578
|
+
# The value `def` means that `end` should be aligned with the def keyword.
|
579
|
+
# The value `start_of_line` means that `end` should be aligned with method
|
580
|
+
# calls like `private`, `public`, etc, if present in front of the `def`
|
581
|
+
# keyword on the same line.
|
582
|
+
AlignWith: start_of_line
|
583
|
+
SupportedStyles:
|
584
|
+
- start_of_line
|
585
|
+
- def
|
586
|
+
|
587
|
+
##################### Rails ##################################
|
588
|
+
|
589
|
+
Rails/ActionFilter:
|
590
|
+
EnforcedStyle: action
|
591
|
+
SupportedStyles:
|
592
|
+
- action
|
593
|
+
- filter
|
594
|
+
Include:
|
595
|
+
- app/controllers/**/*.rb
|
596
|
+
|
597
|
+
Rails/HasAndBelongsToMany:
|
598
|
+
Include:
|
599
|
+
- app/models/**/*.rb
|
600
|
+
|
601
|
+
Rails/Output:
|
602
|
+
Include:
|
603
|
+
- app/**/*.rb
|
604
|
+
- config/**/*.rb
|
605
|
+
- db/**/*.rb
|
606
|
+
- lib/**/*.rb
|
607
|
+
|
608
|
+
Rails/ReadWriteAttribute:
|
609
|
+
Include:
|
610
|
+
- app/models/**/*.rb
|
611
|
+
|
612
|
+
Rails/ScopeArgs:
|
613
|
+
Include:
|
614
|
+
- app/models/**/*.rb
|
615
|
+
|
616
|
+
Rails/Validation:
|
617
|
+
Include:
|
618
|
+
- app/models/**/*.rb
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gatemedia_rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Colon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- bin/console
|
54
54
|
- bin/setup
|
55
|
+
- config/.rubocop.2.3.yml
|
55
56
|
- config/.rubocop.yml
|
56
57
|
- gatemedia_rubocop.gemspec
|
57
58
|
- lib/gatemedia_rubocop.rb
|