Implement canonical formatter (#1107)

CLI commands also added: `pkl format check` and `pkl format apply`.
This commit is contained in:
Islon Scherer
2025-09-17 11:12:04 +02:00
committed by GitHub
parent 6a06ab7caa
commit fdc501a35c
78 changed files with 5491 additions and 26 deletions
@@ -0,0 +1,34 @@
module comment.interleaved
local test: Int | String =
if (true)
1 // It's the same as "100%"
else
"8%"
foo: ( // some comment
*String(
// if dtstart is defined and a datetime, until must also be a datetime if defined
true,
)
| Int
// trailing comment
)?
foo2: ( // some comment
Int, // other comment
String,
) ->
Int
bar =
( // some comment
10 + 10
// another comment
)
bar2 = ( // some comment
foo,
bar
// another comment
) -> foo + bar