Closed ncik-roberts closed 9 months ago
Here's an example OCaml warning that we want the heuristic to catch:
# let f None = ();;
Warning 8 [partial-match]: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
Some _
val f : 'a option -> unit = <fun>
This suggests that looking for the whitespace-separated token Warning
would work. (It's still fragile, but it's a lightweight way to improve the heuristic.)
Currently, the OCaml warning detection heuristic looks for the string "Warning".
As you can imagine, this has false positives, but, more relevantly, it has false positives for the
Location
library in the compiler distribution.Location.t
gets printed asWarnings.loc
by the top-level, which meets the heuristic.Input:
Output of mdx:
This is confusing behavior, as it's not clear what about the output meets the standard of "mdx-error".