Skip to content

Commit a9672bb

Browse files
committed
Update ocamlformat
1 parent e2b6532 commit a9672bb

22 files changed

+83
-83
lines changed

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=0.26.1
1+
version=0.27.0
22
profile=conventional
33
ocaml-version=4.08.0

bin/cli.mli

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ val force_output : [> `Force_output of bool ] t
1818
type output = File of string | Stdout
1919

2020
val output : [> `Output of output option ] t
21-
(** A --output option to overwrite the command output.
22-
One can pass it ["-"] to set it to stdout which should imply [force_output].
23-
[default_doc] is used to describe the default value in the command's
24-
manpage *)
21+
(** A --output option to overwrite the command output. One can pass it ["-"] to
22+
set it to stdout which should imply [force_output]. [default_doc] is used to
23+
describe the default value in the command's manpage *)
2524

2625
val setup : [> `Setup of unit ] t

lib/block.mli

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ type toplevel_value = {
4545

4646
type include_ocaml_file = {
4747
part_included : string option;
48-
(** [part_included] is the part of the file to synchronize with.
49-
If lines is not specified synchronize the whole file. *)
48+
(** [part_included] is the part of the file to synchronize with. If lines
49+
is not specified synchronize the whole file. *)
5050
}
5151

5252
type include_other_file = { header : Header.t option }
@@ -100,7 +100,8 @@ type t = {
100100
contents : string list;
101101
skip : bool;
102102
version_enabled : bool;
103-
(** Whether the current OCaml version complies with the block's version. *)
103+
(** Whether the current OCaml version complies with the block's version.
104+
*)
104105
os_type_enabled : bool;
105106
(** Whether the current os type complies with the block's version. *)
106107
set_variables : (string * string) list;
@@ -126,8 +127,8 @@ val mk_include :
126127
section:section option ->
127128
labels:Label.t list ->
128129
(t, [ `Msg of string ]) result
129-
(** [mk_include] builds an include block from a comment [<!-- $MDX ... -->]
130-
that is not followed by a code block [``` ... ```]. *)
130+
(** [mk_include] builds an include block from a comment [<!-- $MDX ... -->] that
131+
is not followed by a code block [``` ... ```]. *)
131132

132133
val from_raw : Raw.t -> (t, [ `Msg of string ] list) Result.result
133134

@@ -160,7 +161,8 @@ val file : t -> string option
160161
(** [file t] is the name of the file to synchronize [t] with. *)
161162

162163
val set_variables : t -> (string * string) list
163-
(** [set_variable t] is the list of environment variable to set and their values *)
164+
(** [set_variable t] is the list of environment variable to set and their values
165+
*)
164166

165167
val unset_variables : t -> string list
166168
(** [unset_variable t] is the list of environment variable to unset *)

lib/cram.mli

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ val use_heredoc : t -> bool
3636
(** [use_heredoc t] is true iff [t] uses the heredoc ['<<'] syntax. *)
3737

3838
val command_line : t -> string
39-
(** [command_line t] is [t]'s command line. It either adds ['\'] at
40-
the end of each line of [t]'s command or do nothing is [t] uses the
41-
heredoc syntax. *)
39+
(** [command_line t] is [t]'s command line. It either adds ['\'] at the end of
40+
each line of [t]'s command or do nothing is [t] uses the heredoc syntax. *)
4241

4342
(** {2 Parser} *)
4443

@@ -48,12 +47,12 @@ val of_lines : string list -> cram_tests
4847
(** {2 Pretty-printer} *)
4948

5049
val pp : ?pad:int -> t Fmt.t
51-
(** [pp] is the pretty-printer for cram tests. [pad] is the size of
52-
the optional whitespace left padding (by default it is 0). *)
50+
(** [pp] is the pretty-printer for cram tests. [pad] is the size of the optional
51+
whitespace left padding (by default it is 0). *)
5352

5453
val pp_vertical_pad : int Fmt.t
5554
(** [pp_vertical_pad] is the pretty printer for the initial padding on the top
56-
of Cram tests *)
55+
of Cram tests *)
5756

5857
val dump : t Fmt.t
5958
(** [dump] it the printer for dumping cram tests. Useful for debugging. *)

lib/document.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ type t = line list
2828
(** The type for mdx documents. *)
2929

3030
val pp : ?syntax:Syntax.t -> t Fmt.t
31-
(** [pp] is the pretty printer for mdx documents. Should be idempotent
32-
with {!of_string}. *)
31+
(** [pp] is the pretty printer for mdx documents. Should be idempotent with
32+
{!of_string}. *)
3333

3434
val dump : t Fmt.t
3535
(** [dump] is the printer for dumping mdx documents. Useful for debugging. *)

lib/label.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ module Relation : sig
2121
val compare : t -> int -> int -> bool
2222

2323
val raw_parse : string -> string * (t * string) option
24-
(** [raw_parse s] splits [s] into a label, and optionally the relation and
25-
the associated value. *)
24+
(** [raw_parse s] splits [s] into a label, and optionally the relation and the
25+
associated value. *)
2626
end
2727

2828
type non_det = Nd_output | Nd_command

lib/library.mli

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616

1717
type t = { base_name : string; sub_lib : string option }
1818
(** The type to represent dune libraries as referred to in '#require' statements
19-
or in dune files.
20-
I.e. lib.sub_lib is [{base_name = "lib"; sub_lib = Some "sub_lib"}].
21-
*)
19+
or in dune files. I.e. lib.sub_lib is
20+
[{base_name = "lib"; sub_lib = Some "sub_lib"}]. *)
2221

2322
val equal : t -> t -> bool
2423
val compare : t -> t -> int
@@ -34,6 +33,6 @@ module Set : sig
3433

3534
val to_package_set : t -> Astring.String.Set.t
3635
(** [to_package_set lib_set] returns the set of dune packages needed to get
37-
all the libraries in [lib_set].
38-
I.e. it's the set of basenames for all the libraries in [lib_set]. *)
36+
all the libraries in [lib_set]. I.e. it's the set of basenames for all the
37+
libraries in [lib_set]. *)
3938
end

lib/mdx.mli

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
(** [Mdx] is a library to manipulate markdown code blocks.
1818
19-
[mdx] allows to execute code blocks inside markdown files. The
20-
supported code {{!Block}blocks} are either {{!Cram}cram-like}
21-
tests, raw OCaml fragments or {{!Toplevel}toplevel} phrases.
19+
[mdx] allows to execute code blocks inside markdown files. The supported
20+
code {{!Block}blocks} are either {{!Cram}cram-like} tests, raw OCaml
21+
fragments or {{!Toplevel}toplevel} phrases.
2222
2323
Cram tests and toplevel phrases are sequences of commands and
24-
{{!Output}outputs}. *)
24+
{{!Output}outputs}. *)
2525

2626
module Lexer_mdx = Lexer_mdx
2727
module Output = Output
@@ -61,8 +61,8 @@ val run_to_stdout :
6161
string ->
6262
(unit, [ `Msg of string ] list) result
6363
(** [run_to_stdout ?syntax ~f file] runs the callback [f] on the raw and
64-
structured content of [file], as specified by [syntax] (defaults to [Markdown]).
65-
The returned corrected version is then written to stdout. *)
64+
structured content of [file], as specified by [syntax] (defaults to
65+
[Markdown]). The returned corrected version is then written to stdout. *)
6666

6767
val run_to_file :
6868
?syntax:Syntax.t ->
@@ -90,5 +90,5 @@ val section_of_line : line -> (int * string) option
9090
(** [section_of_line l] is [l]'s section. *)
9191

9292
val filter_section : Re.re -> t -> t option
93-
(** [section re t] is the subset of [t] such that their section
94-
matches with [re]. *)
93+
(** [section re t] is the subset of [t] such that their section matches with
94+
[re]. *)

lib/mli_parser.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ let docstring_code_blocks str =
104104
let loc = Docstrings.docstring_loc docstring in
105105

106106
(* odoc-parser adjusts for the initial [** *)
107-
let adjustment = 3 (* String.length "(**" *) in
107+
let adjustment =
108+
3
109+
(* String.length "(**" *)
110+
in
108111
109112
let location =
110113
{

lib/output.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ let equal a b =
4848
| (`Ellipsis :: a as x), (_ :: b as y)
4949
| (_ :: b as y), (`Ellipsis :: a as x) ->
5050
aux x b
51-
|| (* n+ matches: skip y's head *)
51+
||
52+
(* n+ matches: skip y's head *)
5253
aux a y
5354
(* 0 match : skip x's head *)
5455
| a :: b, h :: t -> (a = h || ellipsis_equal (a, h)) && aux b t

0 commit comments

Comments
 (0)