forked from facebook/pyre-check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.mli
145 lines (127 loc) · 3.42 KB
/
configuration.mli
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
(* Copyright (c) 2016-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. *)
open Pyre
module Features : sig
type t = {
click_to_fix: bool;
go_to_definition: bool;
hover: bool;
}
[@@deriving yojson, show]
val create : string option -> t
val default : t
end
module Analysis : sig
type incremental_style =
| Shallow
| FineGrained
[@@deriving show]
type t = {
infer: bool;
configuration_file_hash: string option;
parallel: bool;
analyze_external_sources: bool;
filter_directories: Path.t list option;
ignore_all_errors: Path.t list option;
number_of_workers: int;
local_root: Path.t;
debug: bool;
project_root: Path.t;
source_path: Path.t list;
search_path: SearchPath.t list;
taint_model_paths: Path.t list;
expected_version: string option;
strict: bool;
show_error_traces: bool;
excludes: Str.regexp list;
extensions: string list;
store_type_check_resolution: bool;
incremental_style: incremental_style;
include_hints: bool;
perform_autocompletion: bool;
features: Features.t;
ignore_infer: Path.t list;
log_directory: Path.t;
}
[@@deriving show, eq]
val create
: ?infer:bool ->
?configuration_file_hash:string ->
?parallel:bool ->
?analyze_external_sources:bool ->
?filter_directories:Path.t list ->
?ignore_all_errors:Path.t list ->
?number_of_workers:int ->
?local_root:Path.t ->
?project_root:Path.t ->
?search_path:SearchPath.t list ->
?taint_model_paths:Path.t list ->
?expected_version:string ->
?strict:bool ->
?debug:bool ->
?show_error_traces:bool ->
?excludes:string list ->
?extensions:string list ->
?store_type_check_resolution:bool ->
?incremental_style:incremental_style ->
?include_hints:bool ->
?perform_autocompletion:bool ->
?features:Features.t ->
?ignore_infer:Path.t list ->
?log_directory:string ->
source_path:Path.t list ->
unit ->
t
val log_directory : t -> Path.t
val search_path : t -> SearchPath.t list
val features : t -> Features.t
end
module Server : sig
type load_parameters = {
shared_memory_path: Path.t;
changed_files_path: Path.t option;
}
type load =
| LoadFromFiles of load_parameters
| LoadFromProject of {
project_name: string;
metadata: string option;
}
type saved_state_action =
| Save of string
| Load of load
type socket_path = {
path: Path.t;
(* actual path to socket (OCaml has limits on socket path length) *)
link: Path.t; (* symbolic link to path in pyre directory *)
}
type t = {
(* Server-specific configuration options *)
socket: socket_path;
json_socket: socket_path;
adapter_socket: socket_path;
lock_path: Path.t;
pid_path: Path.t;
log_path: Path.t;
daemonize: bool;
saved_state_action: saved_state_action option;
(* Analysis configuration *)
configuration: Analysis.t;
}
val set_global : t -> unit
val get_global : unit -> t option
end
module StaticAnalysis : sig
type t = {
(* A directory to write files in. *)
result_json_path: Path.t option;
dump_call_graph: bool;
verify_models: bool;
(* Analysis configuration *)
configuration: Analysis.t;
rule_filter: int list option;
find_obscure_flows: bool;
}
end