Fix: Apply rustfmt formatting to resolve CI pipeline failures#11
Merged
Conversation
Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Run cargo fmt --all -- --check (is failing in the github actions pipeline)
Fix: Apply rustfmt formatting to resolve CI pipeline failures
Aug 10, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR applies comprehensive rustfmt formatting to fix CI pipeline failures caused by formatting inconsistencies across the Rust Guardian codebase. The changes are purely cosmetic, ensuring code adheres to Rust formatting standards without altering functionality.
- Reformatted import statements with proper ordering and grouping
- Applied consistent spacing, indentation, and line breaks throughout
- Resolved trailing whitespace and operator spacing issues
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/report/mod.rs | Reformatted method signatures, import ordering, and chain method formatting |
| src/patterns/path_filter.rs | Applied consistent spacing and import reordering |
| src/patterns/mod.rs | Fixed import order and method parameter formatting |
| src/main.rs | Restructured import statements and improved code formatting |
| src/lib.rs | Reordered imports and improved method call formatting |
| src/domain/violations.rs | Applied consistent spacing and import formatting |
| src/config/mod.rs | Fixed import order and method formatting |
| src/cache/mod.rs | Reordered imports and improved error handling formatting |
| src/analyzer/rust.rs | Applied consistent import ordering and method formatting |
| src/analyzer/mod.rs | Fixed import order and improved parallel processing formatting |
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.
The GitHub Actions CI pipeline was failing on the formatting check step with
cargo fmt --all -- --check. This PR resolves the issue by applying proper Rust formatting to all source files.Problem
The CI workflow includes a formatting verification step that runs:
This command was failing because multiple source files had formatting inconsistencies including:
Solution
Applied
cargo fmt --allto automatically format all Rust source files according to rustfmt standards. The changes are purely cosmetic and include:Files Modified
src/analyzer/mod.rs,src/analyzer/rust.rssrc/cache/mod.rs,src/config/mod.rssrc/domain/mod.rs,src/domain/violations.rssrc/lib.rs,src/main.rssrc/patterns/mod.rs,src/patterns/path_filter.rssrc/report/mod.rsVerification
cargo fmt --all -- --checknow passesFixes #10.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.