Skip to content

Prettier pretty#3

Open
raphael-proust wants to merge 3 commits into
chshersh:mainfrom
raphael-proust:prettier-pretty
Open

Prettier pretty#3
raphael-proust wants to merge 3 commits into
chshersh:mainfrom
raphael-proust:prettier-pretty

Conversation

@raphael-proust

Copy link
Copy Markdown
Collaborator

This PR is

a. on top of #2
b. possibly controversial (see comments)

instead of
`foo = bar` |> parse |> pretty |> `foo =\n  bar =`
we have
`foo = bar` |> parse |> pretty |> `foo = bar`

but also
instead of
`foo =\n  bar =` |> parse |> pretty |> `foo =\n  bar =`
we have
`foo =\n  bar =` |> parse |> pretty |> `foo = bar`
Comment thread lib/model.ml
Comment on lines +11 to +13
let rec is_empty (Fix t) =
KeyMap.is_empty t
|| KeyMap.for_all (fun k v -> k = "" && is_empty v) t

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty maps or maps with ""→empty are all considered empty

it means that the following ccl document (e.g.,) is empty

=
  =
  =
=
=

Comment on lines -58 to +66
baz =
baz

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes the queries a bit better because you get the actual value of the config, not a ccl document that encodes the actual value via a singleton key-nullvalue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant