Skip to content

Commit 3f43ad8

Browse files
committed
Run StandardRB via Rubocop to allow customization
1 parent fdbdbd7 commit 3f43ad8

13 files changed

+173
-116
lines changed

.github/workflows/standard.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ jobs:
2424

2525
name: StandardRB - Ruby ${{ matrix.ruby-version }} on Rails ${{ matrix.rails-version }}
2626
steps:
27-
- name: Run StandardRB
28-
uses: standardrb/standard-ruby-action@v1
27+
- name: Set up Ruby ${{ matrix.ruby-version }} on Rails ${{ matrix.rails-version }}
28+
uses: ruby/setup-ruby@v1
2929
with:
3030
ruby-version: ${{ matrix.ruby-version }}
31-
autofix: false
31+
bundler-cache: true
32+
- name: Run StandardRB (via Rubocop)
33+
run: |
34+
bundle exec rubocop --format offenses --format github

.rubocop-rails.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.rubocop-rake.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
1-
require:
1+
require: standard
2+
3+
inherit_gem:
4+
standard: config/base.yml
5+
6+
plugins:
7+
- standard-performance
8+
# rubocop-performance is required when using Performance cops
9+
- rubocop-performance
10+
- standard-rails
11+
- rubocop-rake
212
- rubocop-rspec
313

14+
AllCops:
15+
NewCops: disable
16+
SuggestExtensions: false
17+
TargetRubyVersion: 3.0
18+
19+
## standard-rails
20+
21+
# Do not require loading Rails environment for Rake tasks as we are not a Rails application.
22+
Rails/RakeEnvironment:
23+
Enabled: false
24+
25+
# Do not require subclassing from ApplicationController as we're not a rails application
26+
Rails/ApplicationController:
27+
Enabled: false
28+
29+
## rubocop-rspec
30+
431
RSpec/MultipleExpectations:
532
Max: 7
633

.standard.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

gemfiles/rails_6.1.gemfile.lock

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ GEM
8888
nokogiri (1.18.4-x86_64-linux-musl)
8989
racc (~> 1.4)
9090
parallel (1.26.3)
91-
parser (3.3.7.1)
91+
parser (3.3.10.0)
9292
ast (~> 2.4.1)
9393
racc
94+
prism (1.7.0)
9495
racc (1.8.1)
9596
rack (2.2.13)
9697
rack-test (2.2.0)
@@ -134,28 +135,30 @@ GEM
134135
rspec-support (3.13.2)
135136
rspec_junit_formatter (0.6.0)
136137
rspec-core (>= 2, < 4, != 2.12.0)
137-
rubocop (1.73.2)
138+
rubocop (1.75.8)
138139
json (~> 2.3)
139140
language_server-protocol (~> 3.17.0.2)
140141
lint_roller (~> 1.1.0)
141142
parallel (~> 1.10)
142143
parser (>= 3.3.0.2)
143144
rainbow (>= 2.2.2, < 4.0)
144145
regexp_parser (>= 2.9.3, < 3.0)
145-
rubocop-ast (>= 1.38.0, < 2.0)
146+
rubocop-ast (>= 1.44.0, < 2.0)
146147
ruby-progressbar (~> 1.7)
147148
unicode-display_width (>= 2.4.0, < 4.0)
148-
rubocop-ast (1.39.0)
149-
parser (>= 3.3.1.0)
149+
rubocop-ast (1.48.0)
150+
parser (>= 3.3.7.2)
151+
prism (~> 1.4)
150152
rubocop-performance (1.24.0)
151153
lint_roller (~> 1.1)
152154
rubocop (>= 1.72.1, < 2.0)
153155
rubocop-ast (>= 1.38.0, < 2.0)
154-
rubocop-rails (2.28.0)
156+
rubocop-rails (2.34.2)
155157
activesupport (>= 4.2.0)
158+
lint_roller (~> 1.1)
156159
rack (>= 1.1)
157-
rubocop (>= 1.52.0, < 2.0)
158-
rubocop-ast (>= 1.31.1, < 2.0)
160+
rubocop (>= 1.75.0, < 2.0)
161+
rubocop-ast (>= 1.44.0, < 2.0)
159162
rubocop-rake (0.6.0)
160163
rubocop (~> 1.0)
161164
rubocop-rspec (3.4.0)
@@ -168,10 +171,10 @@ GEM
168171
simplecov_json_formatter (~> 0.1)
169172
simplecov-html (0.13.1)
170173
simplecov_json_formatter (0.1.4)
171-
standard (1.47.0)
174+
standard (1.48.0)
172175
language_server-protocol (~> 3.17.0.2)
173176
lint_roller (~> 1.0)
174-
rubocop (~> 1.73.0)
177+
rubocop (~> 1.75.2)
175178
standard-custom (~> 1.0.0)
176179
standard-performance (~> 1.7)
177180
standard-custom (1.0.2)
@@ -180,6 +183,9 @@ GEM
180183
standard-performance (1.7.0)
181184
lint_roller (~> 1.1)
182185
rubocop-performance (~> 1.24.0)
186+
standard-rails (1.6.0)
187+
lint_roller (~> 1.0)
188+
rubocop-rails (~> 2.34.0)
183189
steep (1.10.0)
184190
activesupport (>= 5.1)
185191
concurrent-ruby (>= 1.1.10)
@@ -236,11 +242,11 @@ DEPENDENCIES
236242
rspec (~> 3.13.0)
237243
rspec-html-matchers (~> 0.10.0)
238244
rspec_junit_formatter (~> 0.6.0)
239-
rubocop-rails (~> 2.28)
240245
rubocop-rake (~> 0.6)
241246
rubocop-rspec (~> 3.4)
242247
simplecov (~> 0.22.0)
243248
standard (~> 1.31)
249+
standard-rails (~> 1.6)
244250
steep (~> 1.10.0)
245251
zeitwerk (~> 2.6.18)
246252

@@ -293,7 +299,8 @@ CHECKSUMS
293299
nokogiri (1.18.4-x86_64-linux-gnu) sha256=b1c6407b346b88704e97a342a80acd4755175324e624da34d0c5cfdc8d34191e
294300
nokogiri (1.18.4-x86_64-linux-musl) sha256=ea7c0356a70f3d2d0d76315b533877013d20368d5c9f437c38e0bd462c4844dc
295301
parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef
296-
parser (3.3.7.1) sha256=7dbe61618025519024ac72402a6677ead02099587a5538e84371b76659e6aca1
302+
parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
303+
prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
297304
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
298305
rack (2.2.13) sha256=ccee101719696a5da12ee9da6fb3b1d20cb329939e089e0e458be6e93667f0fb
299306
rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
@@ -313,20 +320,21 @@ CHECKSUMS
313320
rspec-mocks (3.13.2) sha256=2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef
314321
rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
315322
rspec_junit_formatter (0.6.0) sha256=40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15
316-
rubocop (1.73.2) sha256=35cd1b1365ba97234323fe771abcecd09c9b77098464cd726c76aa7d9bc12b5d
317-
rubocop-ast (1.39.0) sha256=b6ba0f677ceced033b81c69405ac8931f4963116c572b8da5e15a03619a8236c
323+
rubocop (1.75.8) sha256=c80ab4286c5dcfc49d7ad1787cdba5569b63b58c96ee7afde4ec47a9c8a85be9
324+
rubocop-ast (1.48.0) sha256=22df9bbf3f7a6eccde0fad54e68547ae1e2a704bf8719e7c83813a99c05d2e76
318325
rubocop-performance (1.24.0) sha256=e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5
319-
rubocop-rails (2.28.0) sha256=4967bed9ea13e6dcab566fea4265a6dd0381db739b305e48930aba1282da2715
326+
rubocop-rails (2.34.2) sha256=10ff246ee48b25ffeabddc5fee86d159d690bb3c7b9105755a9c7508a11d6e22
320327
rubocop-rake (0.6.0) sha256=56b6f22189af4b33d4f4e490a555c09f1281b02f4d48c3a61f6e8fe5f401d8db
321328
rubocop-rspec (3.4.0) sha256=8721c13b6a8c9530a7ac481cea9423022f946fcf72428bda8289f8b57e4d4885
322329
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
323330
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
324331
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
325332
simplecov-html (0.13.1) sha256=5dab0b7ee612e60e9887ad57693832fdf4695b4c0c859eaea5f95c18791ef10b
326333
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
327-
standard (1.47.0) sha256=b0da6b71d8dec53e760c7216b723e3507ebdcd6962f7ce7c37c016a36c7cc190
334+
standard (1.48.0) sha256=f07aedce423e2f2c8cff821473cc5fd51ce500e44a102ef21f31665bb6ab4f16
328335
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
329336
standard-performance (1.7.0) sha256=c46a9aef3348c0cfc03053ed9a1c1f73b967f7e4edcdf30dac0101b143897314
337+
standard-rails (1.6.0) sha256=8f1d19a402491901ee8148adb431682012838a73bb7d3b0e95aa339ea872497a
330338
steep (1.10.0) sha256=1b295b55f9aaff1b8d3ee42453ee55bc2a1078fda0268f288edb2dc014f4d7d1
331339
strscan (3.1.2) sha256=5529ff36c95fe752b8489f2e6c7f4f230fd9904e0b24fdc6e0833436c63ee2e3
332340
terminal-table (4.0.0) sha256=f504793203f8251b2ea7c7068333053f0beeea26093ec9962e62ea79f94301d2

gemfiles/rails_7.0.gemfile.lock

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ GEM
8787
nokogiri (1.18.4-x86_64-linux-musl)
8888
racc (~> 1.4)
8989
parallel (1.26.3)
90-
parser (3.3.7.1)
90+
parser (3.3.10.0)
9191
ast (~> 2.4.1)
9292
racc
93+
prism (1.7.0)
9394
racc (1.8.1)
9495
rack (2.2.13)
9596
rack-test (2.2.0)
@@ -134,28 +135,30 @@ GEM
134135
rspec-support (3.13.2)
135136
rspec_junit_formatter (0.6.0)
136137
rspec-core (>= 2, < 4, != 2.12.0)
137-
rubocop (1.73.2)
138+
rubocop (1.75.8)
138139
json (~> 2.3)
139140
language_server-protocol (~> 3.17.0.2)
140141
lint_roller (~> 1.1.0)
141142
parallel (~> 1.10)
142143
parser (>= 3.3.0.2)
143144
rainbow (>= 2.2.2, < 4.0)
144145
regexp_parser (>= 2.9.3, < 3.0)
145-
rubocop-ast (>= 1.38.0, < 2.0)
146+
rubocop-ast (>= 1.44.0, < 2.0)
146147
ruby-progressbar (~> 1.7)
147148
unicode-display_width (>= 2.4.0, < 4.0)
148-
rubocop-ast (1.39.0)
149-
parser (>= 3.3.1.0)
149+
rubocop-ast (1.48.0)
150+
parser (>= 3.3.7.2)
151+
prism (~> 1.4)
150152
rubocop-performance (1.24.0)
151153
lint_roller (~> 1.1)
152154
rubocop (>= 1.72.1, < 2.0)
153155
rubocop-ast (>= 1.38.0, < 2.0)
154-
rubocop-rails (2.28.0)
156+
rubocop-rails (2.34.2)
155157
activesupport (>= 4.2.0)
158+
lint_roller (~> 1.1)
156159
rack (>= 1.1)
157-
rubocop (>= 1.52.0, < 2.0)
158-
rubocop-ast (>= 1.31.1, < 2.0)
160+
rubocop (>= 1.75.0, < 2.0)
161+
rubocop-ast (>= 1.44.0, < 2.0)
159162
rubocop-rake (0.6.0)
160163
rubocop (~> 1.0)
161164
rubocop-rspec (3.4.0)
@@ -168,10 +171,10 @@ GEM
168171
simplecov_json_formatter (~> 0.1)
169172
simplecov-html (0.13.1)
170173
simplecov_json_formatter (0.1.4)
171-
standard (1.47.0)
174+
standard (1.48.0)
172175
language_server-protocol (~> 3.17.0.2)
173176
lint_roller (~> 1.0)
174-
rubocop (~> 1.73.0)
177+
rubocop (~> 1.75.2)
175178
standard-custom (~> 1.0.0)
176179
standard-performance (~> 1.7)
177180
standard-custom (1.0.2)
@@ -180,6 +183,9 @@ GEM
180183
standard-performance (1.7.0)
181184
lint_roller (~> 1.1)
182185
rubocop-performance (~> 1.24.0)
186+
standard-rails (1.6.0)
187+
lint_roller (~> 1.0)
188+
rubocop-rails (~> 2.34.0)
183189
steep (1.10.0)
184190
activesupport (>= 5.1)
185191
concurrent-ruby (>= 1.1.10)
@@ -236,11 +242,11 @@ DEPENDENCIES
236242
rspec (~> 3.13.0)
237243
rspec-html-matchers (~> 0.10.0)
238244
rspec_junit_formatter (~> 0.6.0)
239-
rubocop-rails (~> 2.28)
240245
rubocop-rake (~> 0.6)
241246
rubocop-rspec (~> 3.4)
242247
simplecov (~> 0.22.0)
243248
standard (~> 1.31)
249+
standard-rails (~> 1.6)
244250
steep (~> 1.10.0)
245251
zeitwerk (~> 2.6.18)
246252

@@ -293,7 +299,8 @@ CHECKSUMS
293299
nokogiri (1.18.4-x86_64-linux-gnu) sha256=b1c6407b346b88704e97a342a80acd4755175324e624da34d0c5cfdc8d34191e
294300
nokogiri (1.18.4-x86_64-linux-musl) sha256=ea7c0356a70f3d2d0d76315b533877013d20368d5c9f437c38e0bd462c4844dc
295301
parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef
296-
parser (3.3.7.1) sha256=7dbe61618025519024ac72402a6677ead02099587a5538e84371b76659e6aca1
302+
parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
303+
prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
297304
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
298305
rack (2.2.13) sha256=ccee101719696a5da12ee9da6fb3b1d20cb329939e089e0e458be6e93667f0fb
299306
rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
@@ -313,20 +320,21 @@ CHECKSUMS
313320
rspec-mocks (3.13.2) sha256=2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef
314321
rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
315322
rspec_junit_formatter (0.6.0) sha256=40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15
316-
rubocop (1.73.2) sha256=35cd1b1365ba97234323fe771abcecd09c9b77098464cd726c76aa7d9bc12b5d
317-
rubocop-ast (1.39.0) sha256=b6ba0f677ceced033b81c69405ac8931f4963116c572b8da5e15a03619a8236c
323+
rubocop (1.75.8) sha256=c80ab4286c5dcfc49d7ad1787cdba5569b63b58c96ee7afde4ec47a9c8a85be9
324+
rubocop-ast (1.48.0) sha256=22df9bbf3f7a6eccde0fad54e68547ae1e2a704bf8719e7c83813a99c05d2e76
318325
rubocop-performance (1.24.0) sha256=e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5
319-
rubocop-rails (2.28.0) sha256=4967bed9ea13e6dcab566fea4265a6dd0381db739b305e48930aba1282da2715
326+
rubocop-rails (2.34.2) sha256=10ff246ee48b25ffeabddc5fee86d159d690bb3c7b9105755a9c7508a11d6e22
320327
rubocop-rake (0.6.0) sha256=56b6f22189af4b33d4f4e490a555c09f1281b02f4d48c3a61f6e8fe5f401d8db
321328
rubocop-rspec (3.4.0) sha256=8721c13b6a8c9530a7ac481cea9423022f946fcf72428bda8289f8b57e4d4885
322329
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
323330
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
324331
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
325332
simplecov-html (0.13.1) sha256=5dab0b7ee612e60e9887ad57693832fdf4695b4c0c859eaea5f95c18791ef10b
326333
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
327-
standard (1.47.0) sha256=b0da6b71d8dec53e760c7216b723e3507ebdcd6962f7ce7c37c016a36c7cc190
334+
standard (1.48.0) sha256=f07aedce423e2f2c8cff821473cc5fd51ce500e44a102ef21f31665bb6ab4f16
328335
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
329336
standard-performance (1.7.0) sha256=c46a9aef3348c0cfc03053ed9a1c1f73b967f7e4edcdf30dac0101b143897314
337+
standard-rails (1.6.0) sha256=8f1d19a402491901ee8148adb431682012838a73bb7d3b0e95aa339ea872497a
330338
steep (1.10.0) sha256=1b295b55f9aaff1b8d3ee42453ee55bc2a1078fda0268f288edb2dc014f4d7d1
331339
strscan (3.1.2) sha256=5529ff36c95fe752b8489f2e6c7f4f230fd9904e0b24fdc6e0833436c63ee2e3
332340
terminal-table (4.0.0) sha256=f504793203f8251b2ea7c7068333053f0beeea26093ec9962e62ea79f94301d2

0 commit comments

Comments
 (0)