package.metadata sorting
Greetings,
I don't know if this is a support ticket or a feature request...
I'd like to have package metadata at the end of the file (for instance, [package.metadata.docs.rs]). I'm trying with something like this in tomlfmt.toml:
table_order = [
"workspace",
"workspace.members",
"workspace.exclude",
"package",
"features",
"dependencies",
"lints.clippy",
"package.metadata.docs.rs",
]
But whatever I do, cargo-sort doesn't seem to match the package.metadata section. In this setup, the metadata always goes just after the package section. If I don't specify package, then it goes at the very end.
Surprisingly, something like this makes both the package header (expected) and the metadata (unexpected, to me) go to the very end.
table_order = [
"package.metadata.docs.rs",
"workspace",
"workspace.members",
"workspace.exclude",
"package",
"features",
"dependencies",
"lints.clippy",
]
I don't know if I'm doing something wrong, or maybe this is by design.
If this is something not taken into account, then please consider this as a feature request. In that case, with some guidance, specially on the feature design, and if my skill levels allow me, I might try to contribute a PR (don't know in which timeframe, maybe during summer).
I don't think dotted keys do what you think they do within table_order. I would consider this a feature request ^^
Thanks!
So, would you guys be open to a contribution of something like this? If so, I'd be happy to give it a try when time permits (don't know when). Maybe toml_edit (and the toml spec itself) don't make it very easy, but there might be a way that doesn't feel too hacky.
I think it might not actually be that hard and yes, a PR would be welcome :)