Skip to content

Commit 3068131

Browse files
petergoldsteinpirj
authored andcommitted
This updates Rubocop and uses the .rubocop_rspec_base.yml for consistency
1 parent 8f449ab commit 3068131

17 files changed

+723
-467
lines changed

.rubocop.yml

+31-388
Large diffs are not rendered by default.

.rubocop_rspec_base.yml

+316
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,316 @@
1+
# This file was generated on 2022-01-10T22:24:10+00:00 from the rspec-dev repo.
2+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3+
4+
# This file contains defaults for RSpec projects. Individual projects
5+
# can customize by inheriting this file and overriding particular settings.
6+
7+
Layout/AccessModifierIndentation:
8+
Enabled: false
9+
10+
# "Use alias_method instead of alias"
11+
# We're fine with `alias`.
12+
Style/Alias:
13+
Enabled: false
14+
15+
# "Avoid the use of the case equality operator ==="
16+
# We prefer using `Class#===` over `Object#is_a?` because `Class#===`
17+
# is less likely to be monkey patched than `is_a?` on a user object.
18+
Style/CaseEquality:
19+
Enabled: false
20+
21+
# Warns when the class is excessively long.
22+
Metrics/ClassLength:
23+
Max: 100
24+
25+
Style/CollectionMethods:
26+
PreferredMethods:
27+
reduce: 'inject'
28+
29+
# Over time we'd like to get this down, but this is what we're at now.
30+
Metrics/CyclomaticComplexity:
31+
Max: 10
32+
33+
# We use YARD to enforce documentation. It works better than rubocop's
34+
# enforcement...rubocop complains about the places we re-open
35+
# `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments.
36+
Style/Documentation:
37+
Enabled: false
38+
39+
# We still support 1.8.7 which requires trailing dots
40+
Layout/DotPosition:
41+
EnforcedStyle: trailing
42+
43+
Style/DoubleNegation:
44+
Enabled: false
45+
46+
# each_with_object is unavailable on 1.8.7 so we have to disable this one.
47+
Style/EachWithObject:
48+
Enabled: false
49+
50+
Style/FormatString:
51+
EnforcedStyle: percent
52+
53+
# As long as we support ruby 1.8.7 we have to use hash rockets.
54+
Style/HashSyntax:
55+
EnforcedStyle: hash_rockets
56+
57+
# We can't use the new lambda syntax, since we still support 1.8.7.
58+
Style/Lambda:
59+
Enabled: false
60+
61+
# Over time we'd like to get this down, but this is what we're at now.
62+
Layout/LineLength:
63+
Max: 100
64+
65+
# Over time we'd like to get this down, but this is what we're at now.
66+
Metrics/MethodLength:
67+
Max: 15
68+
69+
# Who cares what we call the argument for binary operator methods?
70+
Naming/BinaryOperatorParameterName:
71+
Enabled: false
72+
73+
Style/PercentLiteralDelimiters:
74+
PreferredDelimiters:
75+
'%': () # double-quoted string
76+
'%i': '[]' # array of symbols
77+
'%q': () # single-quoted string
78+
'%Q': () # double-quoted string
79+
'%r': '{}' # regular expression pattern
80+
'%s': () # a symbol
81+
'%w': '[]' # array of single-quoted strings
82+
'%W': '[]' # array of double-quoted strings
83+
'%x': () # a shell command as a string
84+
85+
# We have too many special cases where we allow generator methods or prefer a
86+
# prefixed predicate due to it's improved readability.
87+
Naming/PredicateName:
88+
Enabled: false
89+
90+
# On 1.8 `proc` is `lambda`, so we use `Proc.new` to ensure we get real procs on all supported versions.
91+
# http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/
92+
Style/Proc:
93+
Enabled: false
94+
95+
# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue`
96+
Lint/RescueException:
97+
Enabled: true
98+
99+
# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention.
100+
Style/SignalException:
101+
Enabled: false
102+
103+
# We've tended to use no space, so it's less of a change to stick with that.
104+
Layout/SpaceAroundEqualsInParameterDefault:
105+
EnforcedStyle: no_space
106+
107+
# We don't care about single vs double qoutes.
108+
Style/StringLiterals:
109+
Enabled: false
110+
111+
# This rule favors constant names from the English standard library which we don't load.
112+
Style/SpecialGlobalVars:
113+
Enabled: false
114+
115+
Style/TrailingCommaInArrayLiteral:
116+
Enabled: false
117+
118+
Style/TrailingCommaInHashLiteral:
119+
Enabled: false
120+
121+
Style/TrailingCommaInArguments:
122+
Enabled: false
123+
124+
Style/TrivialAccessors:
125+
AllowDSLWriters: true
126+
AllowPredicates: true
127+
ExactNameMatch: true
128+
129+
Style/ParallelAssignment:
130+
Enabled: false
131+
132+
Layout/EmptyLineBetweenDefs:
133+
Enabled: false
134+
135+
Layout/FirstParameterIndentation:
136+
Enabled: false
137+
138+
Layout/ParameterAlignment:
139+
EnforcedStyle: with_first_parameter
140+
141+
Layout/SpaceInsideBlockBraces:
142+
Enabled: false
143+
144+
Layout/SpaceInsideParens:
145+
Enabled: false
146+
147+
Naming/ConstantName:
148+
Enabled: false
149+
150+
Style/ClassCheck:
151+
Enabled: false
152+
153+
Style/ConditionalAssignment:
154+
Enabled: false
155+
156+
Style/EmptyMethod:
157+
Enabled: false
158+
159+
Style/FormatStringToken:
160+
Enabled: false
161+
162+
Style/GuardClause:
163+
Enabled: false
164+
165+
Style/IdenticalConditionalBranches:
166+
Enabled: false
167+
168+
Style/IfUnlessModifier:
169+
Enabled: false
170+
171+
Style/IfUnlessModifierOfIfUnless:
172+
Enabled: false
173+
174+
Lint/MissingSuper:
175+
Enabled: false
176+
177+
Style/MissingRespondToMissing:
178+
Enabled: false
179+
180+
Style/MixinUsage:
181+
Enabled: false
182+
183+
Style/MultipleComparison:
184+
Enabled: false
185+
186+
Style/MutableConstant:
187+
Enabled: false
188+
189+
Style/NestedModifier:
190+
Enabled: false
191+
192+
Style/NestedParenthesizedCalls:
193+
Enabled: false
194+
195+
Style/NumericPredicate:
196+
Enabled: false
197+
198+
Style/RedundantParentheses:
199+
Enabled: false
200+
201+
Style/StringLiteralsInInterpolation:
202+
Enabled: false
203+
204+
Style/SymbolArray:
205+
Enabled: false
206+
207+
Style/SymbolProc:
208+
Enabled: false
209+
210+
Style/YodaCondition:
211+
Enabled: false
212+
213+
Style/ZeroLengthPredicate:
214+
Enabled: false
215+
216+
Layout/ClosingParenthesisIndentation:
217+
Enabled: false
218+
219+
Layout/ExtraSpacing:
220+
Enabled: false
221+
222+
Layout/MultilineMethodCallBraceLayout:
223+
Enabled: false
224+
225+
Layout/MultilineMethodCallIndentation:
226+
Enabled: false
227+
228+
Layout/MultilineOperationIndentation:
229+
Enabled: false
230+
231+
Layout/SpaceAroundBlockParameters:
232+
Enabled: false
233+
234+
Layout/SpaceAroundOperators:
235+
Enabled: false
236+
237+
Layout/SpaceBeforeComma:
238+
Enabled: false
239+
240+
Style/BlockDelimiters:
241+
Enabled: false
242+
243+
Style/EmptyCaseCondition:
244+
Enabled: false
245+
246+
Style/MultilineIfModifier:
247+
Enabled: false
248+
249+
Style/RescueStandardError:
250+
Enabled: false
251+
252+
Style/StderrPuts:
253+
Enabled: false
254+
255+
Style/TernaryParentheses:
256+
Enabled: false
257+
258+
Naming/HeredocDelimiterNaming:
259+
Enabled: false
260+
261+
Layout/AssignmentIndentation:
262+
Enabled: false
263+
264+
Layout/EmptyLineAfterMagicComment:
265+
Enabled: false
266+
267+
Layout/FirstArrayElementIndentation:
268+
Enabled: false
269+
270+
Layout/HeredocIndentation:
271+
Enabled: false
272+
273+
Layout/SpaceInsidePercentLiteralDelimiters:
274+
Enabled: false
275+
276+
Style/EmptyElse:
277+
Enabled: false
278+
279+
Style/IfInsideElse:
280+
Enabled: false
281+
282+
Style/RedundantReturn:
283+
Enabled: false
284+
285+
Style/StructInheritance:
286+
Enabled: false
287+
288+
Naming/VariableNumber:
289+
Enabled: false
290+
291+
Layout/SpaceInsideStringInterpolation:
292+
Enabled: false
293+
294+
Style/DateTime:
295+
Enabled: false
296+
297+
Style/ParenthesesAroundCondition:
298+
Enabled: false
299+
300+
Layout/EmptyLinesAroundBlockBody:
301+
Enabled: false
302+
303+
Lint/ImplicitStringConcatenation:
304+
Enabled: false
305+
306+
Lint/NestedMethodDefinition:
307+
Enabled: false
308+
309+
Style/RegexpLiteral:
310+
Enabled: false
311+
312+
Style/TrailingUnderscoreVariable:
313+
Enabled: false
314+
315+
Layout/EmptyLinesAroundAccessModifier:
316+
Enabled: false

0 commit comments

Comments
 (0)