This file is indexed.

/usr/lib/ocaml/atdgen/ag_validate.ml is in libatdgen-ocaml-dev 1.3.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
(*
  Mapping from ATD to "validate"
*)

type validate_repr = (string option * bool)
    (* (opt_v, b)
       is obtained by analyzing all available type definitions.
       The first value opt_v is the optional local validator
       coming from an ATD annotation (see `Local).
       The second value b is true iff the data doesn't need scanning.

       There are four cases:
       opt_v = None && b = true => no validation is needed at all
       opt_v = None && b = false => validators must be called on some
                                    sub-fields of the data
       opt_v <> None && b = true => the given validator must be called
                                    but there's no need to look into
                                    the sub-fields
       opt_v <> None && b = false => the given validator must be called
                                     in addition to scanning sub-fields
    *)

let get_validator an =
  Atd_annot.get_field (fun s -> Some (Some s)) None
    ["ocaml"] "validator" an