Skip to content

Conversation

@sbernauer
Copy link
Member

@sbernauer sbernauer commented Dec 19, 2025

Enable format_code_in_doc_comments and let cargo +nightly-2025-10-23 fmt --all format the code.

The unstable feature isn't perfect, but in my opinion this is a significant improvement.

@sbernauer sbernauer self-assigned this Dec 19, 2025
@sbernauer sbernauer moved this to Development: Waiting for Review in Stackable Engineering Dec 19, 2025
@sbernauer sbernauer force-pushed the chore/format-rustdoc branch from e4340c1 to 282a975 Compare December 19, 2025 12:19
@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Dec 19, 2025
rustfmt added trailing whitespaces, which collided with the
trailing-whitespace check
@sbernauer
Copy link
Member Author

sbernauer commented Dec 22, 2025

Well we have a problem... rustfmt adds trailing whitespaces (which arguably isn't great).
As we have a trailing-whitespace pre-commit hook, there is no way to pass CI, as either trailing-whitespace or rustfmt will complain :D
I removed the problematic lines in 7cf2855, so the CI should hopefully turn green

@Techassi
Copy link
Member

I removed the problematic lines in 7cf2855, so the CI should hopefully turn green

They were there on purpose. Too bad we have to remove them to avoid these weird spaces being inserted...

@sbernauer
Copy link
Member Author

I looked through the diff again. Yes, the removed empty lines aren't great, but in my opinion the benefits of the formatted code snippets by far outweigh that.

@sbernauer sbernauer requested a review from Techassi December 22, 2025 13:04
@Techassi
Copy link
Member

Yes, I agree. I just hope this feature improves in the future or there will be more granular control over this.

Techassi
Techassi previously approved these changes Dec 22, 2025
@sbernauer sbernauer added this pull request to the merge queue Dec 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 22, 2025
@sbernauer
Copy link
Member Author

Merging to get this in (and potentially cut a release). #1130 will fix the pre-commit

@sbernauer sbernauer enabled auto-merge December 23, 2025 07:24
@sbernauer sbernauer added this pull request to the merge queue Dec 23, 2025
Merged via the queue into main with commit 5653428 Dec 23, 2025
5 checks passed
@sbernauer sbernauer deleted the chore/format-rustdoc branch December 23, 2025 08:37
@sbernauer sbernauer moved this from Development: In Review to Development: Done in Stackable Engineering Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

4 participants