forked from zuzannast/swagger_ui_engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
194 lines (142 loc) · 3.88 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- !ruby/regexp /(vendor|bundle|bin|db)\/.*/
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.4
TargetRailsVersion: 4.2
# https://github.com/bbatsov/rubocop/blob/master/manual/caching.md
# https://github.com/bbatsov/rubocop/blob/e8680418b351491e111a18cf5b453fc07a3c5239/config/default.yml#L60-L77
UseCache: true
CacheRootDirectory: tmp
Rails:
Enabled: true
Style/NumericPredicate:
Enabled: false
# Rubocop options don't align with code-style, which allows alias.
# https://github.com/bbatsov/ruby-style-guide/pull/383
# https://github.com/bbatsov/rubocop/issues/1460
# see https://github.com/bbatsov/ruby-style-guide#alias-method-lexically
# vs. https://github.com/bbatsov/ruby-style-guide#alias-method
Style/Alias:
Enabled: false
Style/SingleLineBlockParams:
Enabled: false
# SupportedStyles: line_count_based, semantic, braces_for_chaining
Style/BlockDelimiters:
Enabled: true
EnforcedStyle: line_count_based
Style/MissingElse:
Enabled: true
EnforcedStyle: case
Style/EmptyElse:
EnforcedStyle: empty
Lint/BlockAlignment:
Enabled: true
EnforcedStyleAlignWith: either
Lint/EndAlignment:
Enabled: true
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: no_comma
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%': '{}'
'%i': ()
'%q': ()
'%Q': ()
'%r': '{}'
'%s': ()
'%w': ()
'%W': ()
'%x': ()
Style/StringLiterals:
# EnforcedStyle: single_quotes
Enabled: false
Style/StringLiteralsInInterpolation:
# EnforcedStyle: single_quotes
Enabled: false
Style/RegexpLiteral:
Enabled: false
Lint/AssignmentInCondition:
# AllowSafeAssignment: true
# accepts = in condition surrounded with braces, e.g. if (test = 10)
# accepts []= in condition surrounded with braces, e.g. if (test[0] = 10)
Enabled: true
Style/VariableNumber:
Enabled: false
Rails/HttpPositionalArguments:
Enabled: false
Rails/Blank:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Layout/IndentArray:
EnforcedStyle: consistent
Layout/SpaceInLambdaLiteral:
EnforcedStyle: require_no_space
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
Enabled: true
Layout/AlignHash:
EnforcedHashRocketStyle: key
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: ignore_implicit
Layout/IndentHash:
EnforcedStyle: consistent
Layout/IndentationWidth:
Width: 2
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Layout/ClosingParenthesisIndentation:
Enabled: false
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Layout/FirstParameterIndentation:
EnforcedStyle: special_for_inner_method_call_in_parentheses
Layout/ExtraSpacing:
Enabled: true
Layout/SpaceAfterColon:
Enabled: true
Layout/SpaceAfterComma:
Enabled: true
Layout/SpaceAfterNot:
Enabled: true
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
Layout/SpaceBeforeBlockBraces:
Enabled: false
# EnforcedStyle: space
Layout/SpaceInsideBlockBraces:
EnforcedStyle: space
EnforcedStyleForEmptyBraces: no_space
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
SpaceBeforeBlockParameters: true
Layout/SpaceInsideBrackets:
Enabled: true
Layout/SpaceInsideParens:
Enabled: true
Layout/EmptyLines:
Enabled: true
Layout/EmptyLinesAroundAccessModifier:
Enabled: true
Layout/EmptyLinesAroundBlockBody:
EnforcedStyle: no_empty_lines
Layout/EmptyLinesAroundClassBody:
EnforcedStyle: no_empty_lines
Layout/EmptyLinesAroundModuleBody:
EnforcedStyle: no_empty_lines
Layout/EmptyLinesAroundMethodBody:
Enabled: true
Layout/EmptyLineBetweenDefs:
Enabled: true
Layout/LeadingCommentSpace:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true