forked from ocaml-ppx/ocamlformat
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regression tests, fix issues with comments causing non-stability,…
… fix issue with default modalities in empty signatures. Signed-off-by: Thomas Del Vecchio <[email protected]>
- Loading branch information
1 parent
4b1dfb3
commit 501abe2
Showing
19 changed files
with
164 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
@@ (* a *) | ||
|
||
(* b *) | ||
moda1 (* c *) moda2 | ||
(* b *) moda1 (* c *) moda2 | ||
|
||
(* d *) | ||
val x : int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
@@ (* a *) | ||
|
||
(* b *) | ||
moda1 (* c *) moda2 | ||
(* b *) moda1 (* c *) moda2 | ||
|
||
(* d *) | ||
val x : int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
Warning: tests/layout_abbreviation.ml:2044 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2058 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2090 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2105 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2122 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2139 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2141 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2187 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2194 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2266 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2268 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2277 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2089 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2104 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2121 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2138 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2140 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2186 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2193 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2265 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2267 exceeds the margin | ||
Warning: tests/layout_abbreviation.ml:2276 exceeds the margin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(** a *) | ||
|
||
(** b *) | ||
|
||
@@ a b c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ocamlformat: ignoring "tests/modality_comments_failure.mli" (misplaced documentation comments - warning 50) | ||
File "tests/modality_comments_failure.mli", line 3, characters 0-8: | ||
3 | (** b *) | ||
^^^^^^^^ | ||
Warning 50 [unexpected-docstring]: unattached documentation comment (ignored) | ||
Hint: (Warning 50) This file contains a documentation comment (** ... *) that the OCaml compiler does not know how to attach to the AST. OCamlformat does not support these cases. You can find more information at: https://github.com/ocaml-ppx/ocamlformat#overview. If you'd like to disable this check and let ocamlformat make a choice (though it might not be consistent with the ocaml compilers and odoc), you can set the --no-comment-check option. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ocamlformat: ignoring "tests/modality_comments_failure.mli" (misplaced documentation comments - warning 50) | ||
File "tests/modality_comments_failure.mli", line 3, characters 0-8: | ||
3 | (** b *) | ||
^^^^^^^^ | ||
Warning 50 [unexpected-docstring]: unattached documentation comment (ignored) | ||
Hint: (Warning 50) This file contains a documentation comment (** ... *) that the OCaml compiler does not know how to attach to the AST. OCamlformat does not support these cases. You can find more information at: https://github.com/ocaml-ppx/ocamlformat#overview. If you'd like to disable this check and let ocamlformat make a choice (though it might not be consistent with the ocaml compilers and odoc), you can set the --no-comment-check option. |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@@ mmmmmmmmm m (* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*) mmmmmmmmmm mmmmmmmmmm mmmmm mm m | ||
|
||
val command : Command.t @@ mmmmmmmm m mmmmm mmm mmmmmmmm (* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*) mmmmmmm mmmmm mmmmmm |
20 changes: 20 additions & 0 deletions
20
test/passing/tests/modality_comments_regression.mli.js-ref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@@ m | ||
m | ||
mm | ||
mmmmm | ||
mmmmmmmmm | ||
(* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*) | ||
mmmmmmmmmm | ||
mmmmmmmmmm | ||
|
||
val command | ||
: Command.t | ||
@@ m | ||
mmm | ||
mmmmm | ||
mmmmm | ||
mmmmmm | ||
(* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*) | ||
mmmmmmm | ||
mmmmmmmm | ||
mmmmmmmm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@@ m | ||
m | ||
mm | ||
mmmmm | ||
mmmmmmmmm | ||
(* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*) | ||
mmmmmmmmmm | ||
mmmmmmmmmm | ||
|
||
val command : Command.t | ||
@@ m | ||
mmm | ||
mmmmm | ||
mmmmm | ||
mmmmmm | ||
(* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*) | ||
mmmmmmm | ||
mmmmmmmm | ||
mmmmmmmm |