module Report: sig .. end
Reports of check violations.
Base elements
type kind =
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 {
}
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:
- its kind
knd;
- its category name
cat;
- its check name
chk;
- its filename
fn;
- its line
ln;
- its column
cn;
- its message
msg.
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:
no_info indicates whether Info elements are ignored;
no_warning indicates whether Warning elements are ignored;
no_error indicates whether Error elements are ignored.
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.