Skip to content

Commit 06be5c8

Browse files
committed
Better error message when ocamlformat emit source triggering warning 50
1 parent fe70498 commit 06be5c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Translation_unit.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ module Error = struct
6262
let print_internal_error ~debug ~quiet fmt e =
6363
let s =
6464
match e with
65-
| `Cannot_parse _ -> "generating invalid ocaml syntax"
65+
| `Cannot_parse (Parse_with_comments.Warning50 _) -> "generating invalid comment attachment"
66+
| `Cannot_parse e -> "generating invalid ocaml syntax"
6667
| `Ast_changed -> "ast changed"
6768
| `Comment _ -> "comment changed"
6869
| `Warning50 _ -> "misplaced documentation comment"

0 commit comments

Comments
 (0)