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

Kakadu / zanuda / 18

17 Sep 2025 05:06PM UTC coverage: 85.847% (-1.5%) from 87.346%
18

push

github

Kakadu
Repair coverage testing

Signed-off-by: Kakadu <Kakadu@pm.me>

2032 of 2367 relevant lines covered (85.85%)

477.23 hits per line

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

94.12
/src/fix/refactoring/utils.ml
1
[@@@ocaml.text "/*"]
2

3
(** Copyright 2021-2024, Kakadu. *)
4

5
(** SPDX-License-Identifier: LGPL-3.0-or-later *)
6

7
[@@@ocaml.text "/*"]
8

9
open Location
10
open Typedtree
11
open Replacement.Refill
12

13
type end_point =
14
  | Start
15
  | End
16

17
type point =
18
  { loc : Location.t
19
  ; pos : end_point
20
  }
21

22
let position { loc; pos } =
23
  match pos with
84✔
24
  | Start -> loc.loc_start
61✔
25
  | End -> loc.loc_end
23✔
26
;;
27

28
let make_point loc pos = { loc; pos }
18✔
29
let pat_point p point = { loc = p.pat_loc; pos = point }
9✔
30
let exp_point e point = { loc = e.exp_loc; pos = point }
30✔
31
let exp_start e = exp_point e Start
16✔
32
let exp_end e = exp_point e End
14✔
33

34
let gen_loc spoint epoint =
35
  { loc_start = position spoint; loc_end = position epoint; loc_ghost = false }
42✔
36
;;
37

38
let fname loc = loc.loc_start.pos_fname
49✔
39
let set_payload ({ location; _ } as r) = add (fname location) r
49✔
40

41
let set_padding p p' payload =
42
  let location = gen_loc p p' in
42✔
43
  set_payload { location; payload }
42✔
44
;;
45

46
let set_empty_padding p p' = set_padding p p' Void
23✔
47

48
open Lexing
49

50
let shift_point_cnum { loc; pos } offset =
51
  match pos with
9✔
52
  | Start ->
9✔
53
    { loc =
54
        { loc with
55
          loc_start = { loc.loc_start with pos_cnum = loc.loc_start.pos_cnum + offset }
56
        }
57
    ; pos
58
    }
59
  | End ->
×
60
    { loc =
61
        { loc with
62
          loc_end = { loc.loc_end with pos_cnum = loc.loc_end.pos_cnum + offset }
63
        }
64
    ; pos
65
    }
66
;;
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