-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--no-comment-check ignores floating doc comments (#2456)
This fixes a regression introduced in #1672 making --no-comment-check less useful.
- Loading branch information
Showing
6 changed files
with
105 additions
and
1 deletion.
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
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 @@ | ||
(* When using [--no-comment-check] (to format code despite warning 50), | ||
We should not complain if doc-comments start appearing in the AST. | ||
*) | ||
|
||
module type T = sig | ||
val test_raises_some_exc : ('a -> 'b) -> 'a -> bool;; | ||
(** AAAA *) | ||
|
||
val test_raises_this_exc : exn -> ('a -> 'b) -> 'a -> bool;; | ||
(** BBBB *) | ||
end | ||
|
||
module T = struct | ||
|
||
let test_raises_some_exc = 2;; | ||
(** CCCC *) | ||
|
||
let test_raises_this_exc = 3;; | ||
(** DDDD *) | ||
end |
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 @@ | ||
--no-comment-check -q --max-iters=3 |
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 @@ | ||
(* When using [--no-comment-check] (to format code despite warning 50), We | ||
should not complain if doc-comments start appearing in the AST. *) | ||
|
||
module type T = sig | ||
val test_raises_some_exc : ('a -> 'b) -> 'a -> bool | ||
|
||
(** AAAA *) | ||
|
||
val test_raises_this_exc : exn -> ('a -> 'b) -> 'a -> bool | ||
(** BBBB *) | ||
end | ||
|
||
module T = struct | ||
let test_raises_some_exc = 2 | ||
|
||
(** CCCC *) | ||
|
||
(** DDDD *) | ||
let test_raises_this_exc = 3 | ||
end |