forked from soutaro/steep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Steepfile
43 lines (36 loc) · 982 Bytes
/
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
D = Steep::Diagnostic
target :app do
check "lib"
ignore "lib/steep/shims"
signature "sig"
collection_config "rbs_collection.steep.yaml"
configure_code_diagnostics do |hash| # You can setup everything yourself
hash[D::Ruby::MethodDefinitionMissing] = :hint
end
FileUtils.mkpath("tmp")
tmp_rbs_dir = File.join("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 Pathname(tmp_rbs_dir).exist?
FileUtils.ln_s(Pathname.pwd + source.path + "sig", tmp_rbs_dir, force: true)
end
signature tmp_rbs_dir
else
FileUtils.rm_f(tmp_rbs_dir)
library "rbs"
end
library(
"rdoc",
"monitor",
"tsort",
"uri",
'yaml',
'pstore',
'singleton',
'shellwords',
'find',
'digest',
"optparse",
)
end