-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix --enable-outside-detected-project (#1156)
* Add tests for --enable-outside-detected-project * Fix --enable-outside-detected-project and --root options no longer working Since 45f324, parsing of option is done later in that file, after those options are checked at toplevel.
- Loading branch information
Showing
9 changed files
with
92 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(rule | ||
(targets enable_outside_detected_project.output) | ||
(deps enable_outside_detected_project/dune-project | ||
enable_outside_detected_project/main.ml) | ||
(action | ||
(with-stdout-to | ||
%{targets} | ||
(chdir | ||
enable_outside_detected_project | ||
(run ocamlformat --enable-outside-detected-project main.ml))))) | ||
|
||
(alias | ||
(name runtest) | ||
(action | ||
(diff enable_outside_detected_project.expected | ||
enable_outside_detected_project.output))) | ||
|
||
(rule | ||
(targets outside_detected_project.output) | ||
(deps outside_detected_project/dune-project outside_detected_project/main.ml) | ||
(action | ||
(with-outputs-to | ||
%{targets} | ||
(chdir | ||
outside_detected_project | ||
(run ocamlformat main.ml))))) | ||
|
||
(alias | ||
(name runtest) | ||
(action | ||
(diff outside_detected_project.expected outside_detected_project.output))) |
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 @@ | ||
(* The following code should be formatted using OCamlformat's config and not | ||
default *) | ||
type t = {foooooo: string; baaaaar: Baaaaar.t} |
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 @@ | ||
(lang dune 1.11) |
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 @@ | ||
(* The following code should be formatted using OCamlformat's config and not default *) | ||
type t = { | ||
foooooo : string; | ||
baaaaar : Baaaaar.t; | ||
} |
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,7 @@ | ||
File main.ml | ||
Warning: Ocamlformat disabled because [--enable-outside-detected-project] is not set and no [.ocamlformat] was found within the project (root: ../outside_detected_project) | ||
(* The following code should not be formatted *) | ||
type t = { | ||
foooooo : string; | ||
baaaaar : Baaaaar.t; | ||
} |
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 @@ | ||
(lang dune 1.11) |
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 @@ | ||
(* The following code should not be formatted *) | ||
type t = { | ||
foooooo : string; | ||
baaaaar : Baaaaar.t; | ||
} |