Skip to content

Commit 140db74

Browse files
committed
ci: add stanardrb linting
1 parent a0da498 commit 140db74

File tree

9 files changed

+210
-111
lines changed

9 files changed

+210
-111
lines changed

.github/workflows/pronto.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Pronto
2+
on: [pull_request_target]
3+
4+
jobs:
5+
pronto:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout code
9+
uses: actions/checkout@v2
10+
- run: |
11+
git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/*
12+
- uses: ruby/setup-ruby@v1
13+
with:
14+
bundler-cache: true
15+
- run: gem install pronto pronto-rubocop
16+
- run: pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
17+
env:
18+
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
19+
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"
20+
BUNDLE_PATH: "vendor/bundle"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
quickstart.rb
1414
*.gz
1515

16-
/vendor/
16+
vendor/

.rubocop.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require:
2+
- standard
3+
- standard-custom
4+
- standard-performance
5+
- rubocop-performance
6+
7+
inherit_gem:
8+
standard: config/base.yml
9+
standard-custom: config/base.yml
10+
standard-performance: config/base.yml
11+
12+
AllCops:
13+
NewCops: enable
14+
Exclude:
15+
- node_modules/**/*
16+
- public/**/*
17+
- vendor/**/*

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source 'https://rubygems.org'
1+
source "https://rubygems.org"
22

33
gem "faraday", "~> 1.10"
44
gem "faraday_middleware"

Gemfile.lock

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
netbox-client-ruby (0.10.0)
4+
netbox-client-ruby (0.10.1)
55
dry-configurable (~> 1)
66
faraday (>= 0.11.0, < 3)
77
faraday-detailed_logger (~> 2.1)
@@ -49,22 +49,23 @@ GEM
4949
faraday_middleware (1.2.0)
5050
faraday (~> 1.0)
5151
ipaddress (0.8.3)
52+
json (2.7.2)
53+
language_server-protocol (3.17.0.3)
54+
lint_roller (1.1.0)
5255
method_source (1.0.0)
5356
multipart-post (2.3.0)
5457
openssl (3.2.0)
55-
parallel (1.23.0)
56-
parser (3.2.2.3)
58+
parallel (1.26.3)
59+
parser (3.3.5.0)
5760
ast (~> 2.4.1)
5861
racc
5962
pry (0.14.2)
6063
coderay (~> 1.1)
6164
method_source (~> 1.0)
62-
racc (1.7.1)
65+
racc (1.8.1)
6366
rainbow (3.1.1)
6467
rake (13.0.6)
65-
regexp_parser (2.8.1)
66-
rexml (3.3.6)
67-
strscan
68+
regexp_parser (2.9.2)
6869
rspec (3.12.0)
6970
rspec-core (~> 3.12.0)
7071
rspec-expectations (~> 3.12.0)
@@ -78,28 +79,41 @@ GEM
7879
diff-lcs (>= 1.2.0, < 2.0)
7980
rspec-support (~> 3.12.0)
8081
rspec-support (3.12.1)
81-
rubocop (0.93.1)
82+
rubocop (1.66.1)
83+
json (~> 2.3)
84+
language_server-protocol (>= 3.17.0)
8285
parallel (~> 1.10)
83-
parser (>= 2.7.1.5)
86+
parser (>= 3.3.0.2)
8487
rainbow (>= 2.2.2, < 4.0)
85-
regexp_parser (>= 1.8)
86-
rexml
87-
rubocop-ast (>= 0.6.0)
88+
regexp_parser (>= 2.4, < 3.0)
89+
rubocop-ast (>= 1.32.2, < 2.0)
8890
ruby-progressbar (~> 1.7)
89-
unicode-display_width (>= 1.4.0, < 2.0)
90-
rubocop-ast (1.29.0)
91-
parser (>= 3.2.1.0)
92-
rubocop-rspec (1.44.1)
93-
rubocop (~> 0.87)
94-
rubocop-ast (>= 0.7.1)
91+
unicode-display_width (>= 2.4.0, < 3.0)
92+
rubocop-ast (1.32.3)
93+
parser (>= 3.3.1.0)
94+
rubocop-performance (1.22.1)
95+
rubocop (>= 1.48.1, < 2.0)
96+
rubocop-ast (>= 1.31.1, < 2.0)
9597
ruby-progressbar (1.13.0)
9698
ruby2_keywords (0.0.5)
97-
strscan (3.1.0)
98-
unicode-display_width (1.8.0)
99+
standard (1.41.1)
100+
language_server-protocol (~> 3.17.0.2)
101+
lint_roller (~> 1.0)
102+
rubocop (~> 1.66.0)
103+
standard-custom (~> 1.0.0)
104+
standard-performance (~> 1.5)
105+
standard-custom (1.0.2)
106+
lint_roller (~> 1.0)
107+
rubocop (~> 1.50)
108+
standard-performance (1.5.0)
109+
lint_roller (~> 1.1)
110+
rubocop-performance (~> 1.22.0)
111+
unicode-display_width (2.6.0)
99112
zeitwerk (2.6.12)
100113

101114
PLATFORMS
102115
arm64-darwin-22
116+
arm64-darwin-23
103117
x86_64-linux
104118

105119
DEPENDENCIES
@@ -110,8 +124,8 @@ DEPENDENCIES
110124
pry (~> 0.10)
111125
rake (~> 13)
112126
rspec (~> 3.5)
113-
rubocop (~> 0.48)
114-
rubocop-rspec (~> 1.15)
127+
standard (~> 1.31)
128+
standard-performance (~> 1.2)
115129

116130
BUNDLED WITH
117131
2.4.10

gemfiles/faraday0.gemfile.lock

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
netbox-client-ruby (0.10.0)
4+
netbox-client-ruby (0.10.1)
55
dry-configurable (~> 1)
66
faraday (>= 0.11.0, < 3)
77
faraday-detailed_logger (~> 2.1)
@@ -29,21 +29,23 @@ GEM
2929
faraday_middleware (0.14.0)
3030
faraday (>= 0.7.4, < 1.0)
3131
ipaddress (0.8.3)
32+
json (2.7.2)
33+
language_server-protocol (3.17.0.3)
34+
lint_roller (1.1.0)
3235
method_source (1.0.0)
3336
multipart-post (2.3.0)
3437
openssl (3.2.0)
35-
parallel (1.23.0)
36-
parser (3.2.2.3)
38+
parallel (1.26.3)
39+
parser (3.3.5.0)
3740
ast (~> 2.4.1)
3841
racc
3942
pry (0.14.2)
4043
coderay (~> 1.1)
4144
method_source (~> 1.0)
42-
racc (1.7.1)
45+
racc (1.8.1)
4346
rainbow (3.1.1)
4447
rake (13.0.6)
45-
regexp_parser (2.8.1)
46-
rexml (3.2.6)
48+
regexp_parser (2.9.2)
4749
rspec (3.12.0)
4850
rspec-core (~> 3.12.0)
4951
rspec-expectations (~> 3.12.0)
@@ -57,26 +59,40 @@ GEM
5759
diff-lcs (>= 1.2.0, < 2.0)
5860
rspec-support (~> 3.12.0)
5961
rspec-support (3.12.1)
60-
rubocop (0.93.1)
62+
rubocop (1.66.1)
63+
json (~> 2.3)
64+
language_server-protocol (>= 3.17.0)
6165
parallel (~> 1.10)
62-
parser (>= 2.7.1.5)
66+
parser (>= 3.3.0.2)
6367
rainbow (>= 2.2.2, < 4.0)
64-
regexp_parser (>= 1.8)
65-
rexml
66-
rubocop-ast (>= 0.6.0)
68+
regexp_parser (>= 2.4, < 3.0)
69+
rubocop-ast (>= 1.32.2, < 2.0)
6770
ruby-progressbar (~> 1.7)
68-
unicode-display_width (>= 1.4.0, < 2.0)
69-
rubocop-ast (1.29.0)
70-
parser (>= 3.2.1.0)
71-
rubocop-rspec (1.44.1)
72-
rubocop (~> 0.87)
73-
rubocop-ast (>= 0.7.1)
71+
unicode-display_width (>= 2.4.0, < 3.0)
72+
rubocop-ast (1.32.3)
73+
parser (>= 3.3.1.0)
74+
rubocop-performance (1.22.1)
75+
rubocop (>= 1.48.1, < 2.0)
76+
rubocop-ast (>= 1.31.1, < 2.0)
7477
ruby-progressbar (1.13.0)
75-
unicode-display_width (1.8.0)
78+
standard (1.41.1)
79+
language_server-protocol (~> 3.17.0.2)
80+
lint_roller (~> 1.0)
81+
rubocop (~> 1.66.0)
82+
standard-custom (~> 1.0.0)
83+
standard-performance (~> 1.5)
84+
standard-custom (1.0.2)
85+
lint_roller (~> 1.0)
86+
rubocop (~> 1.50)
87+
standard-performance (1.5.0)
88+
lint_roller (~> 1.1)
89+
rubocop-performance (~> 1.22.0)
90+
unicode-display_width (2.6.0)
7691
zeitwerk (2.6.12)
7792

7893
PLATFORMS
7994
arm64-darwin-22
95+
arm64-darwin-23
8096
x86_64-linux
8197

8298
DEPENDENCIES
@@ -87,8 +103,8 @@ DEPENDENCIES
87103
pry (~> 0.10)
88104
rake (~> 13)
89105
rspec (~> 3.5)
90-
rubocop (~> 0.48)
91-
rubocop-rspec (~> 1.15)
106+
standard (~> 1.31)
107+
standard-performance (~> 1.2)
92108

93109
BUNDLED WITH
94110
2.4.10

gemfiles/faraday1.gemfile.lock

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
netbox-client-ruby (0.10.0)
4+
netbox-client-ruby (0.10.1)
55
dry-configurable (~> 1)
66
faraday (>= 0.11.0, < 3)
77
faraday-detailed_logger (~> 2.1)
@@ -28,21 +28,23 @@ GEM
2828
faraday_middleware (1.2.0)
2929
faraday (~> 1.0)
3030
ipaddress (0.8.3)
31+
json (2.7.2)
32+
language_server-protocol (3.17.0.3)
33+
lint_roller (1.1.0)
3134
method_source (1.0.0)
3235
multipart-post (2.3.0)
3336
openssl (3.2.0)
34-
parallel (1.23.0)
35-
parser (3.2.2.3)
37+
parallel (1.26.3)
38+
parser (3.3.5.0)
3639
ast (~> 2.4.1)
3740
racc
3841
pry (0.14.2)
3942
coderay (~> 1.1)
4043
method_source (~> 1.0)
41-
racc (1.7.1)
44+
racc (1.8.1)
4245
rainbow (3.1.1)
4346
rake (13.0.6)
44-
regexp_parser (2.8.1)
45-
rexml (3.2.6)
47+
regexp_parser (2.9.2)
4648
rspec (3.12.0)
4749
rspec-core (~> 3.12.0)
4850
rspec-expectations (~> 3.12.0)
@@ -56,26 +58,40 @@ GEM
5658
diff-lcs (>= 1.2.0, < 2.0)
5759
rspec-support (~> 3.12.0)
5860
rspec-support (3.12.1)
59-
rubocop (0.93.1)
61+
rubocop (1.66.1)
62+
json (~> 2.3)
63+
language_server-protocol (>= 3.17.0)
6064
parallel (~> 1.10)
61-
parser (>= 2.7.1.5)
65+
parser (>= 3.3.0.2)
6266
rainbow (>= 2.2.2, < 4.0)
63-
regexp_parser (>= 1.8)
64-
rexml
65-
rubocop-ast (>= 0.6.0)
67+
regexp_parser (>= 2.4, < 3.0)
68+
rubocop-ast (>= 1.32.2, < 2.0)
6669
ruby-progressbar (~> 1.7)
67-
unicode-display_width (>= 1.4.0, < 2.0)
68-
rubocop-ast (1.29.0)
69-
parser (>= 3.2.1.0)
70-
rubocop-rspec (1.44.1)
71-
rubocop (~> 0.87)
72-
rubocop-ast (>= 0.7.1)
70+
unicode-display_width (>= 2.4.0, < 3.0)
71+
rubocop-ast (1.32.3)
72+
parser (>= 3.3.1.0)
73+
rubocop-performance (1.22.1)
74+
rubocop (>= 1.48.1, < 2.0)
75+
rubocop-ast (>= 1.31.1, < 2.0)
7376
ruby-progressbar (1.13.0)
74-
unicode-display_width (1.8.0)
77+
standard (1.41.1)
78+
language_server-protocol (~> 3.17.0.2)
79+
lint_roller (~> 1.0)
80+
rubocop (~> 1.66.0)
81+
standard-custom (~> 1.0.0)
82+
standard-performance (~> 1.5)
83+
standard-custom (1.0.2)
84+
lint_roller (~> 1.0)
85+
rubocop (~> 1.50)
86+
standard-performance (1.5.0)
87+
lint_roller (~> 1.1)
88+
rubocop-performance (~> 1.22.0)
89+
unicode-display_width (2.6.0)
7590
zeitwerk (2.6.12)
7691

7792
PLATFORMS
7893
arm64-darwin-22
94+
arm64-darwin-23
7995
x86_64-linux
8096

8197
DEPENDENCIES
@@ -86,8 +102,8 @@ DEPENDENCIES
86102
pry (~> 0.10)
87103
rake (~> 13)
88104
rspec (~> 3.5)
89-
rubocop (~> 0.48)
90-
rubocop-rspec (~> 1.15)
105+
standard (~> 1.31)
106+
standard-performance (~> 1.2)
91107

92108
BUNDLED WITH
93109
2.4.10

0 commit comments

Comments
 (0)