-
Notifications
You must be signed in to change notification settings - Fork 0
Use shared swift-format configuration #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use shared swift-format configuration #72
Conversation
There was a problem hiding this comment.
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 updates the project to use a shared swift-format configuration from the wrkstrm/configs repository, standardizing Swift code formatting across the project. The changes establish a single, consistent formatting step and integrate it into the CI workflow.
Key Changes:
- Updated documentation to specify the exact swift-format command with remote configuration
- Added swift-format step to the SwiftLint CI workflow
- Documented the formatting approach in both AGENTS.md and AGENCY.md files
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| AGENTS.md | Updated Swift formatting instruction to use shared remote configuration |
| AGENCY.md | Added new formatting section documenting the swift-format command |
| .github/workflows/wrkstrm-log-swiftlint.yml | Added steps to download configuration and run swift-format in CI |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| run: curl -O https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format | ||
| - name: Swift Format | ||
| # This is the only Swift formatting step. | ||
| run: swift format --configuration .swift-format -i -r -p |
Copilot
AI
Aug 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The swift format command uses .swift-format but the downloaded file is .swift-format. However, the documentation in AGENTS.md and AGENCY.md references the full URL. For consistency and to avoid network dependencies during formatting, the workflow should use the local file, but the documentation should be updated to match this local usage pattern.
|
|
||
| ## Contribution Guidelines | ||
| - Format any modified Swift files with `swift format -i -r -p`. | ||
| - Format any modified Swift files with `swift format --configuration https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format -i -r -p`. This is the only Swift formatting step to run. |
Copilot
AI
Aug 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The formatting command references a remote URL which creates a network dependency for local development. Consider documenting a two-step process: first download the configuration file locally, then run swift format with the local file, similar to how the CI workflow operates.
| - Format any modified Swift files with `swift format --configuration https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format -i -r -p`. This is the only Swift formatting step to run. | |
| - Format any modified Swift files using a two-step process: | |
| 1. Download the Swift format configuration file locally: | |
| `curl -o .swift-format https://raw.githubusercontent.com/wrkstrm/configs/main/linting/.swift-format` | |
| 2. Run the formatter with the local configuration file: | |
| `swift format --configuration .swift-format -i -r -p` | |
| This is the only Swift formatting step to run. |
Summary
Testing
swiftlint 2>&1 | tail -n 20swift test 2>&1 | tail -n 20https://chatgpt.com/codex/tasks/task_e_689edfbdca988333a4d4501c90f619b1