From f8d5230a4fe0f85f8d046ed2e2884574f419a28f Mon Sep 17 00:00:00 2001 From: Corentin De Souza <9597216+fantazio@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:37:09 +0100 Subject: [PATCH 1/3] [check][exp] fix expected results for opt args in preprocessed_lib Optional arguments always/never used have a peculiar semantic. If a function is only used internally, then the optional arguments reports only contain references to the implementation (`.ml`). If it is only used externally, and there is an interface (`.mli`), then they only contain references to the interface (`.mli`). However, when it is used both internally and externally, then they contain references to both, depending on the internal and external uses of the optional arguments. This is why the optional arguments reports may appear as "duplicated" : the same optional argument is referenced as always/never used both in the `.ml` and the `.mli`. The expected reports for optional arguments in `preprocessed_lib/preprocessed.ml` were therefore invalid because they were "unified", as if internal and external uses all counted as internal uses. By following the described semantics, the `?internal` (resp. `?external`) optional argument is now expected to be reported as always used for the `.ml` (resp. `.mli`). Similarly for the `?external` (resp. `?internal`) which is expected to be reported as never used in the `.ml` (resp. `.mli`). Because of this dissociation, the `?external` and `?internal` arguments are not expected to be reported as almost always/never used anymore in the threshold-3-0.5 test scenario. --- check/classic/classic.exp | 6 ++++++ check/classic/classic.ref | 12 +++++++++--- check/internal/internal.exp | 6 ++++++ check/internal/internal.ref | 12 +++++++++--- check/threshold-1/threshold-1.exp | 6 ++++++ check/threshold-1/threshold-1.ref | 12 +++++++++--- check/threshold-3-0.5/threshold-3-0.5.exp | 10 ++++++---- check/threshold-3-0.5/threshold-3-0.5.ref | 22 ++++++++++++++-------- 8 files changed, 65 insertions(+), 21 deletions(-) diff --git a/check/classic/classic.exp b/check/classic/classic.exp index ff70f27..155a121 100644 --- a/check/classic/classic.exp +++ b/check/classic/classic.exp @@ -242,6 +242,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -378,8 +381,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt diff --git a/check/classic/classic.ref b/check/classic/classic.ref index e6452e5..bb5280c 100644 --- a/check/classic/classic.ref +++ b/check/classic/classic.ref @@ -242,6 +242,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -378,8 +381,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt @@ -533,7 +539,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 460 +Total: 466 Success: 460 -Failed: 0 -Ratio: 100.% +Failed: 6 +Ratio: 98.7124463519% diff --git a/check/internal/internal.exp b/check/internal/internal.exp index d5e7832..e29484a 100644 --- a/check/internal/internal.exp +++ b/check/internal/internal.exp @@ -210,6 +210,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -346,8 +349,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt diff --git a/check/internal/internal.ref b/check/internal/internal.ref index ef171b0..5c5a1b8 100644 --- a/check/internal/internal.ref +++ b/check/internal/internal.ref @@ -210,6 +210,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -346,8 +349,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt @@ -501,7 +507,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 430 +Total: 436 Success: 430 -Failed: 0 -Ratio: 100.% +Failed: 6 +Ratio: 98.623853211% diff --git a/check/threshold-1/threshold-1.exp b/check/threshold-1/threshold-1.exp index 41ed3e7..abda794 100644 --- a/check/threshold-1/threshold-1.exp +++ b/check/threshold-1/threshold-1.exp @@ -518,6 +518,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -654,8 +657,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt diff --git a/check/threshold-1/threshold-1.ref b/check/threshold-1/threshold-1.ref index 1ef3c2f..6de5f5f 100644 --- a/check/threshold-1/threshold-1.ref +++ b/check/threshold-1/threshold-1.ref @@ -518,6 +518,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -654,8 +657,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt @@ -809,7 +815,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 701 +Total: 707 Success: 701 -Failed: 0 -Ratio: 100.% +Failed: 6 +Ratio: 99.1513437058% diff --git a/check/threshold-3-0.5/threshold-3-0.5.exp b/check/threshold-3-0.5/threshold-3-0.5.exp index 49014d8..4c39804 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.exp +++ b/check/threshold-3-0.5/threshold-3-0.5.exp @@ -707,6 +707,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -841,8 +844,6 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST ALWAYS: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls) -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) @@ -936,8 +937,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt @@ -1042,8 +1046,6 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST NEVER: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls) -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) diff --git a/check/threshold-3-0.5/threshold-3-0.5.ref b/check/threshold-3-0.5/threshold-3-0.5.ref index 60e2afc..10a36ca 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.ref +++ b/check/threshold-3-0.5/threshold-3-0.5.ref @@ -707,6 +707,9 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always @@ -841,8 +844,8 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST ALWAYS: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls) -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls): Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls): Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) @@ -936,8 +939,11 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt @@ -1042,8 +1048,8 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST NEVER: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls) -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls): Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls): Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) @@ -1168,7 +1174,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 988 -Success: 988 -Failed: 0 -Ratio: 100.% +Total: 994 +Success: 984 +Failed: 10 +Ratio: 98.9939637827% From 2b8f7e2c04392d64c715d8574d7f06f120dc3cbb Mon Sep 17 00:00:00 2001 From: Corentin De Souza <9597216+fantazio@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:29:15 +0100 Subject: [PATCH 2/3] [tests][dune] add more tests with preprocessing and opt args The new tests are witnesses of the non-dissociation of the internal and external uses of the optional arguments. In particular, the optional arguments of the `Preprocessd.externally_used_f` function should only be reported with locations in `preprocessed_lib/preprocessed.mli` but are currently wrongly reported in `preprocessed_lib/preprocessed.ml`, as if there was no `.mli` like in the case of `Preprocessed_no_intf`. --- check/classic/classic.exp | 35 +++++++---- check/classic/classic.ref | 45 +++++++++----- check/internal/internal.exp | 34 ++++++---- check/internal/internal.ref | 44 ++++++++----- check/threshold-1/threshold-1.exp | 34 ++++++---- check/threshold-1/threshold-1.ref | 44 ++++++++----- check/threshold-3-0.5/threshold-3-0.5.exp | 50 +++++++++++---- check/threshold-3-0.5/threshold-3-0.5.ref | 62 ++++++++++++++----- .../use_preprocessed_lib/use_preprocessed.ml | 4 +- .../use_preprocessed_no_intf.ml | 4 +- .../preprocessed_lib/preprocessed.ml | 23 ++++++- .../preprocessed_lib/preprocessed.mli | 14 ++++- .../preprocessed_lib/preprocessed_no_intf.ml | 14 ++++- 13 files changed, 287 insertions(+), 120 deletions(-) diff --git a/check/classic/classic.exp b/check/classic/classic.exp index 155a121..a67970a 100644 --- a/check/classic/classic.exp +++ b/check/classic/classic.exp @@ -2,6 +2,7 @@ ========================= ./examples/using_dune/preprocessed_lib/preprocessed.mli:1: unused ./examples/using_dune/preprocessed_lib/preprocessed.mli:3: internally_used +./examples/using_dune/preprocessed_lib/preprocessed.mli:38: internally_used_f ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:2: unused ./examples/using_dune/unwrapped_lib/opt_args/opt_args.mli:1: unused_fun_with_single_never_used_opt_arg @@ -243,9 +244,14 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -383,11 +389,16 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -492,16 +503,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... diff --git a/check/classic/classic.ref b/check/classic/classic.ref index bb5280c..1b2e8d8 100644 --- a/check/classic/classic.ref +++ b/check/classic/classic.ref @@ -2,6 +2,7 @@ ========================= ./examples/using_dune/preprocessed_lib/preprocessed.mli:1: unused ./examples/using_dune/preprocessed_lib/preprocessed.mli:3: internally_used +./examples/using_dune/preprocessed_lib/preprocessed.mli:38: internally_used_f ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:2: unused ./examples/using_dune/unwrapped_lib/opt_args/opt_args.mli:1: unused_fun_with_single_never_used_opt_arg @@ -243,9 +244,15 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -383,11 +390,17 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -492,16 +505,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... @@ -539,7 +552,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 466 -Success: 460 -Failed: 6 -Ratio: 98.7124463519% +Total: 479 +Success: 469 +Failed: 10 +Ratio: 97.9123173278% diff --git a/check/internal/internal.exp b/check/internal/internal.exp index e29484a..a339bcc 100644 --- a/check/internal/internal.exp +++ b/check/internal/internal.exp @@ -211,9 +211,14 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -351,11 +356,16 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -460,16 +470,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... diff --git a/check/internal/internal.ref b/check/internal/internal.ref index 5c5a1b8..f4debb4 100644 --- a/check/internal/internal.ref +++ b/check/internal/internal.ref @@ -211,9 +211,15 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -351,11 +357,17 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -460,16 +472,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... @@ -507,7 +519,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 436 -Success: 430 -Failed: 6 -Ratio: 98.623853211% +Total: 448 +Success: 438 +Failed: 10 +Ratio: 97.7678571429% diff --git a/check/threshold-1/threshold-1.exp b/check/threshold-1/threshold-1.exp index abda794..c65d982 100644 --- a/check/threshold-1/threshold-1.exp +++ b/check/threshold-1/threshold-1.exp @@ -519,9 +519,14 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -659,11 +664,16 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -768,16 +778,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... diff --git a/check/threshold-1/threshold-1.ref b/check/threshold-1/threshold-1.ref index 6de5f5f..8237a13 100644 --- a/check/threshold-1/threshold-1.ref +++ b/check/threshold-1/threshold-1.ref @@ -519,9 +519,15 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -659,11 +665,17 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -768,16 +780,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... @@ -815,7 +827,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 707 -Success: 701 -Failed: 6 -Ratio: 99.1513437058% +Total: 719 +Success: 709 +Failed: 10 +Ratio: 98.6091794159% diff --git a/check/threshold-3-0.5/threshold-3-0.5.exp b/check/threshold-3-0.5/threshold-3-0.5.exp index 4c39804..2a6e839 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.exp +++ b/check/threshold-3-0.5/threshold-3-0.5.exp @@ -240,9 +240,13 @@ .>-> ALMOST UNUSED EXPORTED VALUES: Called 2 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./examples/using_dune/preprocessed_lib/preprocessed.mli:2: used -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: f +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: exported_f +./examples/using_dune/preprocessed_lib/preprocessed.mli:38: internally_used_f +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: externally_used_f ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:3: used ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: f +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: internally_used_f +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: externally_used_f ./examples/using_dune/unwrapped_lib/obj/with_class.mli:33: fun_class_factory @@ -708,9 +712,14 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -844,8 +853,13 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST ALWAYS: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?sometimes (1/2 calls) @@ -939,11 +953,16 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -1046,8 +1065,13 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST NEVER: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?sometimes (1/2 calls) @@ -1124,16 +1148,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... diff --git a/check/threshold-3-0.5/threshold-3-0.5.ref b/check/threshold-3-0.5/threshold-3-0.5.ref index 10a36ca..a4aaec3 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.ref +++ b/check/threshold-3-0.5/threshold-3-0.5.ref @@ -240,9 +240,13 @@ .>-> ALMOST UNUSED EXPORTED VALUES: Called 2 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./examples/using_dune/preprocessed_lib/preprocessed.mli:2: used -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: f +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: exported_f +./examples/using_dune/preprocessed_lib/preprocessed.mli:38: internally_used_f +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: externally_used_f ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:3: used ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: f +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: internally_used_f +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: externally_used_f ./examples/using_dune/unwrapped_lib/obj/with_class.mli:33: fun_class_factory @@ -708,9 +712,15 @@ Nothing else to report in this section ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?always ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?always @@ -846,8 +856,14 @@ Nothing else to report in this section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls): Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls): Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?sometimes (1/2 calls): Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls): Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?sometimes (1/2 calls) @@ -941,11 +957,17 @@ Nothing else to report in this section ============================ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected ./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: ?opt +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: ?opt ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?never ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?never @@ -1050,8 +1072,14 @@ Nothing else to report in this section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls): Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls): Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?sometimes (1/2 calls): Should not be detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls): Not detected ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?sometimes (1/2 calls) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:1: ?sometimes (1/2 calls) ./examples/using_dune/unwrapped_lib/opt_args/mixed_args.ml:8: ?sometimes (1/2 calls) @@ -1127,16 +1155,16 @@ Nothing else to report in this section .> CODING STYLE: =============== -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed.ml:67: let x = ... in x (=> useless binding) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: unit pattern unit_binding -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:65: val f: ... -> (... -> ?_:_ -> ...) -> ... -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:66: let () = ... in ... (=> use sequence) -./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:67: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:83: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed.ml:84: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed.ml:85: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed.ml:86: let x = ... in x (=> useless binding) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:76: unit pattern unit_binding +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:77: val f: ... -> (... -> ?_:_ -> ...) -> ... +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:78: let () = ... in ... (=> use sequence) +./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:79: let x = ... in x (=> useless binding) ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:20: val f: ... -> (... -> ?_:_ -> ...) -> ... ./examples/using_dune/unwrapped_lib/opt_args/opt_args_in_higher_order_fun.ml:22: val f: ... -> (... -> ?_:_ -> ...) -> ... @@ -1174,7 +1202,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 994 -Success: 984 -Failed: 10 -Ratio: 98.9939637827% +Total: 1022 +Success: 1004 +Failed: 18 +Ratio: 98.2387475538% diff --git a/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed.ml b/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed.ml index d009baf..7194266 100644 --- a/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed.ml +++ b/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed.ml @@ -18,7 +18,9 @@ let () = (* use record fields *) ignore r.externally_used let () = (* use optional arguments *) - f ~always:42 ~externally:42 () + exported_f ~always:42 ~externally:42 (); + externally_used_f ~always:42 ~sometimes:42 (); + externally_used_f ~always:42 () let is_used = ref false let mark_used () = diff --git a/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed_no_intf.ml b/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed_no_intf.ml index 3c14daa..edc5668 100644 --- a/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed_no_intf.ml +++ b/examples/using_dune/bin/use_preprocessed_lib/use_preprocessed_no_intf.ml @@ -18,7 +18,9 @@ let () = (* use record fields *) ignore r.externally_used let () = (* use optional arguments *) - f ~always:42 ~externally:42 () + f ~always:42 ~externally:42 (); + externally_used_f ~always:42 ~sometimes:42 (); + externally_used_f ~always:42 () let is_used = ref false let mark_used () = diff --git a/examples/using_dune/preprocessed_lib/preprocessed.ml b/examples/using_dune/preprocessed_lib/preprocessed.ml index f97a30a..1d91ea4 100644 --- a/examples/using_dune/preprocessed_lib/preprocessed.ml +++ b/examples/using_dune/preprocessed_lib/preprocessed.ml @@ -50,14 +50,33 @@ let () = (* use record fields *) ignore r.internally_used (* Optional arguments *) -let f ?never ?always ?internally ?externally () = +let exported_f ?never ?always ?internally ?externally () = ignore never; ignore always; ignore internally; ignore externally +let unexported_f ?never ?always ?sometimes () = + ignore never; + ignore always; + ignore sometimes + +let internally_used_f ?never ?always ?sometimes () = + ignore never; + ignore always; + ignore sometimes + +let externally_used_f ?never ?always ?sometimes () = + ignore never; + ignore always; + ignore sometimes + let () = (* use optional arguments *) - f ~always:42 ~internally:42 () + exported_f ~always:42 ~internally:42 (); + unexported_f ~always:42 ~sometimes:42 (); + unexported_f ~always:42 (); + internally_used_f ~always:42 ~sometimes:42 (); + internally_used_f ~always:42 () (* Stylistic issues *) let _ = diff --git a/examples/using_dune/preprocessed_lib/preprocessed.mli b/examples/using_dune/preprocessed_lib/preprocessed.mli index 865b8a5..23fbdbf 100644 --- a/examples/using_dune/preprocessed_lib/preprocessed.mli +++ b/examples/using_dune/preprocessed_lib/preprocessed.mli @@ -28,9 +28,21 @@ type record = { type record_with_eq = {implicitly_used : int} [@@deriving eq] -val f : +val exported_f : ?never:'a -> ?always:'b -> ?internally:'c -> ?externally:'d -> unit -> unit + +val internally_used_f : + ?never:'a -> + ?always:'b -> + ?sometimes:'c -> + unit -> unit + +val externally_used_f : + ?never:'a -> + ?always:'b -> + ?sometimes:'c -> + unit -> unit diff --git a/examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml b/examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml index f97a30a..36f3bf4 100644 --- a/examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml +++ b/examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml @@ -56,8 +56,20 @@ let f ?never ?always ?internally ?externally () = ignore internally; ignore externally +let internally_used_f ?never ?always ?sometimes () = + ignore never; + ignore always; + ignore sometimes + +let externally_used_f ?never ?always ?sometimes () = + ignore never; + ignore always; + ignore sometimes + let () = (* use optional arguments *) - f ~always:42 ~internally:42 () + f ~always:42 ~internally:42 (); + internally_used_f ~always:42 ~sometimes:42 (); + internally_used_f ~always:42 () (* Stylistic issues *) let _ = From faeb39116560baa555cb8d85693e4bc46ab97375 Mon Sep 17 00:00:00 2001 From: Corentin De Souza <9597216+fantazio@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:57:36 +0100 Subject: [PATCH 3/3] [src][sourcepath] remove `.pp` extension from sourcepath Rather than removing the `.pp` extension in `Utils.unit`, it is directly removed from the sourcepaths read in `.cmt` files. This way, compilation units remain consistent; and file paths read in locations are now also consistent with the sourcepaths. More details on why this fixes the observed FN and FP below. With this change, I measured a gain of ~10s (from ~22s to ~12s) when running the analyzer with `-v --all` on [Frama-C 31.0](https://git.frama-c.com/pub/frama-c/-/tree/31.0?ref_type=tags) on my machine. This is coherent with the few computations of the cmts' sourcepaths (once per `.cmt` read) vs the amount of time the compilation unit is computed (multiple times on every potentially meaningful location). As mentionned in f090928, there was a difference between the compilation unit of a preprocessed file and the one of an unpreprocessed file. Forcing them to have the same compilation unit by removing the `.pp` extension is sufficient in most cases. However, in the case of optional arguments, some computations relied on finding whether a location belongs to the current or a previously analyzed sourcefile, or if it belongs to an unknown (potentially analyzed later) sourcefile. In particular, `VdNode.eof` relies on this to discard "internal" locations and, thus, dissociate them from their corresponding "external" locations. This property is checked in `DeadCommon.VdNode.seen` by verifying if the location has a corresponding sourcepath in the `DeadCommon.abspath` table. This table associates compilation units (as obtained by `Utils.unit`) with sourcepaths (read in the `.cmi` and `.cmt` files) and is filled when starting the analysis of either a `.cmi` or a `.cmt`. Verifying that a location belongs to a known file is done by checking if its filename is a suffix of one of the sourcepaths associated with its compilation unit. The sourcepath of a `.cmt` file may end with `.pp.ml`, while locaitons found in the typedtree will not contain the `.pp` part. Therefore, the inconsistency observed in f090928 still remains for sourcepaths. Because of this inconsistency, the internal and external locations are not dissociated at the end of the analysis of a `.cmt`, leading to the observed FN and FP. --- check/classic/classic.ref | 26 ++++++++-------- check/internal/internal.ref | 26 ++++++++-------- check/threshold-1/threshold-1.ref | 26 ++++++++-------- check/threshold-3-0.5/threshold-3-0.5.ref | 36 +++++++++-------------- src/state/file_infos.ml | 3 +- src/utils.ml | 12 +++++--- src/utils.mli | 2 ++ 7 files changed, 62 insertions(+), 69 deletions(-) diff --git a/check/classic/classic.ref b/check/classic/classic.ref index 1b2e8d8..ec63591 100644 --- a/check/classic/classic.ref +++ b/check/classic/classic.ref @@ -243,13 +243,12 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always @@ -388,15 +387,14 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never @@ -552,7 +550,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 479 -Success: 469 -Failed: 10 -Ratio: 97.9123173278% +Total: 477 +Success: 477 +Failed: 0 +Ratio: 100.% diff --git a/check/internal/internal.ref b/check/internal/internal.ref index f4debb4..7701a71 100644 --- a/check/internal/internal.ref +++ b/check/internal/internal.ref @@ -210,13 +210,12 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always @@ -355,15 +354,14 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never @@ -519,7 +517,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 448 -Success: 438 -Failed: 10 -Ratio: 97.7678571429% +Total: 446 +Success: 446 +Failed: 0 +Ratio: 100.% diff --git a/check/threshold-1/threshold-1.ref b/check/threshold-1/threshold-1.ref index 8237a13..679bc9f 100644 --- a/check/threshold-1/threshold-1.ref +++ b/check/threshold-1/threshold-1.ref @@ -518,13 +518,12 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always @@ -663,15 +662,14 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never @@ -827,7 +825,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 719 -Success: 709 -Failed: 10 -Ratio: 98.6091794159% +Total: 717 +Success: 717 +Failed: 0 +Ratio: 100.% diff --git a/check/threshold-3-0.5/threshold-3-0.5.ref b/check/threshold-3-0.5/threshold-3-0.5.ref index a4aaec3..869665f 100644 --- a/check/threshold-3-0.5/threshold-3-0.5.ref +++ b/check/threshold-3-0.5/threshold-3-0.5.ref @@ -711,13 +711,12 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: ALWAYS: ============================= ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?always -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?always: Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?always +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?externally +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?always ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?always @@ -854,12 +853,9 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST ALWAYS: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls): Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls): Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?sometimes (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?sometimes (1/2 calls) -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?sometimes (1/2 calls): Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls): Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?sometimes (1/2 calls) @@ -955,15 +951,14 @@ Nothing else to report in this section .> OPTIONAL ARGUMENTS: NEVER: ============================ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally ./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?never -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?never: Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:84: ?opt -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never: Not detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never: Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?internally +./examples/using_dune/preprocessed_lib/preprocessed.mli:31: ?never +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?never ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:64: ?never @@ -1070,12 +1065,9 @@ Nothing else to report in this section .>-> OPTIONAL ARGUMENTS: ALMOST NEVER: Except 1 time(s): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?externally (1/2 calls): Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.ml:53: ?internally (1/2 calls): Should not be detected ./examples/using_dune/preprocessed_lib/preprocessed.ml:59: ?sometimes (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed.ml:64: ?sometimes (1/2 calls) -./examples/using_dune/preprocessed_lib/preprocessed.ml:69: ?sometimes (1/2 calls): Should not be detected -./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls): Not detected +./examples/using_dune/preprocessed_lib/preprocessed.mli:44: ?sometimes (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?externally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:53: ?internally (1/2 calls) ./examples/using_dune/preprocessed_lib/preprocessed_no_intf.ml:59: ?sometimes (1/2 calls) @@ -1202,7 +1194,7 @@ Nothing else to report in this section -------------------------------------------------------------------------------- -Total: 1022 -Success: 1004 -Failed: 18 -Ratio: 98.2387475538% +Total: 1014 +Success: 1014 +Failed: 0 +Ratio: 100.% diff --git a/src/state/file_infos.ml b/src/state/file_infos.ml index 19c4948..97fccaa 100644 --- a/src/state/file_infos.ml +++ b/src/state/file_infos.ml @@ -23,7 +23,8 @@ let empty = { let init_from_cmt_infos cmt_infos cmt_file = let builddir = cmt_infos.Cmt_format.cmt_builddir in let sourcepath = - Option.map (Filename.concat builddir) cmt_infos.cmt_sourcefile + Option.map Utils.remove_pp cmt_infos.cmt_sourcefile + |> Option.map (Filename.concat builddir) in let modname = cmt_infos.cmt_modname in {empty with cmti_file = cmt_file; diff --git a/src/utils.ml b/src/utils.ml index 0de8687..dced0d6 100644 --- a/src/utils.ml +++ b/src/utils.ml @@ -1,6 +1,10 @@ +let remove_pp fn = + let ext = Filename.extension fn in + let no_ext = Filename.remove_extension fn in + match Filename.extension no_ext with + | ".pp" -> Filename.remove_extension no_ext ^ ext + | _ -> fn + let unit fn = - let u = Filename.remove_extension (Filename.basename fn) in - match Filename.extension u with - | ".pp" -> Filename.remove_extension u - | _ -> u + Filename.remove_extension (Filename.basename fn) diff --git a/src/utils.mli b/src/utils.mli index 526dc8d..c99557e 100644 --- a/src/utils.mli +++ b/src/utils.mli @@ -1 +1,3 @@ +val remove_pp : string -> string + val unit : string -> string