-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop-http---s3-amazonaws-com-openstudio-resources-styles-rubocop-v4-yml
239 lines (188 loc) · 5.63 KB
/
.rubocop-http---s3-amazonaws-com-openstudio-resources-styles-rubocop-v4-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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# Define the error reporting for each category
Layout:
Severity: error
Lint:
Severity: error
Metrics:
Severity: error
Naming:
Severity: warning
Style:
Severity: error
# ==================== Linters ====================
Lint/AmbiguousOperator:
Enabled: true
# Allow empty when branches to give
# a space to clearly document the
# reason that nothing is happening.
Lint/EmptyWhen:
Enabled: false
Lint/ParenthesesAsGroupedExpression:
Enabled: true
Lint/RequireParentheses:
Enabled: true
# NL 2020-05-03: Allow catching StandardError
# TC renamed from Lint/HandleExceptions to Lint/SuppressedException for v4 style
Lint/SuppressedException:
Enabled: false
Lint/UnreachableCode:
Enabled: false
# Allow variable initialization to indicate
# what variable is going to be set by the next
# block of code.
Lint/UselessAssignment:
Enabled: false
Lint/UnusedBlockArgument:
Description: 'Checks for unused block arguments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
Enabled: false
Lint/UnusedMethodArgument:
Description: 'Checks for unused method arguments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
Enabled: false
# ==================== Metrics ====================
# NL 2020-05-03: Drastically increase the length of assignment branch condition
Metrics/AbcSize:
Max: 250
Severity: warning
Metrics/BlockNesting:
Max: 5
# NL 2020-05-03: Quintuple the length of allowable blocks
Metrics/BlockLength:
Max: 250
Severity: warning
Metrics/ClassLength:
Max: 500
CountComments: false
Severity: warning
# NL 2020-05-03: Increase the allowable cyclomatic complexity
Metrics/CyclomaticComplexity:
Max: 100
Severity: warning
# Allow long lines to encourage sufficiently
# detailed user-facing log messages.
Layout/LineLength:
Max: 1200
Severity: warning
Metrics/MethodLength:
Max: 350
CountComments: false
Severity: warning
Metrics/ModuleLength:
Max: 500
CountComments: false
Severity: warning
# Longer parameter list limits for methods that
# add HVAC systems
Metrics/ParameterLists:
Max: 15
Severity: warning
# NL 2020-05-03: increase tolerance
Metrics/PerceivedComplexity:
Max: 100
Severity: warning
# ==================== Performance ====================
# NL 2020-05-03: match -> match? or =~ -> match? breaks certain OpenStudio measures.
Performance/RegexpMatch:
Enabled: false
# NL 2020-05-03: Allow gsub (instead of the preferred tr)
Performance/StringReplacement:
Enabled: false
# ==================== Styles ====================
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/ClassAndModuleChildren:
Enabled: false
Style/ClassVars:
Enabled: false
# Allow this syntax -- do not autocorrect.
# a = if true
# 1
# else
# 2
# end
Style/ConditionalAssignment:
Enabled: false
# Documentation will be covered by YARD.
Style/Documentation:
Enabled: false
Style/EachWithObject:
Enabled: false
# Allow for i in 0..3 loops
Style/For:
Enabled: false
# NL 2020-05-08: Do not add the frozen_string_literal: true to the top of the files.
Style/FrozenStringLiteralComment:
Enabled: false
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Enabled: false
# Disabled because in most of this codebase, the current approach is more readable.
Style/GuardClause:
Enabled: false
# Allow duplication inside conditional branches to keep
# code that does certain tasks more consolidated.
Style/IdenticalConditionalBranches:
Enabled: false
# Allow this type of nesting for logic clarity.
Style/IfInsideElse:
Enabled: false
# Do not force people to use one-line if statements.
Style/IfUnlessModifier:
Enabled: false
# Allow multiple comparisons via || for clarity
Style/MultipleComparison:
Enabled: false
# Allow negatives
# https://rubocop.readthedocs.io/en/latest/cops_style/#stylenegatedif
Style/NegatedIf:
Enabled: false
# Do not force people to use Next.
Style/Next:
Enabled: false
# Do not convert 10000 to 10_000
Style/NumericLiterals:
Description: 'Add underscores to large numeric literals to improve readability.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
Enabled: false
Style/NumericPredicate:
Description: 'Do not force using .zero?'
Enabled: false
# encourage explicit returns for clarity
Style/RedundantReturn:
Description: 'Do not use return where it is not required.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
Enabled: false
# Do NOT use &. for Safe Navigation
Style/SafeNavigation:
Enabled: false
# Do NOT enable this because it appears $? is different than $CHILD_STATUS.
Style/SpecialGlobalVars:
Enabled: false
# Do not use %w, %W, %i, etc
# Prefer [:a, :b, :c] over %i[a b c]
Style/SymbolArray:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
EnforcedStyle: brackets
# Do not use %w, %W, %i, etc
# Prefer ['a', 'b', 'c'] over %w[a b c]
Style/WordArray:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
EnforcedStyle: brackets
# ==================== Naming ====================
# Intentionally allow set_foo because these methods do not
# have corresponding getters.
Naming/AccessorMethodName:
Enabled: false
# Allow variables like coeff_1 for legibility
Naming/VariableNumber:
Enabled: false
# ==================== Layout ====================
Layout/BlockAlignment:
Enabled: true
# Need to allow indented case statements
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
Layout/CaseIndentation:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: aligned
Enabled: true