Skip to content

TOML files are inconsistently formatted #1016

Closed
DanGould/rust-payjoin
#12

Description

@nothingmuch

There's inconsistencies, in particular whitespace and ordering, in our Cargo.toml files

We should look into TOML formatting solutions and enforce in CI, to reduce unnecessary merge conflicts

Activity

  1. Cyber-Lord commented on Aug 29, 2025

    @Cyber-Lord
    Contributor

    Yes I observe they need formatting accordingly one after the order and documenting how this can be treated in the future. I will love to work on this to get our TOML files clean and sorted.

  2. nothingmuch commented on Aug 29, 2025

    @nothingmuch
    ContributorAuthor

    Thanks @Cyber-Lord! I assigned you.

    I did zero research on viable solutions, so it would be great if you could summarize and we could discuss the available options here before opening a PR

  3. Cyber-Lord commented on Aug 29, 2025

    @Cyber-Lord
    Contributor

    Hi @nothingmuch,

    I did a research on available formatting tools for TOML files, especially Cargo.toml. And I found this tools worth reviewing:

    1. Taplo: A versatile, feature-rich TOML toolkit. It is actively maintained, supports formatting and linting, and integrates well with CI.
    2. cargo-sort: Cargo-sort crate can help us sort dependencies alphabetically in Cargo.toml.

    This 2 tools when combined will achieve the desired result since it formats TOML files automatically and can be run from command line, we will end up with clean TOML files.

    We can also update the CI file and add taplo format --check to enforce formatting. Let me know what you think about this approach.

    Thank you

  4. added a commit that references this issue on Aug 30, 2025
    765cff7
  5. benalleng commented on Jun 8, 2026

    @benalleng
    Collaborator

    Closed by #1221

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions