Skip to content

Fix: Apply rustfmt formatting to resolve CI pipeline failures#11

Merged
Jeshua Ben Joseph (Theaxiom) merged 2 commits into
mainfrom
copilot/fix-10
Aug 10, 2025
Merged

Fix: Apply rustfmt formatting to resolve CI pipeline failures#11
Jeshua Ben Joseph (Theaxiom) merged 2 commits into
mainfrom
copilot/fix-10

Conversation

Copilot AI commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

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:

cargo fmt --all -- --check

This command was failing because multiple source files had formatting inconsistencies including:

  • Trailing whitespace in comments
  • Incorrect import ordering and grouping
  • Inconsistent spacing around operators and method calls
  • Missing line breaks and improper indentation

Solution

Applied cargo fmt --all to automatically format all Rust source files according to rustfmt standards. The changes are purely cosmetic and include:

  • Import statement reordering and proper grouping
  • Consistent spacing and indentation
  • Removal of trailing whitespace
  • Proper line breaks for readability

Files Modified

  • src/analyzer/mod.rs, src/analyzer/rust.rs
  • src/cache/mod.rs, src/config/mod.rs
  • src/domain/mod.rs, src/domain/violations.rs
  • src/lib.rs, src/main.rs
  • src/patterns/mod.rs, src/patterns/path_filter.rs
  • src/report/mod.rs

Verification

  • cargo fmt --all -- --check now passes
  • ✅ All 51 tests continue to pass
  • ✅ Code builds successfully with no functional changes

Fixes #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.

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
@Theaxiom Jeshua Ben Joseph (Theaxiom) marked this pull request as ready for review August 10, 2025 04:19
Copilot AI review requested due to automatic review settings August 10, 2025 04:19
@Theaxiom Jeshua Ben Joseph (Theaxiom) deleted the copilot/fix-10 branch August 10, 2025 04:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

Run cargo fmt --all -- --check (is failing in the github actions pipeline)

3 participants