Module Nullsafe__NullsafeMode
module Trust : sig ... end
type t
=
|
Default
|
Local of Trust.t
|
Strict
val of_annot : IR.Annot.t -> t option
Returns
t
when provided annotation matches the format of@Nullsafe
, otherwiseNone
.
val of_class : IR.Tenv.t -> IR.JavaClassName.t -> t
Extracts mode information from class annotations
val of_procname : IR.Tenv.t -> IR.Procname.t -> t
Extracts mode information from a class where procname is defined
val is_in_trust_list : t -> IR.JavaClassName.t -> bool
Check whether
JavaClassName.t
is in explicit trust list specified in the mode
val is_stricter_than : stricter:t -> weaker:t -> bool
Check whether
stricter
is (strongly) stricter thanweaker
val severity : t -> IBase.IssueType.severity
Provides a default choice of issue severity for a particular mode. Rule is: severity should be ERROR if and only if it is enforced.
val pp : Stdlib.Format.formatter -> t -> unit
type nested_class_annotation_problem
=
|
RedundantNestedClassAnnotation
Nested mode is explicitly annotated exactly like the outer one.
|
NestedModeIsWeaker of weak_type
Attempt to relax the mode imposed in the outer class.
and weak_type
=
|
ExtraTrustClass of IR.JavaClassName.t list
Nested class has this extra list of classes
|
Other
val check_problematic_class_annotation : IR.Tenv.t -> IR.JavaClassName.t -> (unit, nested_class_annotation_problem) IStdlib.IStd.result
Given a (not anonymous) class name, check if there are semantic problems with
@Nullsafe
mode annotation for this class