Skip to content

Add SwiftFormat configuration and apply formatting - #210

Merged
Kyle-Ye merged 3 commits into
mainfrom
worktree-prancy-waddling-grove
Feb 25, 2026
Merged

Add SwiftFormat configuration and apply formatting#210
Kyle-Ye merged 3 commits into
mainfrom
worktree-prancy-waddling-grove

Conversation

@Kyle-Ye

@Kyle-YeKyle-Ye commented Feb 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Add .swiftformat configuration file tailored to the project's existing code style
  • Apply automated formatting to all Swift source files (46 files)
  • Add Scripts/format-swift.sh convenience script for formatting changed files
  • Update CLAUDE.md with formatting step in development workflow

Key formatting fixes include:

  • Trailing whitespace removal
  • Import sorting (alphabetical)
  • Consistent indentation
  • Operator spacing normalization
  • Blank line consistency between scopes

The .swiftformat config preserves project conventions by disabling opinionated rules (extensionAccessControl, docComments, opaqueGenericParameters, redundantReturn, etc.) and excludes vendored directories and Package.swift.

Test plan

  • Verify swift test passes locally
  • Verify CI passes with no build errors
  • Spot-check formatted files for correctness

@github-actionsgithub-actionsBot added the enhancement New feature or request label Feb 25, 2026
@codecov

codecovBot commented Feb 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.84%. Comparing base (0fabe5c) to head (78ef294).

Files with missing linesPatch %Lines
...urces/OpenAttributeGraph/Attribute/Rule/Rule.swift0.00%19 Missing ⚠️
...urces/OpenAttributeGraphShims/Metadata+Debug.swift0.00%9 Missing ⚠️
Sources/OpenAttributeGraph/Runtime/TupleType.swift0.00%2 Missing ⚠️
...teGraph/Attribute/RuleContext/AnyRuleContext.swift0.00%1 Missing ⚠️
...ibuteGraph/Attribute/RuleContext/RuleContext.swift0.00%1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@ Coverage Diff @@## main #210 +/- ##
==========================================
- Coverage 29.05% 28.84% -0.22% 
==========================================
Files 70 70 Lines 2550 2562 +12 ==========================================
- Hits 741 739 -2 - Misses 1809 1823 +14 
FlagCoverage Δ
ubuntu0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing linesCoverage Δ
...ributeGraph/Attribute/Attribute/AnyAttribute.swift0.00% <ø> (ø)
...AttributeGraph/Attribute/Attribute/Attribute.swift0.00% <ø> (ø)
...ibuteGraph/Attribute/Attribute/PointerOffset.swift100.00% <ø> (ø)
...ributeGraph/Attribute/Body/ObservedAttribute.swift0.00% <ø> (ø)
...teGraph/Attribute/Indirect/IndirectAttribute.swift0.00% <ø> (ø)
...raph/Attribute/Optional/AnyOptionalAttribute.swift0.00% <ø> (ø)
...teGraph/Attribute/Optional/OptionalAttribute.swift0.00% <ø> (ø)
...rces/OpenAttributeGraph/Attribute/Rule/Focus.swift0.00% <ø> (ø)
...enAttributeGraph/Attribute/Rule/StatefulRule.swift0.00% <ø> (ø)
...nAttributeGraph/Attribute/Weak/WeakAttribute.swift0.00% <ø> (ø)
... and 10 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@augmentcode

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR introduces a project-wide SwiftFormat setup and reapplies formatting across the Swift codebase.

Changes:

  • Adds a new .swiftformat configuration aligned with the repo’s existing conventions (and disables more opinionated rules).
  • Runs SwiftFormat across ~47 Swift source/test files to normalize whitespace, indentation, and line wrapping.
  • Standardizes import ordering and operator/range spacing.
  • Applies small mechanical modernizations produced by the formatter (e.g., shorthand optional binding, consistent function signature wrapping).
  • Excludes vendored/generated paths and Package.swift from formatting.

Technical Notes: No behavioral changes appear intended; the diff is predominantly formatting and syntactic normalization to reduce future churn.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcodeaugmentcodeBot 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.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@Kyle-Ye
Kyle-Yeforce-pushed the worktree-prancy-waddling-grove branch from c6b011a to 78ef294CompareFebruary 25, 2026 08:52
Codify the project's existing formatting conventions for Swift sources to enable consistent automated formatting.
Add a convenience script to format changed Swift files before
committing. Document it in CLAUDE.md development workflow.
@Kyle-Ye
Kyle-Yeforce-pushed the worktree-prancy-waddling-grove branch from 78ef294 to db4370cCompareFebruary 25, 2026 09:07
@Kyle-Ye
Kyle-Ye merged commit 379451e into mainFeb 25, 2026
4 checks passed
@Kyle-Ye
Kyle-Ye deleted the worktree-prancy-waddling-grove branch February 25, 2026 09:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Kyle-Ye