File: make_corrected_file.mli

package info (click to toggle)
ppx-expect 0.17.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ml: 3,399; ansic: 104; javascript: 19; makefile: 15; sh: 2
file content (20 lines) | stat: -rw-r--r-- 925 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
open! Base

(** [f ~next_contents ~path ()] compares the contents of [path] against [next_contents].
    If the contents are unchanged, [f] returns [Ok ()]. If they are changed, it writes
    [next_contents] to [corrected_path], emits a build error, and returns [Error _]. The
    caller should exit nonzero (possibly by raising the returned error) to indicate to the
    build that an error occurred. If it doesn't, the build system may not recognize that a
    corrected file has been generated and needs to be moved out of a sandbox.

    The optional arguments support "expert" use cases. Most clients do not need them. *)
val f
  :  ?use_dot_patdiff:bool (** default: [false] *)
  -> ?corrected_path:string (** default: [path ^ ".corrected"] *)
  -> ?use_color:bool (** default: [false] *)
  -> ?diff_command:string
  -> ?diff_path_prefix:string
  -> next_contents:string
  -> path:string
  -> unit
  -> unit Or_error.t