Skip to content

Commit

Permalink
Add Steep to typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed May 12, 2024
1 parent e7beaa5 commit f7f9ba9
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ gem 'csv'
group :test do
gem 'rspec', '~> 3.13.0'
gem 'simplecov', '~> 0.22.0', require: false
gem 'steep', '>= 1.6'
end
58 changes: 55 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,42 @@ PATH
GEM
remote: https://rubygems.org/
specs:
abbrev (0.1.2)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.6)
citrus (3.0.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
csv (3.2.8)
diff-lcs (1.5.1)
docile (1.4.0)
drb (2.2.1)
ffi (1.16.3)
fileutils (1.7.2)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.7.1)
language_server-protocol (3.17.0.3)
mini_portile2 (2.8.1)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.0)
minitest (5.22.3)
mutex_m (0.2.0)
nokogiri (1.13.10-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.10-x86_64-linux)
racc (~> 1.4)
ox (2.14.12)
parallel (1.24.0)
Expand All @@ -27,6 +52,11 @@ GEM
racc (1.6.2)
rainbow (3.1.1)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbs (3.4.4)
abbrev
regexp_parser (2.9.0)
rexml (3.2.5)
rspec (3.13.0)
Expand Down Expand Up @@ -56,15 +86,36 @@ GEM
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
steep (1.6.0)
activesupport (>= 5.1)
concurrent-ruby (>= 1.1.10)
csv (>= 3.0.9)
fileutils (>= 1.1.0)
json (>= 2.1.0)
language_server-protocol (>= 3.15, < 4.0)
listen (~> 3.0)
logger (>= 1.3.0)
parser (>= 3.1)
rainbow (>= 2.2.2, < 4.0)
rbs (>= 3.1.0)
securerandom (>= 0.1)
strscan (>= 1.0.0)
terminal-table (>= 2, < 4)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
toml-rb (2.2.0)
citrus (~> 3.0, > 3.0)
tomlib (0.5.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)

PLATFORMS
Expand All @@ -82,6 +133,7 @@ DEPENDENCIES
rubocop (~> 1.60)
shale!
simplecov (~> 0.22.0)
steep (>= 1.6)
toml-rb
tomlib

Expand Down
9 changes: 8 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
require 'bundler/gem_tasks'
require 'rubocop/rake_task'
require 'rspec/core/rake_task'
require 'steep'
require 'steep/cli'

RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:spec)

task default: :spec
desc "Type check with Steep"
task :steep do
Steep::CLI.new(argv: ["check"], stdout: $stdout, stderr: $stderr, stdin: $stdin).run
end

task default: [:spec, :steep]
11 changes: 11 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
target :lib do
signature "sig"
check "lib"
library "base64"
library "csv"
library "erb"
library "json"
library "uri"
library "yaml"
configure_code_diagnostics(Steep::Diagnostic::Ruby.default) # strict or all_error
end

0 comments on commit f7f9ba9

Please sign in to comment.