File tree Expand file tree Collapse file tree 6 files changed +34
-1
lines changed Expand file tree Collapse file tree 6 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ Items marked with an asterisk (\*) are changes that are likely to format
44existing code differently from the previous release when using the default
55profile. This started with version 0.26.0.
66
7+ ## unreleased
8+
9+ ### Fixed
10+
11+ - Remove trailing space inside a wrapping empty signature (#2443 , @Julow )
12+
713## 0.26.1 (2023-09-15)
814
915### Changed
Original file line number Diff line number Diff line change @@ -3463,7 +3463,7 @@ and fmt_module_type c ?(rec_ = false) ({ast= mty; _} as xmty) =
34633463 { opn= None
34643464 ; pro= Some (before $ str " sig" $ fmt_if empty " " )
34653465 ; psp= fmt_if (not empty) " @;<1000 2>"
3466- ; bdy= within $ fmt_signature c ctx s
3466+ ; bdy= ( within $ if empty then noop else fmt_signature c ctx s)
34673467 ; cls= noop
34683468 ; esp= fmt_if (not empty) " @;<1000 0>"
34693469 ; epi=
Original file line number Diff line number Diff line change 38973897 (package ocamlformat)
38983898 (action (diff tests/ module_type.ml.err module_type.ml.stderr)))
38993899
3900+ (rule
3901+ (deps tests/ .ocamlformat )
3902+ (package ocamlformat)
3903+ (action
3904+ (with- stdout- to module_type.mli.stdout
3905+ (with- stderr- to module_type.mli.stderr
3906+ (run % {bin: ocamlformat} -- margin- check % {dep: tests/ module_type.mli})))))
3907+
3908+ (rule
3909+ (alias runtest)
3910+ (package ocamlformat)
3911+ (action (diff tests/ module_type.mli.ref module_type.mli.stdout)))
3912+
3913+ (rule
3914+ (alias runtest)
3915+ (package ocamlformat)
3916+ (action (diff tests/ module_type.mli.err module_type.mli.stderr)))
3917+
39003918(rule
39013919 (deps tests/ .ocamlformat )
39023920 (package ocamlformat)
Original file line number Diff line number Diff line change 1+ (* Wrapping an empty sig *)
2+ module Foo
3+ (A : FOO )
4+ (B : FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ) : sig end
Original file line number Diff line number Diff line change 1+ Warning: tests/module_type.mli:3 exceeds the margin
Original file line number Diff line number Diff line change 1+ (* Wrapping an empty sig *)
2+ module Foo
3+ (A : FOO)
4+ (B : FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO) : sig end
You can’t perform that action at this time.
0 commit comments