-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reorder_arrays = false is ignored if the key is set to the array. #608
Comments
I have a similar rule-based formatting issue. The rule works until I add the |
It looks like [toolchain]
targets = ["zz", "x86_64-unknown-linux-gnu"] gets targets sorted with [[rule]]
include = ["rust-toolchain.toml"]
keys = ["toolchain"]
[rule.formatting]
reorder_arrays = true but not with keys = ["components", "targets"] or keys = ["toolchain.components", "toolchain.targets"] |
Of course, one table might have both a key I want array sorted and a key I don't, so I feel like Taplo must support |
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.The text was updated successfully, but these errors were encountered: