Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 83d09d2

Browse files
Merge pull request #33 from basecamp/linting
Add rubocop
2 parents f0bc5d8 + ddbc5b3 commit 83d09d2

5 files changed

Lines changed: 76 additions & 2 deletions

File tree

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
rubocop:
11+
name: Rubocop
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
BUNDLE_GITHUB__COM: ${{ format('x-access-token:{0}', secrets.FIZZY_GH_TOKEN) }}
16+
17+
steps:
18+
- uses: actions/checkout@v6
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: .ruby-version
22+
bundler-cache: true
23+
24+
- name: Run Rubocop
25+
run: bundle exec rubocop

.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ inherit_gem: { rubocop-rails-omakase: rubocop.yml }
66
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
77
# Layout/SpaceInsideArrayLiteralBrackets:
88
# Enabled: false
9+
10+
AllCops:
11+
Exclude:
12+
- 'db/migrate/**/*'
13+
- 'db/schema*.rb'

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ git_source(:bc) { |repo| "https://github.com/basecamp/#{repo}" }
55
gem "queenbee", bc: "queenbee-plugin", ref: "14312a940471e20617b38cdec7c092a01567d18b"
66
gem "rails_structured_logging", bc: "rails-structured-logging"
77
gem "activeresource", require: "active_resource" # needed by queenbee
8+
9+
gem "rubocop-rails-omakase", require: false

Gemfile.lock

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ GEM
101101
securerandom (>= 0.3)
102102
tzinfo (~> 2.0, >= 2.0.5)
103103
uri (>= 0.13.1)
104+
ast (2.4.3)
104105
base64 (0.3.0)
105106
bigdecimal (3.2.3)
106107
builder (3.3.0)
@@ -121,6 +122,8 @@ GEM
121122
rdoc (>= 4.0.0)
122123
reline (>= 0.4.2)
123124
json (2.16.0)
125+
language_server-protocol (3.17.0.5)
126+
lint_roller (1.1.0)
124127
logger (1.7.0)
125128
loofah (2.24.1)
126129
crass (~> 1.0.2)
@@ -160,9 +163,14 @@ GEM
160163
racc (~> 1.4)
161164
nokogiri (1.18.10-x86_64-linux-musl)
162165
racc (~> 1.4)
166+
parallel (1.27.0)
167+
parser (3.3.10.0)
168+
ast (~> 2.4.1)
169+
racc
163170
pp (0.6.3)
164171
prettyprint
165172
prettyprint (0.2.0)
173+
prism (1.6.0)
166174
psych (5.2.6)
167175
date
168176
stringio
@@ -205,21 +213,55 @@ GEM
205213
thor (~> 1.0, >= 1.2.2)
206214
tsort (>= 0.2)
207215
zeitwerk (~> 2.6)
216+
rainbow (3.1.1)
208217
rake (13.3.1)
209218
rdoc (6.15.1)
210219
erb
211220
psych (>= 4.0.0)
212221
tsort
222+
regexp_parser (2.11.3)
213223
reline (0.6.3)
214224
io-console (~> 0.5)
215225
rexml (3.4.4)
226+
rubocop (1.81.7)
227+
json (~> 2.3)
228+
language_server-protocol (~> 3.17.0.2)
229+
lint_roller (~> 1.1.0)
230+
parallel (~> 1.10)
231+
parser (>= 3.3.0.2)
232+
rainbow (>= 2.2.2, < 4.0)
233+
regexp_parser (>= 2.9.3, < 3.0)
234+
rubocop-ast (>= 1.47.1, < 2.0)
235+
ruby-progressbar (~> 1.7)
236+
unicode-display_width (>= 2.4.0, < 4.0)
237+
rubocop-ast (1.48.0)
238+
parser (>= 3.3.7.2)
239+
prism (~> 1.4)
240+
rubocop-performance (1.26.1)
241+
lint_roller (~> 1.1)
242+
rubocop (>= 1.75.0, < 2.0)
243+
rubocop-ast (>= 1.47.1, < 2.0)
244+
rubocop-rails (2.34.2)
245+
activesupport (>= 4.2.0)
246+
lint_roller (~> 1.1)
247+
rack (>= 1.1)
248+
rubocop (>= 1.75.0, < 2.0)
249+
rubocop-ast (>= 1.44.0, < 2.0)
250+
rubocop-rails-omakase (1.1.0)
251+
rubocop (>= 1.72)
252+
rubocop-performance (>= 1.24)
253+
rubocop-rails (>= 2.30)
254+
ruby-progressbar (1.13.0)
216255
securerandom (0.4.1)
217256
stringio (3.1.8)
218257
thor (1.4.0)
219258
timeout (0.4.4)
220259
tsort (0.2.0)
221260
tzinfo (2.0.6)
222261
concurrent-ruby (~> 1.0)
262+
unicode-display_width (3.2.0)
263+
unicode-emoji (~> 4.1)
264+
unicode-emoji (4.1.0)
223265
uri (1.0.3)
224266
useragent (0.16.11)
225267
websocket-driver (0.8.0)
@@ -243,6 +285,7 @@ DEPENDENCIES
243285
activeresource
244286
queenbee!
245287
rails_structured_logging!
288+
rubocop-rails-omakase
246289

247290
BUNDLED WITH
248291
2.7.0

lib/tasks/fizzy/saas_tasks.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ namespace :test do
99
# end
1010

1111
desc "Run tests for fizzy-saas gem"
12-
Rake::TestTask.new(:saas => :environment) do |t|
12+
Rake::TestTask.new(saas: :environment) do |t|
1313
t.libs << "test"
1414
t.test_files = FileList[Fizzy::Saas::Engine.root.join("test/**/*_test.rb")]
1515
t.warning = false
1616
end
1717
end
18-

0 commit comments

Comments
 (0)