ocamlformat icon indicating copy to clipboard operation
ocamlformat copied to clipboard

Auto-formatter for OCaml code

Results 143 ocamlformat issues
Sort by recently updated
recently updated
newest added

The indentation feels off in the following example: ```ocaml let rec equal_list : 'a. ('a, 't) gexpr marked list -> ('a, 't) gexpr marked list -> bool = fun es1...

Kind/Bug :x:

Hi all, I use the following `.ocamlformat`: ``` profile=default ocaml-version=4.14.0 ``` When I try to apply it on this code: ```ocaml let () = f (object method m x =...

Kind/Bug :x:

OCaml 4.11.1, ocamlformat 0.24.1, code with objects and classes. I have the following `.ocamlformat` file: ```ini profile = janestreet version = 0.24.1 ``` Code formatted with ocamlformat contains no indents...

Kind/Bug :x:

In the following example, some arguments are on the same line (` ~sponge:sponge_before_evaluations ~xi ~advice ~opening`) while some the others are listed as a single argument per line. I think...

Kind/style-suggestion

When using ocamlformat under emacs, a buffer pops up very often saying the following ``` ocamlformat errors: ocamlformat: SRC… arguments: no '117-117' file Usage: ocamlformat [OPTION]… [SRC]… Try 'ocamlformat --help'...

Kind/Bug :x:

Extracted from ocamlformat-ng's concrete AST, replacing the convoluted pattern `Ppat_constraint(Ppat_unpack x, Ptyp_package y)` with `Ppat_unpack(x, Some y)` Preserving this syntax (and not removing/adding keywords) makes the formatting of comments easier.

CLA Signed

Extracted from ocamlformat-ng's concrete AST PS: preserving this syntax (and not removing/adding keywords) makes the formatting of comments easier.

CLA Signed

```bash $ ls -a . .. .ocamlformat .ocamlformat-ignore a.ml $ cat .ocamlformat $ cat .ocamlformat-ignore *.ml $ cat a.ml let _ = 1 $ ocamlformat a.ml let _ = 1...

Kind/Bug :x:

**What is the reason for this new style?** * Consistency with other `fit-or-vertical` wrapping options * Makes function calls with many arguments easier to read, particularly for printf/format-style calls where...

Kind/style-suggestion
Good-first-issue :green_heart: