• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ocaml / odoc / 2072

10 Jun 2024 10:09AM UTC coverage: 71.986% (+0.2%) from 71.774%
2072

Pull #1145

github

web-flow
Merge 1b7b0910b into 1ced6f23f
Pull Request #1145: "Global" Sidebar

195 of 220 new or added lines in 12 files covered. (88.64%)

630 existing lines in 13 files now uncovered.

9834 of 13661 relevant lines covered (71.99%)

3561.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.29
/src/document/renderer.ml
1
(** Standard definition and types for all renderers *)
2

3
type syntax = OCaml | Reason
4

5
let string_of_syntax = function OCaml -> "ml" | Reason -> "re"
×
6

7
type page = {
8
  filename : Fpath.t;
9
  content : Format.formatter -> unit;
10
  children : page list;
11
}
12

13
let traverse ~f t =
14
  let rec aux node =
350✔
15
    f node.filename node.content;
1,538✔
16
    List.iter aux node.children
1,538✔
17
  in
18
  List.iter aux t
19

20
type input =
21
  | CU of Odoc_model.Lang.Compilation_unit.t
22
  | Page of Odoc_model.Lang.Page.t
23

24
type 'a t = {
25
  name : string;
26
  render : 'a -> Types.Document.t -> page list;
27
  extra_documents : 'a -> input -> Types.Document.t list;
28
}
29

30
let document_of_page ~syntax ?sidebar v =
31
  match syntax with
46✔
NEW
UNCOV
32
  | Reason -> Reason.page ?sidebar v
×
33
  | OCaml -> ML.page ?sidebar v
46✔
34

35
let documents_of_source_tree ~syntax v =
UNCOV
36
  match syntax with Reason -> Reason.source_tree v | OCaml -> ML.source_tree v
×
37

38
let documents_of_implementation ~syntax v =
39
  match syntax with
26✔
UNCOV
40
  | Reason -> Reason.implementation v
×
41
  | OCaml -> ML.implementation v
26✔
42

43
let document_of_compilation_unit ~syntax ?sidebar v =
44
  match syntax with
276✔
NEW
UNCOV
45
  | Reason -> Reason.compilation_unit ?sidebar v
×
46
  | OCaml -> ML.compilation_unit ?sidebar v
276✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc