-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSteepfile
More file actions
36 lines (31 loc) · 1.49 KB
/
Copy pathSteepfile
File metadata and controls
36 lines (31 loc) · 1.49 KB
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
# frozen_string_literal: true
D = Steep::Diagnostic
target :lib do
signature "sig"
check "lib"
ignore "lib/multi_json/adapters"
# Adapters that have RBS sigs (and stubbed external library types)
# are checked. The rest of lib/multi_json/adapters stays ignored
# because their backing libraries don't ship Steep-friendly types
# and their wrappers do non-trivial things Steep can't follow.
check "lib/multi_json/adapters/yajl.rb"
check "lib/multi_json/adapters/jr_jackson.rb"
check "lib/multi_json/adapters/gson.rb"
# JRuby-only Concurrent::Map backend; Steep runs on MRI, where the
# MutexStore version defines the ``Store`` class.
ignore "lib/multi_json/options_cache/concurrent_store.rb"
library "singleton"
configure_code_diagnostics(D::Ruby.strict) do |hash|
# module_function creates private instance methods that are difficult to type
hash[D::Ruby::NoMethod] = :hint
# set_backtrace has three overloads (String|Array[String], Array[Location], nil)
# and Steep can't pick one when given a `(Array[String] | nil)` union from
# `cause.backtrace`. The narrow workaround would change observable
# behavior (set_backtrace([]) vs set_backtrace(nil) leave a different
# backtrace on the resulting error), so the hint stays.
hash[D::Ruby::UnresolvedOverloading] = :hint
# The deprecated.rb DSL forwards **kwargs of unknown shape and the
# fiber-local Fiber[] reader returns untyped — both intentional.
hash[D::Ruby::FallbackAny] = :hint
end
end