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

chore: run ide fmt on local/database.rs #1824

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

LucioFranco
Copy link
Contributor

There seems to be a bug with cargo fmt and functions that have a #[cfg(feature = "..")], what happens is cargo fmt does not pick this up as a formatting change and thus in our CI cargo fmt --check isn't picking up that these fn's need to be formatted. On the other hand when these files are passed through rust-analyzer with rustfmt on save, it ends up formatting the files. To solve this in a temporary sense right now I am just running files manually through my ide format to get them to format correctly. This does not cause cargo fmt --check to fail but allows anyone using rust-analyzer + rustfmt to not introduce extra changes.

There seems to be a bug with `cargo fmt` and functions that have a `#[cfg(feature = "..")]`, what happens is `cargo fmt` does not pick this up as a formatting change and thus in our CI `cargo fmt --check` isn't picking up that these fn's need to be formatted. On the other hand when these files are passed through rust-analyzer with rustfmt on save, it ends up formatting the files. To solve this in a temporary sense right now I am just running files manually through my ide format to get them to format correctly. This does not cause `cargo fmt --check` to fail but allows anyone using rust-analyzer + rustfmt to not introduce extra changes.
@LucioFranco LucioFranco added this pull request to the merge queue Nov 18, 2024
Merged via the queue into main with commit 909b8af Nov 18, 2024
18 checks passed
@LucioFranco LucioFranco deleted the lucio/run-ide-fmt branch November 18, 2024 17:38
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