-
Notifications
You must be signed in to change notification settings - Fork 17
/
.rubocop.yml
167 lines (121 loc) · 2.54 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
AllCops:
# All style checks are off by default, must be manually enabled
DisabledByDefault: true
# Include common Ruby source files.
Include:
- '**/*.rake'
- '**/config.ru'
- '**/Gemfile'
- '**/Rakefile'
- '**/Capfile'
Exclude:
- 'vendor/**/*'
- 'db/migrate/*'
- 'db/schema.rb'
- 'app/views/forem'
Style/AccessModifierIndentation:
EnforcedStyle: indent
SupportedStyles:
- outdent
- indent
Style/AlignArray:
Enabled: true
Style/AlignHash:
Enabled: true
Style/AndOr:
Enabled: true
EnforcedStyle: conditionals
Style/ClassAndModuleCamelCase:
Enabled: true
Style/ConstantName:
Enabled: true
Style/DeprecatedHashMethods:
Enabled: true
Style/ElseAlignment:
Enabled: true
Style/EmptyLineBetweenDefs:
Enabled: true
Style/EmptyLines:
Enabled: true
Style/EndOfLine:
Enabled: true
Style/ExtraSpacing:
Enabled: true
Style/FileName:
Enabled: true
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Enabled: true
Exclude:
- 'config/routes.rb'
Style/IndentationConsistency:
Enabled: true
EnforcedStyle: normal
Style/IndentationWidth:
Enabled: true
Width: 2
Style/MethodName:
Enabled: true
EnforcedStyle: snake_case
Style/NilComparison:
Enabled: true
Style/RescueEnsureAlignment:
Enabled: true
Style/SingleLineMethods:
Enabled: true
AllowIfMethodIsEmpty: true
Style/SpaceBeforeFirstArg:
Enabled: true
Style/SpaceAfterColon:
Enabled: true
Style/SpaceAfterComma:
Enabled: true
Style/SpaceAroundKeyword:
Enabled: true
Style/SpaceAfterMethodName:
Enabled: true
Style/SpaceAfterSemicolon:
Enabled: true
Style/SpaceBeforeBlockBraces:
Enabled: true
EnforcedStyle: space
Style/SpaceBeforeComma:
Enabled: true
Style/SpaceInsideBlockBraces:
Enabled: true
EnforcedStyle: space
EnforcedStyleForEmptyBraces: space
SpaceBeforeBlockParameters: false
Style/SpaceAroundOperators:
Enabled: true
Style/Tab:
Enabled: true
Style/TrailingBlankLines:
Enabled: true
EnforcedStyle: final_newline
Style/TrailingWhitespace:
Enabled: true
Style/VariableName:
Enabled: true
EnforcedStyle: snake_case
Lint/Debugger:
Enabled: true
# Allow safe assignment in conditions.
Lint/AssignmentInCondition:
AllowSafeAssignment: true
Lint/DeprecatedClassMethods:
Enabled: true
Lint/DuplicateMethods:
Enabled: true
Lint/DuplicatedKey:
Enabled: true
Lint/Eval:
Enabled: true
Lint/FormatParameterMismatch:
Enabled: true
Lint/NestedMethodDefinition:
Enabled: true
Lint/RescueException:
Enabled: true
Lint/UnreachableCode:
Enabled: true