1
- # This is rubocop configuration file for Sun-Asterisk' s coding style. Enabling and disabling is configured
1
+ # This is rubocop configuration file for Sun-Asterisk" s coding style. Enabling and disabling is configured
2
2
# in separate files. This file adds all other parameters apart from Enabled.
3
3
4
4
# Add this to load Rails extension for rubocop
@@ -9,29 +9,52 @@ inherit_from:
9
9
- .rubocop_enabled.yml
10
10
- .rubocop_disabled.yml
11
11
12
+ Style/StringLiterals :
13
+ EnforcedStyle : double_quotes
14
+ SupportedStyles :
15
+ - single_quotes
16
+ - double_quotes
17
+
18
+ Layout/TrailingEmptyLines :
19
+ Enabled : true
20
+
21
+ Layout/EmptyLineBetweenDefs :
22
+ Enabled : true
23
+
24
+ Style/PercentLiteralDelimiters :
25
+ PreferredDelimiters :
26
+ default : ()
27
+ w : ()
28
+ i : ()
29
+
30
+ Style/WordArray :
31
+ Enabled : true
32
+ Style/SymbolArray :
33
+ Enabled : true
34
+
12
35
# Common configuration.
13
36
AllCops :
14
37
# Include gemspec and Rakefile
15
38
SuggestExtensions : false
16
39
Include :
17
- - ' app/**/*'
18
- - ' lib/**/*'
19
- - ' **/*.gemspec'
20
- - ' Gemfile'
40
+ - " app/**/*"
41
+ - " lib/**/*"
42
+ - " **/*.gemspec"
43
+ - " Gemfile"
21
44
Exclude :
22
- - ' vendor/**/*'
23
- - ' config/unicorn.rb'
24
- - ' bin/*'
25
- - ' db/**/*'
26
- - ' spec/**/*'
27
- - ' script/rails'
28
- - ' config/**/*'
29
- - ' app/views/**/*'
30
- - ' app/assets/**/*'
31
- - ' app/javascript/**/*'
32
- - ' .idea/**/*'
33
- - ' **/.DS_Store'
34
- - ' **/.keep'
45
+ - " vendor/**/*"
46
+ - " config/unicorn.rb"
47
+ - " bin/*"
48
+ - " db/**/*"
49
+ - " spec/**/*"
50
+ - " script/rails"
51
+ - " config/**/*"
52
+ - " app/views/**/*"
53
+ - " app/assets/**/*"
54
+ - " app/javascript/**/*"
55
+ - " .idea/**/*"
56
+ - " **/.DS_Store"
57
+ - " **/.keep"
35
58
36
59
# Indent private/protected/public as deep as method definitions
37
60
Layout/AccessModifierIndentation :
@@ -45,14 +68,14 @@ Layout/HashAlignment:
45
68
# Alignment of entries using hash rocket as separator. Valid values are:
46
69
#
47
70
# key - left alignment of keys
48
- # 'a' => 2
49
- # 'bb' => 3
71
+ # "a" => 2
72
+ # "bb" => 3
50
73
# separator - alignment of hash rockets, keys are right aligned
51
- # 'a' => 2
52
- # 'bb' => 3
74
+ # "a" => 2
75
+ # "bb" => 3
53
76
# table - left alignment of keys, hash rockets, and values
54
- # 'a' => 2
55
- # 'bb' => 3
77
+ # "a" => 2
78
+ # "bb" => 3
56
79
EnforcedHashRocketStyle : key
57
80
# Alignment of entries using colon as separator. Valid values are:
58
81
#
@@ -179,11 +202,11 @@ Style/CollectionMethods:
179
202
# PreferredMethods:
180
203
# find: detect
181
204
PreferredMethods :
182
- collect : ' map'
183
- collect! : ' map!'
184
- inject : ' reduce'
185
- detect : ' find'
186
- find_all : ' select'
205
+ collect : " map"
206
+ collect! : " map!"
207
+ inject : " reduce"
208
+ detect : " find"
209
+ find_all : " select"
187
210
188
211
# Checks formatting of special comments
189
212
Style/CommentAnnotation :
@@ -207,7 +230,7 @@ Layout/DotPosition:
207
230
208
231
# Use empty lines between defs.
209
232
Layout/EmptyLineBetweenDefs :
210
- # If true, this parameter means that single line method definitions don' t
233
+ # If true, this parameter means that single line method definitions don" t
211
234
# need an empty line between them.
212
235
AllowAdjacentOneLineDefs : false
213
236
@@ -228,9 +251,9 @@ Layout/EmptyLinesAroundModuleBody:
228
251
229
252
Naming/FileName :
230
253
Exclude :
231
- - ' **/Rakefile'
232
- - ' **/Gemfile'
233
- - ' **/Capfile'
254
+ - " **/Rakefile"
255
+ - " **/Gemfile"
256
+ - " **/Capfile"
234
257
235
258
# Checks use of for or each in multiline loops.
236
259
Style/For :
@@ -282,7 +305,7 @@ Style/LambdaCall:
282
305
- call
283
306
- braces
284
307
285
- Metrics /LineLength :
308
+ Layout /LineLength :
286
309
Max : 80
287
310
AllowURI : true
288
311
Exclude :
@@ -292,7 +315,7 @@ Metrics/LineLength:
292
315
Style/Next :
293
316
# With `always` all conditions at the end of an iteration needs to be
294
317
# replace by next - with `skip_modifier_ifs` the modifier if like this one
295
- # are ignored: [1, 2].each { |a| return ' yes' if a == 1 }
318
+ # are ignored: [1, 2].each { |a| return " yes" if a == 1 }
296
319
EnforcedStyle : skip_modifier_ifs
297
320
SupportedStyles :
298
321
- skip_modifier_ifs
@@ -336,15 +359,15 @@ Style/ParenthesesAroundCondition:
336
359
337
360
Style/PercentLiteralDelimiters :
338
361
PreferredDelimiters :
339
- ' % ' : ()
340
- ' %i ' : ()
341
- ' %q ' : ()
342
- ' %Q ' : ()
343
- ' %r ' : ' {} '
344
- ' %s ' : ()
345
- ' %w ' : ()
346
- ' %W ' : ()
347
- ' %x ' : ()
362
+ " % " : ()
363
+ " %i " : ()
364
+ " %q " : ()
365
+ " %Q " : ()
366
+ " %r " : " {} "
367
+ " %s " : ()
368
+ " %w " : ()
369
+ " %W " : ()
370
+ " %x " : ()
348
371
349
372
Naming/PredicateName :
350
373
ForbiddenPrefixes :
@@ -464,12 +487,12 @@ Style/TrailingCommaInHashLiteral:
464
487
- consistent_comma
465
488
- no_comma
466
489
467
- # TrivialAccessors doesn' t require exact name matches and doesn' t allow
490
+ # TrivialAccessors doesn" t require exact name matches and doesn" t allow
468
491
# predicated methods by default.
469
492
Style/TrivialAccessors :
470
493
ExactNameMatch : false
471
494
AllowPredicates : false
472
- # Allows trivial writers that don' t end in an equal sign. e.g.
495
+ # Allows trivial writers that don" t end in an equal sign. e.g.
473
496
#
474
497
# def on_exception(action)
475
498
# @on_exception=action
0 commit comments