Skip to content

Commit 59132d7

Browse files
PeteHannerJacobEvelyn
authored andcommitted
Update .rubocop.yml to read from panolint
This commit also adds CI support for TruffleRuby, and changes our CI configuration so linters are only installed in the latest version of Ruby where they run.
1 parent 3212bd4 commit 59132d7

File tree

5 files changed

+39
-30
lines changed

5 files changed

+39
-30
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@ jobs:
1414
matrix:
1515
# Due to https://github.com/actions/runner/issues/849, we have to use
1616
# quotes for '3.0'. Without quotes, CI runs 3.1.
17-
ruby: [ 2.5, 2.6, 2.7, '3.0', 3.1, jruby ]
17+
ruby: [ jruby, truffleruby, 2.5, 2.6, 2.7, '3.0', 3.1 ]
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v2
2121

22+
# Conditionally configure bundler via environment variables as advised
23+
# * https://github.com/ruby/setup-ruby#bundle-config
24+
- name: Set bundler environment variables
25+
run: |
26+
echo "BUNDLE_WITHOUT=checks" >> $GITHUB_ENV
27+
if: matrix.ruby != 3.1
28+
2229
# Use 'bundler-cache: true' instead of actions/cache as advised:
2330
# * https://github.com/actions/cache/blob/main/examples.md#ruby---bundler
2431
- uses: ruby/setup-ruby@v1
@@ -29,4 +36,4 @@ jobs:
2936
- run: bundle exec rspec
3037

3138
- run: bundle exec rubocop
32-
if: matrix.ruby == 3.0
39+
if: matrix.ruby == 3.1

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inherit_gem:
2-
panolint: rubocop.yml
2+
panolint: panolint-rubocop.yml
33
Metrics/BlockLength:
44
Exclude:
55
- scan_left.gemspec

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
55
# Specify your gem's dependencies in scan_left.gemspec
66
gemspec
77

8-
group :development do
8+
group :checks do
99
gem "panolint", github: "panorama-ed/panolint", branch: "main"
1010
end

Gemfile.lock

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GIT
22
remote: https://github.com/panorama-ed/panolint
3-
revision: c709ebcc5fd9593db959df4a92c12cae1d1fb9af
3+
revision: 0e9b6d9f2d41c84c306cae5f33da53f58aa61678
44
branch: main
55
specs:
6-
panolint (0.1.3)
6+
panolint (0.1.5)
77
brakeman (>= 4.8, < 6.0)
88
rubocop (>= 0.83, < 2.0)
99
rubocop-performance (~> 1.5)
@@ -19,25 +19,26 @@ PATH
1919
GEM
2020
remote: https://rubygems.org/
2121
specs:
22-
activesupport (6.1.4)
22+
activesupport (6.1.7)
2323
concurrent-ruby (~> 1.0, >= 1.0.2)
2424
i18n (>= 1.6, < 2)
2525
minitest (>= 5.1)
2626
tzinfo (~> 2.0)
2727
zeitwerk (~> 2.3)
2828
ast (2.4.2)
29-
brakeman (5.1.1)
30-
concurrent-ruby (1.1.9)
29+
brakeman (5.3.1)
30+
concurrent-ruby (1.1.10)
3131
diff-lcs (1.4.4)
32-
i18n (1.8.10)
32+
i18n (1.12.0)
3333
concurrent-ruby (~> 1.0)
34-
minitest (5.14.4)
35-
parallel (1.20.1)
36-
parser (3.0.2.0)
34+
json (2.6.2)
35+
minitest (5.15.0)
36+
parallel (1.22.1)
37+
parser (3.1.2.1)
3738
ast (~> 2.4.1)
38-
rack (2.2.3)
39-
rainbow (3.0.0)
40-
regexp_parser (2.1.1)
39+
rack (3.0.0)
40+
rainbow (3.1.1)
41+
regexp_parser (2.6.0)
4142
rexml (3.2.5)
4243
rspec (3.10.0)
4344
rspec-core (~> 3.10.0)
@@ -52,34 +53,34 @@ GEM
5253
diff-lcs (>= 1.2.0, < 2.0)
5354
rspec-support (~> 3.10.0)
5455
rspec-support (3.10.0)
55-
rubocop (1.18.4)
56+
rubocop (1.36.0)
57+
json (~> 2.3)
5658
parallel (~> 1.10)
57-
parser (>= 3.0.0.0)
59+
parser (>= 3.1.2.1)
5860
rainbow (>= 2.2.2, < 4.0)
5961
regexp_parser (>= 1.8, < 3.0)
60-
rexml
61-
rubocop-ast (>= 1.8.0, < 2.0)
62+
rexml (>= 3.2.5, < 4.0)
63+
rubocop-ast (>= 1.20.1, < 2.0)
6264
ruby-progressbar (~> 1.7)
6365
unicode-display_width (>= 1.4.0, < 3.0)
64-
rubocop-ast (1.8.0)
65-
parser (>= 3.0.1.1)
66-
rubocop-performance (1.11.4)
66+
rubocop-ast (1.21.0)
67+
parser (>= 3.1.1.0)
68+
rubocop-performance (1.13.3)
6769
rubocop (>= 1.7.0, < 2.0)
6870
rubocop-ast (>= 0.4.0)
69-
rubocop-rails (2.11.3)
71+
rubocop-rails (2.14.2)
7072
activesupport (>= 4.2.0)
7173
rack (>= 1.1)
7274
rubocop (>= 1.7.0, < 2.0)
7375
rubocop-rake (0.6.0)
7476
rubocop (~> 1.0)
75-
rubocop-rspec (2.4.0)
76-
rubocop (~> 1.0)
77-
rubocop-ast (>= 1.1.0)
77+
rubocop-rspec (2.10.0)
78+
rubocop (~> 1.19)
7879
ruby-progressbar (1.11.0)
79-
tzinfo (2.0.4)
80+
tzinfo (2.0.5)
8081
concurrent-ruby (~> 1.0)
81-
unicode-display_width (2.0.0)
82-
zeitwerk (2.4.2)
82+
unicode-display_width (2.3.0)
83+
zeitwerk (2.6.0)
8384

8485
PLATFORMS
8586
ruby

scan_left.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ Gem::Specification.new do |spec|
4242
spec.require_paths = ["lib"]
4343

4444
spec.add_development_dependency "rspec", "~> 3.0"
45+
spec.metadata["rubygems_mfa_required"] = "true"
4546
end

0 commit comments

Comments
 (0)