Skip to content

fix(proto/build): ignore rustfmt errors when formatting generated code#2018

Merged
Mirko-von-Leipzig merged 2 commits intonextfrom
krisztian/fix-docker-build-requiring-rustfmt
Apr 30, 2026
Merged

fix(proto/build): ignore rustfmt errors when formatting generated code#2018
Mirko-von-Leipzig merged 2 commits intonextfrom
krisztian/fix-docker-build-requiring-rustfmt

Conversation

@kkovaacs
Copy link
Copy Markdown
Contributor

The rustfmt binary is part of the Rust toolchain even if the rustfmt component is not installed, and it will print a warning and exit with status code 1.

We can safely ignore rustfmt errors when formatting generated code, as the formatting there only for better readability.

The `rustfmt` binary is part of the Rust toolchain even if the `rustfmt`
component is not installed, and it will print a warning and exit with
status code 1.

We can safely ignore rustfmt errors when formatting generated code, as
the formatting there only for better readability.
@kkovaacs kkovaacs added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Apr 29, 2026
Copy link
Copy Markdown
Collaborator

@sergerad sergerad left a comment

Choose a reason for hiding this comment

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

Part of me would rather keep the requirement of rustfmt'ing generated code

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

Part of me would rather keep the requirement of rustfmt'ing generated code

Sure but its only for when one would read it -- so if you're developing you already have it. Its only a skip for things like binary builds on machines or docker environments, in case they don't have it installed (which apparently does happen with our toolchain settings?).

@Mirko-von-Leipzig Mirko-von-Leipzig merged commit cfd9b31 into next Apr 30, 2026
2 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the krisztian/fix-docker-build-requiring-rustfmt branch April 30, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants