Skip to content

Commit b74a089

Browse files
committed
Set up RuboCop with CI
1 parent 6e4f77c commit b74a089

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed

.github/workflows/rubocop.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Ruby 3.2
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: 3.2
19+
bundler-cache: true
20+
21+
- name: Run RuboCop
22+
run: bundle exec rubocop --parallel

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.gem
22
.byebug_history
3+
.rubocop-*

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
inherit_from: https://raw.githubusercontent.com/rails/rails/main/.rubocop.yml

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ gemspec
44

55
gem "rake"
66
gem "byebug"
7+
gem "rubocop"
8+
gem "rubocop-minitest"
9+
gem "rubocop-packaging"
10+
gem "rubocop-performance"
11+
gem "rubocop-rails"
12+
gem "rubocop-md"

Gemfile.lock

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ GEM
6868
minitest (>= 5.1)
6969
tzinfo (~> 2.0)
7070
zeitwerk (~> 2.3)
71+
ast (2.4.2)
7172
builder (3.2.4)
7273
byebug (11.1.3)
7374
concurrent-ruby (1.1.8)
@@ -78,6 +79,8 @@ GEM
7879
activesupport (>= 4.2.0)
7980
i18n (1.8.10)
8081
concurrent-ruby (~> 1.0)
82+
json (2.6.3)
83+
language_server-protocol (3.17.0.3)
8184
loofah (2.9.0)
8285
crass (~> 1.0.2)
8386
nokogiri (>= 1.5.9)
@@ -96,6 +99,10 @@ GEM
9699
racc (~> 1.4)
97100
nokogiri (1.15.2-x86_64-darwin)
98101
racc (~> 1.4)
102+
parallel (1.23.0)
103+
parser (3.2.2.3)
104+
ast (~> 2.4.1)
105+
racc
99106
racc (1.7.1)
100107
rack (2.2.3)
101108
rack-test (1.1.0)
@@ -126,11 +133,41 @@ GEM
126133
method_source
127134
rake (>= 0.8.7)
128135
thor (~> 1.0)
136+
rainbow (3.1.1)
129137
rake (13.0.3)
130138
redis (5.0.6)
131139
redis-client (>= 0.9.0)
132140
redis-client (0.14.1)
133141
connection_pool
142+
regexp_parser (2.8.1)
143+
rexml (3.2.5)
144+
rubocop (1.54.1)
145+
json (~> 2.3)
146+
language_server-protocol (>= 3.17.0)
147+
parallel (~> 1.10)
148+
parser (>= 3.2.2.3)
149+
rainbow (>= 2.2.2, < 4.0)
150+
regexp_parser (>= 1.8, < 3.0)
151+
rexml (>= 3.2.5, < 4.0)
152+
rubocop-ast (>= 1.28.0, < 2.0)
153+
ruby-progressbar (~> 1.7)
154+
unicode-display_width (>= 2.4.0, < 3.0)
155+
rubocop-ast (1.29.0)
156+
parser (>= 3.2.1.0)
157+
rubocop-md (1.2.0)
158+
rubocop (>= 1.0)
159+
rubocop-minitest (0.31.0)
160+
rubocop (>= 1.39, < 2.0)
161+
rubocop-packaging (0.5.2)
162+
rubocop (>= 1.33, < 2.0)
163+
rubocop-performance (1.18.0)
164+
rubocop (>= 1.7.0, < 2.0)
165+
rubocop-ast (>= 0.4.0)
166+
rubocop-rails (2.20.2)
167+
activesupport (>= 4.2.0)
168+
rack (>= 1.1)
169+
rubocop (>= 1.33.0, < 2.0)
170+
ruby-progressbar (1.13.0)
134171
sprockets (4.0.2)
135172
concurrent-ruby (~> 1.0)
136173
rack (> 1, < 3)
@@ -141,6 +178,7 @@ GEM
141178
thor (1.1.0)
142179
tzinfo (2.0.4)
143180
concurrent-ruby (~> 1.0)
181+
unicode-display_width (2.4.2)
144182
websocket-driver (0.7.3)
145183
websocket-extensions (>= 0.1.0)
146184
websocket-extensions (0.1.5)
@@ -156,6 +194,12 @@ DEPENDENCIES
156194
kredis!
157195
rails (>= 6.0.0)
158196
rake
197+
rubocop
198+
rubocop-md
199+
rubocop-minitest
200+
rubocop-packaging
201+
rubocop-performance
202+
rubocop-rails
159203

160204
BUNDLED WITH
161205
2.3.12

0 commit comments

Comments
 (0)