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

chore: resolve SwiftFormat errors and warnings at the categories module #3843

Merged

Conversation

phantumcode
Copy link
Contributor

Issue #

Description

Resolving SwiftFormat errors and warnings for the Amplify categories module.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@phantumcode phantumcode requested a review from a team as a code owner September 3, 2024 17:58
Amplify/Amplify.swift Outdated Show resolved Hide resolved
Amplify/Amplify.swift Show resolved Hide resolved
Amplify/Core/Model/BasicUserProfile.swift Outdated Show resolved Hide resolved
Amplify/Core/Configuration/AmplifyConfiguration.swift Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 48.88268% with 366 lines in your changes missing coverage. Please review.

Project coverage is 68.40%. Comparing base (ca6c65a) to head (af8a988).
Report is 2 commits behind head on chore/resolve_swiftformat.

Files with missing lines Patch % Lines
...Model/Internal/Schema/ModelSchema+Definition.swift 60.71% 44 Missing ⚠️
Amplify/DevMenu/View/IssueReporter.swift 0.00% 27 Missing ⚠️
...Categories/DataStore/Subscribe/MutationEvent.swift 0.00% 20 Missing ⚠️
...plify/Core/Support/Internal/InternalTask+Hub.swift 20.00% 20 Missing ⚠️
Amplify/Categories/DataStore/Query/ModelKey.swift 9.52% 19 Missing ⚠️
...ries/DataStore/Subscribe/MutationEvent+Model.swift 0.00% 15 Missing ⚠️
...WSUnifiedLoggingPlugin/Internal/OSLogWrapper.swift 66.66% 12 Missing ⚠️
...Model/Internal/Schema/ModelField+Association.swift 52.38% 10 Missing ⚠️
Amplify/Core/Support/AmplifyTaskGateway.swift 0.00% 10 Missing ⚠️
.../Categories/Auth/AuthCategory+ClientBehavior.swift 0.00% 9 Missing ⚠️
... and 87 more
Additional details and impacted files
@@                      Coverage Diff                      @@
##           chore/resolve_swiftformat    #3843      +/-   ##
=============================================================
- Coverage                      68.51%   68.40%   -0.11%     
=============================================================
  Files                           1080     1080              
  Lines                          37608    37747     +139     
=============================================================
+ Hits                           25766    25821      +55     
- Misses                         11842    11926      +84     
Flag Coverage Δ
API_plugin_unit_test 68.96% <ø> (ø)
AWSPluginsCore 68.56% <ø> (ø)
Amplify 47.50% <48.88%> (-0.07%) ⬇️
Analytics_plugin_unit_test 84.52% <ø> (ø)
Auth_plugin_unit_test 79.60% <ø> (-0.08%) ⬇️
DataStore_plugin_unit_test 81.23% <ø> (+0.01%) ⬆️
Geo_plugin_unit_test 72.00% <ø> (ø)
Logging_plugin_unit_test 62.95% <ø> (ø)
Predictions_plugin_unit_test 37.32% <ø> (ø)
PushNotifications_plugin_unit_test 86.21% <ø> (ø)
Storage_plugin_unit_test 76.81% <ø> (ø)
unit_tests 68.40% <48.88%> (-0.11%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sebaland sebaland left a comment

Choose a reason for hiding this comment

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

Left some comments.

There's still a bunch of SwiftLint errors through the code. GitHub doesn't let me add comments on them because no line was changed, but we should either add // swiftlint:disable <rule> statements or fix them.

@@ -80,8 +88,8 @@ extension AuthCategory: AuthCategoryBehavior {
}

public func confirmResetPassword(
for username: String, with
newPassword: String,
for username: String, with newPassword: String,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for username: String, with newPassword: String,
for username: String,
with newPassword: String,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Amplify/Categories/Auth/AuthCategory+UserBehavior.swift Outdated Show resolved Hide resolved
Amplify/Categories/Hub/HubFilter.swift Outdated Show resolved Hide resolved
@phantumcode phantumcode merged commit 4e0fb7c into chore/resolve_swiftformat Sep 10, 2024
70 checks passed
@phantumcode phantumcode deleted the chore/resolve_swiftformat_amplify_module branch September 10, 2024 21:38
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.

2 participants