ocaml-ppx / ocamlformat

Auto-formatter for OCaml code
MIT License
633 stars 179 forks source link

Bug: Infinite loop occurs when multiple comments are between `|>` and `let*` #2555

Open lentil32 opened 5 months ago

lentil32 commented 5 months ago

Describe the bug

ocamlformat errors:
ocamlformat: Cannot process "/path/to/file/test.ml".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: formatting did not stabilize after 10 iterations.

How to Reproduce Minimal sample code that occurs same error:

a |> (* *)

  (*  *)
let* b = 1 in
a

.ocamlformat:

profile=default
hhugo commented 6 days ago

2457