Skip to content

Add capability to format packages #3

@AnthonyGrondin

Description

@AnthonyGrondin

Description

Right now there's no easy, trivial way in embassy-rs/embassy to run rustfmt on all packages before submitting a PR. This means a lot of contributions end up failing CI due to formatting issues that are hard to catch locally. On top of that, the CI uses its own rustfmt logic, which isn’t straightforward to replicate by hand. There’s just no simple, consistent way to run formatting across all packages or only the affected ones.

One big complication is that the CI script swaps toolchain files before running its formatting steps, which makes mirroring the behavior locally even harder.

Solution

Extend this tool with an easy fmt / lint command that formats all packages (or only the affected packages) using the same logic CI relies on.

This would allow contributors to format their code before pushing to a PR, and could also be used as a pre-commit hook to ensure format requirements are always met.

Metadata

Metadata

Assignees

No one assigned

    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