-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
152 lines (113 loc) · 2.41 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Metrics/LineLength:
Max: 250
Metrics/MethodLength:
Max: 20
Exclude:
- "config/**/*.rb"
- "db/migrate/*.rb"
Metrics/ClassLength:
Max: 1000
Metrics/ModuleLength:
Exclude:
- "**/*_spec.rb"
- "config/**/*.rb"
Metrics/BlockLength:
Exclude:
- "**/*_test.rb"
- "**/*.rake"
- "**/*_spec.rb"
- "config/**/*.rb"
- "db/migrate/*.rb"
- "db/schema.rb"
- "spec/factories/**/*.rb"
- "app/admin/*.rb"
- "app/admin/**/*.rb"
Layout/SpaceAroundEqualsInParameterDefault:
Exclude:
- "config/**/*.rb"
- "db/migrate/*.rb"
EnforcedStyle: no_space
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/SymbolArray:
Enabled: true
Layout/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/FormatString:
EnforcedStyle: percent
Style/CollectionMethods:
Enabled: true
PreferredMethods:
reduce: "inject"
Style/ParenthesesAroundCondition:
AllowSafeAssignment: false
Lint/AssignmentInCondition:
AllowSafeAssignment: true
Style/RaiseArgs:
Enabled: false
Layout/MultilineOperationIndentation:
Enabled: false
Style/SignalException:
EnforcedStyle: only_raise
Lint/HandleExceptions:
Enabled: false
Layout/SpaceInsideBlockBraces:
SpaceBeforeBlockParameters: false
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Style/BlockDelimiters:
Enabled: false
Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/SingleLineBlockParams:
Enabled: false
Lint/ShadowingOuterLocalVariable:
Enabled: true
# Check with yard instead.
Style/Documentation:
Enabled: false
Naming/BinaryOperatorParameterName:
Enabled: false
Lint/Debugger:
Enabled: true
Style/MethodDefParentheses:
Enabled: false
Style/DoubleNegation:
Enabled: false
Metrics/CyclomaticComplexity:
Max: 11
Severity: warning
Metrics/PerceivedComplexity:
Max: 11
Severity: warning
Metrics/AbcSize:
Max: 35
Severity: warning
Exclude:
- "config/**/*.rb"
- "db/migrate/*.rb"
Style/RegexpLiteral:
EnforcedStyle: "slashes"
Layout/IndentationConsistency:
Severity: error
Rails:
Enabled: true
Rails/Blank:
Exclude:
- "bin/*"
Rails/SkipsModelValidations:
Exclude:
- "db/migrate/*"
AllCops:
TargetRubyVersion: 2.4
Exclude:
- "tmp/**/*"
- ".bundle/**/*"
- "vendor/**/*"
- "log/**/*"
- "node_modules/**/*"
- "db/schema.rb"
- "lib/schemas/**/*"