Skip to content

Bug ? In 0.28.1, nested matchings with begin end have one less indentation level #2741

@voodoos

Description

@voodoos

In 0.28.1, nested matching with begin end have one less indentation level, even if the begin and match keywords are not on the same line. This means the end keyword is not indented as it should be as a part of the right hand-side of a match branch:

Image

Is that the intended behavior ? It look wrong to me.

`--print-config`
❯ ocamlformat --print-config
comment-check=true
debug=false
disable=false (file .ocamlformat:2)
margin-check=false
max-iters=10
ocaml-version=4.04.0
quiet=false
disable-conf-attrs=false
version-check=true
assignment-operator=end-line
break-before-in=fit-or-vertical
break-cases=fit-or-vertical (file .ocamlformat:4)
break-collection-expressions=fit-or-vertical
break-colon=after
break-fun-decl=wrap
break-fun-sig=wrap
break-infix=wrap
break-infix-before-func=false
break-separators=after
break-sequences=true
break-string-literals=auto
break-struct=force
cases-exp-indent=2 (file .ocamlformat:6)
cases-matching-exp-indent=normal
disambiguate-non-breaking-match=false
doc-comments=before (file .ocamlformat:5)
doc-comments-padding=2
doc-comments-tag-only=default
dock-collection-brackets=false (file .ocamlformat:7)
exp-grouping=preserve (file .ocamlformat:9)
extension-indent=2
field-space=loose
function-indent=2
function-indent-nested=never
if-then-else=compact
indent-after-in=0
indicate-multiline-delimiters=no
indicate-nested-or-patterns=unsafe-no
infix-precedence=indent
leading-nested-match-parens=false
let-and=compact
let-binding-indent=2
let-binding-deindent-fun=true
let-binding-spacing=compact
let-module=compact
line-endings=lf
margin=80
match-indent=0
match-indent-nested=never
max-indent=68
module-indent=2
module-item-spacing=preserve (file .ocamlformat:10)
nested-match=wrap
ocp-indent-compat=false
parens-ite=false
parens-tuple=always
parens-tuple-patterns=multi-line-only
parse-docstrings=false (file .ocamlformat:11)
parse-toplevel-phrases=false
sequence-blank-line=preserve-one
sequence-style=terminator
single-case=compact
space-around-arrays=true
space-around-lists=true
space-around-records=true
space-around-variants=true
stritem-extension-indent=0
type-decl=compact
type-decl-indent=2
wrap-comments=false
wrap-fun-args=true
profile=default

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions