Open Kladki opened 1 month ago
I have the following taplo.toml file:
taplo.toml
include = ["**/*.toml"] [formatting] reorder_arrays = true [[rule]] include = ["bar.toml"] keys = ["baz"] [rule.formatting] reorder_arrays = false
I would assume that the rule listed would prevent the array baz from being re-ordered, but still allow for all other arrays to be sorted.
baz
This is my bar.toml file:
bar.toml
baz = ["foo", "bar", "baz"] sort_me = ["z", "a"]
However, when running taplo fmt, bar.toml ends up like this:
taplo fmt
baz = ["bar", "baz", "foo"] sort_me = ["a", "z"]
As you can see, all arrays were sorted. When omitting keys, nothing gets formatted, which is not what I want.
keys
I have a similar rule-based formatting issue. The rule works until I add the include property and then it stops being applied. It will work as expected if I use the Taplo cli.
include
I have the following
taplo.toml
file:I would assume that the rule listed would prevent the array
baz
from being re-ordered, but still allow for all other arrays to be sorted.This is my
bar.toml
file:However, when running
taplo fmt
,bar.toml
ends up like this:As you can see, all arrays were sorted. When omitting
keys
, nothing gets formatted, which is not what I want.