Skip to content

Commit 864ab47

Browse files
committed
Configure rubocop
1 parent 77d7e54 commit 864ab47

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.rubocop.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
plugins:
22
- rubocop-performance
3+
- rubocop-rake
4+
- rubocop-rspec
35

46
AllCops:
57
TargetRubyVersion: 3.1
@@ -281,12 +283,18 @@ Security/JSONLoad:
281283

282284
# Our rubocop rules
283285

286+
# Bundler rules.
287+
284288
Bundler/OrderedGems:
285289
Enabled: false
286290

291+
# Gemspec rules
292+
287293
Gemspec/OrderedDependencies:
288294
Enabled: false
289295

296+
# Style rules
297+
290298
# Don't allow %i[foo bar baz]
291299
Style/SymbolArray:
292300
Enabled: true
@@ -300,3 +308,33 @@ Style/WordArray:
300308
# Disable warnings like "Missing top-level documentation comment for"
301309
Style/Documentation:
302310
Enabled: false
311+
312+
# Disable as in standard.
313+
Style/ArgumentsForwarding:
314+
Enabled: false
315+
316+
# RSpec rules
317+
318+
# Prefer eq over be.
319+
RSpec/BeEq:
320+
Enabled: false
321+
322+
# Prefer eq over eql.
323+
RSpec/BeEql:
324+
Enabled: false
325+
326+
# We prefer to use `expect` over `allow`.
327+
RSpec/StubbedMock:
328+
Enabled: false
329+
330+
# We prefer multiple before blocks in tests.
331+
RSpec/ScatteredSetup:
332+
Enabled: false
333+
334+
# We use `expect` in before hooks.
335+
RSpec/ExpectInHook:
336+
Enabled: false
337+
338+
# We use item_1, item_2, etc. Disable.
339+
RSpec/IndexedLet:
340+
Enabled: false

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ gem "rspec"
99
gem "simplecov", require: false
1010
gem "standard", require: false
1111
gem "rubocop", require: false
12+
gem "rubocop-rake", require: false
13+
gem "rubocop-rspec", require: false

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ GEM
9898
lint_roller (~> 1.1)
9999
rubocop (>= 1.75.0, < 2.0)
100100
rubocop-ast (>= 1.38.0, < 2.0)
101+
rubocop-rake (0.7.1)
102+
lint_roller (~> 1.1)
103+
rubocop (>= 1.72.1)
104+
rubocop-rspec (3.5.0)
105+
lint_roller (~> 1.1)
106+
rubocop (~> 1.72, >= 1.72.1)
101107
ruby-progressbar (1.13.0)
102108
sawyer (0.9.2)
103109
addressable (>= 2.3.5)
@@ -147,6 +153,8 @@ DEPENDENCIES
147153
rake
148154
rspec
149155
rubocop
156+
rubocop-rake
157+
rubocop-rspec
150158
simplecov
151159
standard
152160

0 commit comments

Comments
 (0)