Skip to content
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

Adopt swift-format #12

Merged
merged 9 commits into from
Sep 29, 2024
Merged

Adopt swift-format #12

merged 9 commits into from
Sep 29, 2024

Conversation

fpseverino
Copy link
Member

@fpseverino fpseverino commented Sep 25, 2024

  • Update to swift-tools-version:6.0
  • Adopt swift-format
    • To make the linter happy I had to change the ISOCountryCode field of the UserPersonalization table to isoCountryCode, resulting in a breaking change.
  • Switch from custom .unixPath() to Foundation's .path
  • Add more tests

For a new release I would wait until Vapor 5

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 92.35294% with 26 lines in your changes missing coverage. Please review.

Project coverage is 96.35%. Comparing base (af8b8d0) to head (983f687).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...urces/Passes/Models/UserPersonalizationModel.swift 70.37% 8 Missing ⚠️
Sources/Passes/Models/PassModel.swift 66.66% 5 Missing ⚠️
Sources/Orders/Models/OrderModel.swift 66.66% 4 Missing ⚠️
...ources/Orders/Models/OrdersRegistrationModel.swift 71.42% 2 Missing ⚠️
Sources/PassKit/Models/DeviceModel.swift 75.00% 2 Missing ⚠️
...ources/Passes/Models/PassesRegistrationModel.swift 71.42% 2 Missing ⚠️
Sources/Orders/Models/OrderDataModel.swift 66.66% 1 Missing ⚠️
Sources/PassKit/Models/ErrorLogModel.swift 75.00% 1 Missing ⚠️
Sources/Passes/Models/PassDataModel.swift 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   94.36%   96.35%   +1.98%     
==========================================
  Files          33       32       -1     
  Lines        1012     1153     +141     
==========================================
+ Hits          955     1111     +156     
+ Misses         57       42      -15     
Files with missing lines Coverage Δ
...urces/Orders/Middleware/AppleOrderMiddleware.swift 100.00% <100.00%> (ø)
Sources/Orders/Models/Concrete Models/Order.swift 100.00% <100.00%> (ø)
...s/Orders/Models/Concrete Models/OrdersDevice.swift 100.00% <100.00%> (ø)
...Orders/Models/Concrete Models/OrdersErrorLog.swift 100.00% <ø> (ø)
...rs/Models/Concrete Models/OrdersRegistration.swift 100.00% <100.00%> (ø)
Sources/Orders/OrdersDelegate.swift 100.00% <100.00%> (ø)
Sources/Orders/OrdersError.swift 100.00% <ø> (ø)
Sources/Orders/OrdersService.swift 100.00% <100.00%> (ø)
Sources/Orders/OrdersServiceCustom.swift 97.77% <100.00%> (+2.77%) ⬆️
Sources/Passes/DTOs/PassesForDeviceDTO.swift 100.00% <ø> (ø)
... and 19 more

Copy link
Contributor

@MahdiBM MahdiBM left a comment

Choose a reason for hiding this comment

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

To make the linter happy ...

You can disable swift-format rules line-by-line. See this.

Package.swift Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
@fpseverino
Copy link
Member Author

You can disable swift-format rules line-by-line.

I know, but technically I agree with this rule. I originally kept it upper case because the JSON expected from the API is like that, and I was too lazy to set up CodingKeys 😅

@fpseverino fpseverino merged commit 939492b into vapor-community:main Sep 29, 2024
10 of 11 checks passed
@fpseverino fpseverino deleted the swift-6 branch September 29, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants