Skip to content

Commit 983378f

Browse files
committed
Add Rake task for running Sorbet
1 parent dfba004 commit 983378f

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Rakefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# frozen_string_literal: true
22

33
require "bundler/gem_tasks"
4+
5+
desc "Type-check the code base with Sorbet"
6+
task :typecheck do
7+
sh "bundle exec srb tc" do |ok, _res|
8+
abort unless ok
9+
end
10+
end
11+
12+
# Aliases for common names for this task.
13+
task tc: :typecheck
14+
task srb: :typecheck
15+
task sorbet: :typecheck
16+
417
require "minitest/test_task"
518

619
Minitest::TestTask.create do |t|
@@ -13,4 +26,4 @@ require "rubocop/rake_task"
1326

1427
RuboCop::RakeTask.new
1528

16-
task default: [:test, :rubocop]
29+
task default: [:typecheck, :test, :rubocop]

0 commit comments

Comments
 (0)