Module Report

module Report: sig .. end
Reports of check violations.


Base elements

type kind = 
| Info (*
Lowest level of element.
*)
| Warning (*
Medium level of element.
*)
| Error (*
Highest level of element.
*)
The type of element kinds, that is the level of a report element.
val string_of_kind : kind -> string
Converts the passed kind into a string.
type element = private {
   kind : kind; (*
Kind (level) of element.
*)
   category : CategoryName.t; (*
Category of element.
*)
   check : CheckName.t; (*
Check of element.
*)
   filename : string; (*
Location of violation.
*)
   line : int; (*
Location of violation.
*)
   column : int option; (*
Location of violation.
*)
   message : string; (*
Short description of violation.
*)
}
The type of report element, that is check violations.

Reports

type t 
The type of reports, that is collections of elements.
val empty : t
The empty report.
val statistics : t -> int * int * int
Returns the numbers of Info, Warning, and Error element in the passed report.
val add : kind ->
CategoryName.t ->
CheckName.t -> string -> int -> int option -> string -> t -> t
add knd cat chk fn ln cn msg x returns x augmented with a new element, duplicate elements being discarded.

The added element is defined by:


val concat : t -> t -> t
Concatenates the passed reports into a new one.
val concat_list : t list -> t
Concatenates the passed list of reports into a new one.
val filter : bool -> bool -> bool -> Ignore.t list -> t -> t
filter no_info no_warning no_error il rep filters the report elements of rep by ignoring elements in il; additionally:
val iter : (element -> unit) -> t -> unit
iter f rep iterates over the report elements of rep by applying f.
val map : (element -> 'a) -> t -> 'a list
map f rep maps the report elements of rep through f.
val fold : (element -> 'a -> 'a) -> 'a -> t -> 'a
fold f z rep folds over the report elements of rep, starting with value z and using function f.
val split_by_file : t -> (string * t) list
Splits the passed report, returning an association list from filenames to associated (sub-)reports.