-
Notifications
You must be signed in to change notification settings - Fork 87
/
Steepfile
62 lines (46 loc) · 1.21 KB
/
Steepfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
D = Steep::Diagnostic
FileUtils.mkpath("tmp")
tmp_rbs_dir = Pathname("tmp/rbs-sig")
definition = Bundler::Definition.build(Pathname("Gemfile"), Pathname("Gemfile.lock"), nil)
rbs_dep = definition.dependencies.find {|dep| dep.name == "rbs" }
if (source = rbs_dep&.source).is_a?(Bundler::Source::Path)
unless tmp_rbs_dir.directory?
FileUtils.ln_s(Pathname.pwd + source.path + "sig", tmp_rbs_dir.to_s, force: true)
end
else
FileUtils.rm_f(tmp_rbs_dir)
library "rbs"
end
target :app do
collection_config "rbs_collection.steep.yaml"
check "lib"
ignore "lib/steep/shims"
signature "sig"
ignore_signature "sig/test"
configure_code_diagnostics(D::Ruby.strict) do |hash|
end
if tmp_rbs_dir.directory?
signature tmp_rbs_dir.to_s
else
library "rbs"
end
end
target :test do
collection_config "rbs_collection.steep.yaml"
unreferenced!
check "test"
signature "sig/test"
configure_code_diagnostics(D::Ruby.lenient)
if tmp_rbs_dir.directory?
signature tmp_rbs_dir.to_s
else
library "rbs"
end
end
target :bin do
unreferenced!
collection_config "rbs_collection.steep.yaml"
check "bin/generate-diagnostics-docs.rb"
signature "tmp/rbs-inline/bin"
library "rbs"
end