-
Notifications
You must be signed in to change notification settings - Fork 29
fix: Run swift-format [1/4] #328
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
Conversation
|
Need to check that this is workable with Xcode's formatting too - otherwise the reverse problem will exist... |
|
@hassila Xcode doesn't have any particular problem with this I think. The Apple repositories have all moved to enforcing swift-format and I know not all of them use non-Xcode IDEs. I'll check to make sure soon, but I'm fairly certain we should be fine. |
…ift-format -i --recursive . followed by swiftlint successfully
…ift-format -i --recursive . followed by swiftlint successfully
…ark into mmbm-swift-format
…ark into mmbm-swift-format
…ark into mmbm-swift-format
…ark into mmbm-swift-format
…ark into mmbm-swift-format
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 applies automated swift-format formatting to fix code style inconsistencies across the codebase. The formatting includes proper line breaks, trailing commas, import organization, and consistent indentation/spacing throughout test files and source code.
- Reorganizes import statements to follow standard ordering
- Adds trailing commas in multi-line collections and function parameters
- Fixes line breaks and indentation for better readability
Reviewed Changes
Copilot reviewed 56 out of 60 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/BenchmarkTests/*.swift | Applies formatting fixes to test files including import reordering and trailing commas |
| Sources/Benchmark/*.swift | Formats source files with proper line breaks, trailing commas, and function parameter alignment |
| Plugins/BenchmarkTool/*.swift | Standardizes formatting in plugin tool files |
| Plugins/BenchmarkCommandPlugin/*.swift | Applies consistent formatting to command plugin files |
| Package.swift and Benchmarks/Package.swift | Formats package manifest files with proper trailing commas |
| .swift-format and .swiftlint_refinement.yml | Adds swift-format configuration and updates SwiftLint rules |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Thanks! |
|
Probably should add some docs if you are up for it for contributions or run CI job with |
Description
I'm using VSCode/Cursor and everytime a format-on-save is triggered, the whole file gets formatted.
This is not good because I have some incoming PRs that make logic changes, and I don't want to make them harder to review that they already are.
If needed i can set up swift-format CI in a separate CI to make sure the project remains swift-formatted.
Feel free to review on your own schedule.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Minimal checklist:
DocCcode-level documentation for any public interfaces exported by the package