Skip to content

Commit ebca32c

Browse files
committed
Use standard instead of rubocop
1 parent b457892 commit ebca32c

File tree

7 files changed

+53
-22
lines changed

7 files changed

+53
-22
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
bundler-cache: true
2929

3030
- name: Lint code for consistent style
31-
run: bin/rubocop -f github
31+
run: bundle exec standardrb --format github --format "Standard::Formatter"
3232

3333
test:
3434
runs-on: ubuntu-latest

.rubocop.yml

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

.standard.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
- standard-rails:
3+
target_rails_version: 8.0

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ gem "puma"
77

88
gem "sqlite3"
99

10-
# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
11-
gem "rubocop-rails-omakase", require: false
12-
1310
# Start debugger with binding.b [https://github.com/ruby/debug]
1411
# gem "debug", ">= 1.0.0"
12+
13+
gem "standard", "~> 1.50"
14+
gem "standard-rails", "~> 1.4"

Gemfile.lock

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,34 @@ GEM
203203
lint_roller (~> 1.1)
204204
rubocop (>= 1.75.0, < 2.0)
205205
rubocop-ast (>= 1.38.0, < 2.0)
206-
rubocop-rails (2.32.0)
206+
rubocop-rails (2.31.0)
207207
activesupport (>= 4.2.0)
208208
lint_roller (~> 1.1)
209209
rack (>= 1.1)
210210
rubocop (>= 1.75.0, < 2.0)
211-
rubocop-ast (>= 1.44.0, < 2.0)
211+
rubocop-ast (>= 1.38.0, < 2.0)
212212
rubocop-rails-omakase (1.1.0)
213213
rubocop (>= 1.72)
214214
rubocop-performance (>= 1.24)
215215
rubocop-rails (>= 2.30)
216216
ruby-progressbar (1.13.0)
217217
securerandom (0.4.1)
218218
sqlite3 (2.6.0-arm64-darwin)
219+
standard (1.50.0)
220+
language_server-protocol (~> 3.17.0.2)
221+
lint_roller (~> 1.0)
222+
rubocop (~> 1.75.5)
223+
standard-custom (~> 1.0.0)
224+
standard-performance (~> 1.8)
225+
standard-custom (1.0.2)
226+
lint_roller (~> 1.0)
227+
rubocop (~> 1.50)
228+
standard-performance (1.8.0)
229+
lint_roller (~> 1.1)
230+
rubocop-performance (~> 1.25.0)
231+
standard-rails (1.4.0)
232+
lint_roller (~> 1.0)
233+
rubocop-rails (~> 2.31.0)
219234
stringio (3.1.7)
220235
thor (1.3.2)
221236
timeout (0.4.3)
@@ -240,6 +255,8 @@ DEPENDENCIES
240255
rails-app_env!
241256
rubocop-rails-omakase
242257
sqlite3
258+
standard (~> 1.50)
259+
standard-rails (~> 1.4)
243260

244261
BUNDLED WITH
245262
2.6.9

bin/rubocop

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

bin/standardrb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'standardrb' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("standard", "standardrb")

0 commit comments

Comments
 (0)