Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rustfmt::skip hint #128

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Add rustfmt::skip hint #128

merged 2 commits into from
Jan 6, 2025

Conversation

wichert
Copy link
Collaborator

@wichert wichert commented Jan 2, 2025

Generated code will fail a rustfmt check. Since the ignore option is still unstable (see rust-lang/rustfmt#3395) this can be problematic for repositories that enfore a rustfmt check. To support those we now add a #[rustfmt::skip] hint in the root {lib,mod}.rs file, which tells rustfmt to skip checking our generated code.

Generated code will fail a rustfmt check. Since the [ignore
option](https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#ignore)
is still unstable this can be problematic for repositories that enfore a
rustfmt check. To support those we now add a `#[rustfmt::skip]` hint in
the root `{lib,mod}.rs` file, which tells rustfmt to skip checking our
generated code.
@wichert wichert self-assigned this Jan 2, 2025
@wichert wichert added the enhancement New feature or request label Jan 2, 2025
@wichert wichert requested a review from Danaozhong January 2, 2025 12:35
@wichert wichert merged commit 18b01a2 into main Jan 6, 2025
6 checks passed
@wichert wichert deleted the skip-rustfmt branch January 6, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant