Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Sorbet #135

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
.gitignore
.rubocop.yml
deployment/
sorbet/
state.json
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
with:
bundler-cache: true

- name: Run Sorbet Typecheck
run: bundle exec srb tc

- name: Run RuboCop
run: bundle exec rubocop

Expand Down
19 changes: 19 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require:
- rubocop-performance
- rubocop-sorbet

AllCops:
TargetRubyVersion: 3.3
Expand Down Expand Up @@ -45,6 +46,24 @@ Metrics/MethodLength:
Metrics/ParameterLists:
CountKeywordArgs: false

# Incompatible with Sorbet
Naming/BlockForwarding:
Enabled: false

Sorbet/FalseSigil:
Enabled: false
Sorbet/StrictSigil:
Enabled: true
Include:
- src/server.rb
- src/github_client.rb
Sorbet/StrongSigil:
Enabled: true
Exclude:
- src/server.rb
- src/github_client.rb
- src/octokit/*.rb

Style/AndOr:
EnforcedStyle: always

Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ gem "orka_api_client", git: "https://github.com/Homebrew/orka_api_client"
gem "puma"
gem "rackup"
gem "sinatra"
gem "sorbet-runtime"

group :development, optional: true do
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-sorbet"
gem "sorbet-static-and-runtime"
gem "tapioca"
end
45 changes: 44 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GEM
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
base64 (0.2.0)
erubi (1.13.0)
faraday (2.10.1)
faraday-net_http (>= 2.0, < 3.2)
logger
Expand All @@ -32,6 +33,7 @@ GEM
ruby2_keywords (~> 0.0.1)
net-http (0.4.1)
uri
netrc (0.11.0)
nio4r (2.7.3)
octokit (9.1.0)
faraday (>= 1, < 3)
Expand All @@ -40,6 +42,7 @@ GEM
parser (3.3.4.2)
ast (~> 2.4.1)
racc
prism (0.30.0)
public_suffix (6.0.1)
puma (6.4.2)
nio4r (~> 2.0)
Expand All @@ -54,6 +57,9 @@ GEM
rack (>= 3)
webrick (~> 1.8)
rainbow (3.1.1)
rbi (0.1.14)
prism (>= 0.18.0, < 1.0.0)
sorbet-runtime (>= 0.5.9204)
regexp_parser (2.9.2)
rexml (3.3.5)
strscan
Expand All @@ -73,6 +79,8 @@ GEM
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-sorbet (0.8.5)
rubocop (>= 1)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sawyer (0.9.2)
Expand All @@ -84,14 +92,45 @@ GEM
rack-protection (= 4.0.0)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
sorbet (0.5.11525)
sorbet-static (= 0.5.11525)
sorbet-runtime (0.5.11525)
sorbet-static (0.5.11525-aarch64-linux)
sorbet-static (0.5.11525-universal-darwin)
sorbet-static (0.5.11525-x86_64-linux)
sorbet-static-and-runtime (0.5.11525)
sorbet (= 0.5.11525)
sorbet-runtime (= 0.5.11525)
spoom (1.4.2)
erubi (>= 1.10.0)
prism (>= 0.28.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
strscan (3.1.0)
tapioca (0.16.0)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
rbi (>= 0.1.14, < 0.2)
sorbet-static-and-runtime (>= 0.5.11087)
spoom (>= 1.2.0)
thor (>= 1.2.0)
yard-sorbet
thor (1.3.1)
tilt (2.4.0)
unicode-display_width (2.5.0)
uri (0.13.0)
webrick (1.8.1)
yard (0.9.36)
yard-sorbet (0.9.0)
sorbet-runtime
yard

PLATFORMS
ruby
aarch64-linux
arm64-darwin
x86_64-darwin
x86_64-linux

DEPENDENCIES
faraday-retry
Expand All @@ -102,7 +141,11 @@ DEPENDENCIES
rackup
rubocop
rubocop-performance
rubocop-sorbet
sinatra
sorbet-runtime
sorbet-static-and-runtime
tapioca

RUBY VERSION
ruby 3.3.4p94
Expand Down
4 changes: 4 additions & 0 deletions sorbet/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--dir
.
--ignore=tmp/
--ignore=vendor/
1 change: 1 addition & 0 deletions sorbet/rbi/annotations/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.rbi linguist-vendored=true
17 changes: 17 additions & 0 deletions sorbet/rbi/annotations/faraday.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading