Add grammar compatibility option to the formatter (#1249)

This commit is contained in:
Islon Scherer authored and GitHub committed 2025-10-28 13:29:08 +01:00
1 parent ef4989aa35
commit be0142d46b
9 files changed
+108 -16

No files matched your search

+18
View File
@@ -743,6 +743,16 @@ It returns a non-zero status code in case violations are found.
If the path is a directory, recursively looks for files with a `.pkl` extension, or files named `PklProject`.
==== Options
.--grammar-version
[%collapsible]
====
Default: `2` (latest version) +
Select the grammar compatibility version for the formatter.
New versions are created for each backward incompatible grammar change.
====
[[command-format-apply]]
=== `pkl format apply`
@@ -760,6 +770,14 @@ If the path is a directory, recursively looks for files with a `.pkl` extension,
Do not write the name of wrongly formatted files to stdout.
====
.--grammar-version
[%collapsible]
====
Default: `2` (latest version) +
Select the grammar compatibility version for the formatter.
New versions are created for each backward incompatible grammar change.
====
[[common-options]]
=== Common options