Skip to content

Commit

Permalink
Merge branch 'main' into 3.7.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
emillon committed Feb 9, 2023
2 parents c0c31ce + 50eda63 commit d4b76f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dune_engine/format_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ let dune2_record_syntax =
let dune2_dec =
let+ loc = loc
and+ enabled_for =
peek_exn >>= function
| List _ -> fields dune2_record_syntax
| _ -> keyword "disabled" >>> return (Enabled_for.Only Language.Set.empty)
peek >>= function
| None | Some (List _) -> fields dune2_record_syntax
| Some _ ->
keyword "disabled" >>> return (Enabled_for.Only Language.Set.empty)
in
{ loc; enabled_for }

Expand Down
6 changes: 6 additions & 0 deletions test/blackbox-tests/test-cases/formatting/empty-field.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ cat > dune-project << EOF
> (lang dune 3.5)
> (formatting)
> EOF

$ dune build @fmt

0 comments on commit d4b76f8

Please sign in to comment.