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
4
4
existing code differently from the previous release when using the default
5
5
profile. This started with version 0.26.0.
6
6
7
+ ## unreleased
8
+
9
+ ### Fixed
10
+
11
+ - Remove trailing space inside a wrapping empty signature (#2443 , @Julow )
12
+
7
13
## 0.26.1 (2023-09-15)
8
14
9
15
### 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) =
3463
3463
{ opn= None
3464
3464
; pro= Some (before $ str " sig" $ fmt_if empty " " )
3465
3465
; 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)
3467
3467
; cls= noop
3468
3468
; esp= fmt_if (not empty) " @;<1000 0>"
3469
3469
; epi=
Original file line number Diff line number Diff line change 3897
3897
(package ocamlformat)
3898
3898
(action (diff tests/ module_type.ml.err module_type.ml.stderr)))
3899
3899
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
+
3900
3918
(rule
3901
3919
(deps tests/ .ocamlformat )
3902
3920
(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