Skip to content

Commit

Permalink
Disable ocamlformat for cmdliner
Browse files Browse the repository at this point in the history
  • Loading branch information
bobot committed Jun 16, 2021
1 parent f0486ae commit 37da607
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 29 deletions.
69 changes: 40 additions & 29 deletions bin/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,10 @@ module Options_implied_by_dash_p = struct
let doc =
"Promote the generated <package>.install files to the source tree"
in
Arg.(last & opt_all ~vopt:true bool [false] & info [ "promote-install-files" ] ~docs ~doc)
Arg.(
last
& opt_all ~vopt:true bool [ false ]
& info [ "promote-install-files" ] ~docs ~doc)
in
{ root
; only_packages = No_restriction
Expand All @@ -411,20 +414,29 @@ module Options_implied_by_dash_p = struct
}

let dash_dash_release =
Arg.(
value & alias ["--root";".";"--ignore-promoted-rules";"--no-config";
"--profile";"release";"--always-show-command-line";
"--promote-install-files";
"--default-target";"@install"]
& info [ "release" ] ~docs ~docv:"PACKAGES"
~doc:
"Put $(b,dune) into a reproducible $(i,release) mode. This is in \
fact a shorthand for $(b,--root . --ignore-promoted-rules \
--no-config --profile release --always-show-command-line \
--promote-install-files --default-target @install). You should \
use this option for release builds. For instance, you must use \
this option in your $(i,<package>.opam) files. Except if you \
already use $(b,-p), as $(b,-p) implies this option.")
Arg.(
value
& alias
[ "--root"
; "."
; "--ignore-promoted-rules"
; "--no-config"
; "--profile"
; "release"
; "--always-show-command-line"
; "--promote-install-files"
; "--default-target"
; "@install"
]
& info [ "release" ] ~docs ~docv:"PACKAGES"
~doc:
"Put $(b,dune) into a reproducible $(i,release) mode. This is in \
fact a shorthand for $(b,--root . --ignore-promoted-rules \
--no-config --profile release --always-show-command-line \
--promote-install-files --default-target @install). You should \
use this option for release builds. For instance, you must use \
this option in your $(i,<package>.opam) files. Except if you \
already use $(b,-p), as $(b,-p) implies this option.")

let options =
let+ t = options
Expand Down Expand Up @@ -452,19 +464,18 @@ module Options_implied_by_dash_p = struct
{ t with only_packages }

let dash_p =
Term.with_used_args
Arg.(
value
& alias_opt (fun s -> ["--release";"--only-packages";s] )
& info
[ "p"; "for-release-of-packages" ]
~docs ~docv:"PACKAGES"
~doc:
"Shorthand for $(b,--release --only-packages PACKAGE). You \
must use this option in your $(i,<package>.opam) files, in \
order to build only what's necessary when your project \
contains multiple packages as well as getting reproducible \
builds.")
Term.with_used_args
Arg.(
value
& alias_opt (fun s -> [ "--release"; "--only-packages"; s ])
& info
[ "p"; "for-release-of-packages" ]
~docs ~docv:"PACKAGES"
~doc:
"Shorthand for $(b,--release --only-packages PACKAGE). You must \
use this option in your $(i,<package>.opam) files, in order to \
build only what's necessary when your project contains multiple \
packages as well as getting reproducible builds.")

let term =
let+ t = options
Expand All @@ -475,7 +486,7 @@ module Options_implied_by_dash_p = struct
in
Arg.(
last
& opt_all (some profile) [None]
& opt_all (some profile) [ None ]
& info [ "profile" ] ~docs
~env:(Arg.env_var ~doc "DUNE_PROFILE")
~doc:
Expand Down
22 changes: 22 additions & 0 deletions vendor/.ocamlformat-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmdliner/src/cmdliner_arg.ml
cmdliner/src/cmdliner_arg.mli
cmdliner/src/cmdliner_base.ml
cmdliner/src/cmdliner_base.mli
cmdliner/src/cmdliner_cline.ml
cmdliner/src/cmdliner_cline.mli
cmdliner/src/cmdliner_docgen.ml
cmdliner/src/cmdliner_docgen.mli
cmdliner/src/cmdliner_info.ml
cmdliner/src/cmdliner_info.mli
cmdliner/src/cmdliner_manpage.ml
cmdliner/src/cmdliner_manpage.mli
cmdliner/src/cmdliner.ml
cmdliner/src/cmdliner.mli
cmdliner/src/cmdliner_msg.ml
cmdliner/src/cmdliner_msg.mli
cmdliner/src/cmdliner_suggest.ml
cmdliner/src/cmdliner_suggest.mli
cmdliner/src/cmdliner_term.ml
cmdliner/src/cmdliner_term.mli
cmdliner/src/cmdliner_trie.ml
cmdliner/src/cmdliner_trie.mli

0 comments on commit 37da607

Please sign in to comment.