ci: Enable cargo fmt check in GitHub Actions#89
Merged
Conversation
Owner
|
I like this idea, though I may adjust how it is included in the CI pipeline. |
Mechanical reformatting only — no functional changes. This commit is listed in .git-blame-ignore-revs so git blame skips it. Originally proposed in ssmichael1#89 by @parker-research. Co-Authored-By: Parker L <parker-research@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a dedicated `lint` job that runs `cargo fmt --all -- --check` on ubuntu, so a formatting failure surfaces before the multi-OS build matrix kicks off. Also adds .git-blame-ignore-revs listing the workspace-wide fmt commit, so `git blame` (and GitHub's web blame) skip past mechanical reformatting and point at the substantive prior author. Closes ssmichael1#87 follow-up. Builds on ssmichael1#89 by @parker-research. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
Modified. rust-fmt runs in ubuntu prior to builds across OSs. Bombs out if formatting is not correct prior to change. Thanks to @parker-research for recommending this change and doing the initial work. Good suggestions. |
Contributor
Author
|
Thanks a lot, happy to see it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This project would be a bit nicer to maintain if all the files were properly autoformatted with cargo.
This PR adds a
cargo fmtcheck to the CI pipeline. It also runs the autoformatter to ensure this check passes.Feel free to pick off the autoformat commit and re-run it yourself, if auditing the chance is challenging/too much.