-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrubocop.yml
87 lines (67 loc) · 1.85 KB
/
rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
require: rubocop-rails
# Accept single-line methods with no body
Style/SingleLineMethods:
AllowIfMethodIsEmpty: true
# Top-level documentation of classes and modules are needless
Style/Documentation:
Enabled: false
# Allow to chain of block after another block that spans multiple lines
Style/MultilineBlockChain:
Enabled: false
# Allow `->` literal for multi line blocks
Style/Lambda:
Enabled: false
# Both nested and compact are okay
Style/ClassAndModuleChildren:
Enabled: false
# Specifying param names is unnecessary
Style/SingleLineBlockParams:
Enabled: false
# Prefer Kernel#sprintf
Style/FormatString:
EnforcedStyle: sprintf
# Maximum method length
Metrics/MethodLength:
Max: 20
# Tune to MethodLength
Metrics/AbcSize:
Max: 30
# Tune to MethodLength
Metrics/ClassLength:
Max: 200
# Maximum line length
Layout/LineLength:
Max: 100
# Allow `has_` as prefix of predicate methods
Naming/PredicateName:
ForbiddenPrefixes:
- is_
- have_
# Prefer double_quotes strings unless your string literal contains escape chars
Style/StringLiterals:
EnforcedStyle: double_quotes
# Prefer raise over fail for exceptions
Style/SignalException:
EnforcedStyle: only_raise
# Allow empty condition in case statements
Style/EmptyCaseCondition:
Enabled: false
# Prefer trailing comma in argument lists
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
# Prefer trailing comma in array literals
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
# Prefer trailing comma in hash literals
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
# Prefer parentheses for almost all percent literals
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '()'
'%I': '()'
'%w': '()'
'%W': '()'
# Prefer `has_?` style for Hash methods
Style/PreferredHashMethods:
EnforcedStyle: verbose