Experiment/cargo.toml formatting - #1682
Conversation
sergiimk
left a comment
There was a problem hiding this comment.
I like it! 👍
The line break in empty arrays was the only thing that jumped at me:
default = [
]
but I'm ready to live with it.
| cargo clippy --workspace --all-targets --fix --allow-dirty --allow-staged --broken-code | ||
| cargo fmt --all | ||
| cargo sort -g -w | ||
| taplo fmt |
There was a problem hiding this comment.
Can we introduce a new make fmt target? It's a bit strange to mix clippy and code formatting together.
And if we keep this target - we probably should format code before running clippy not to rebuild twice in case of formatting changes.
There was a problem hiding this comment.
It's a bit strange to mix clippy and code formatting together
IMHO, Clippy's rules, which specifically automaticly change the code, are perfectly suited for lint-fix
Can we introduce a new make fmt target?
But you're right -- it's better to have a make target for that
--
Will do
| @@ -1,5 +1,112 @@ | |||
| [workspace] | |||
| members = [ | |||
| # Adapters | |||
There was a problem hiding this comment.
Does cargo-sort respect these comments as group separators or you sorted these manually?
There was a problem hiding this comment.
Does cargo-sort respect these comments as group separators or you sorted these manually?
That is cargo-sort.
The only thing I did manually was to add the groups in the comments so that sorting wouldn't break up the grouping within Infra, e.g.:
- # Infra
- ## Outbox
+ # Infra (core)
+ # Infra - Outbox# Conflicts: # Cargo.toml
Checklist