Skip to content

Experiment/cargo.toml formatting - #1682

Open
s373r wants to merge 22 commits into
masterfrom
experiment/Cargo.toml-formatting
Open

Experiment/cargo.toml formatting#1682
s373r wants to merge 22 commits into
masterfrom
experiment/Cargo.toml-formatting

Conversation

@s373r

@s373r s373r commented Aug 13, 2026

Copy link
Copy Markdown
Member

Checklist

@s373r s373r self-assigned this Aug 13, 2026

@sergiimk sergiimk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Makefile Outdated
cargo clippy --workspace --all-targets --fix --allow-dirty --allow-staged --broken-code
cargo fmt --all
cargo sort -g -w
taplo fmt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread Cargo.toml
@@ -1,5 +1,112 @@
[workspace]
members = [
# Adapters

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does cargo-sort respect these comments as group separators or you sorted these manually?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants