-
Notifications
You must be signed in to change notification settings - Fork 311
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
Update swift lint and format + appy fixes #2585
Update swift lint and format + appy fixes #2585
Conversation
Could you check tests? And you got a conflict |
This comment was marked as outdated.
This comment was marked as outdated.
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.
Besides CarPlay, any other manual changes?
@@ -57,7 +57,7 @@ class SceneManager { | |||
} | |||
} | |||
|
|||
func resolve<T>(with possible: T) { |
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.
Was this done by SwiftLint/swiftformat?
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.
Yes, it was done by swiftformat. I can create a rule that does not do this change.
} | ||
|
||
let areasAndDevicesDict = mapToareasAndEntities(devicesAndAreas: devicesAndAreas) | ||
var areasAndEntitiesDict = mapToAreasAndEntitiesDict(areasAndEntities: areasAndEntities) |
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.
Have you checked if the behavior is still the same? It looks good, but worth checking. If you dont see carplay right away you can manually add com.apple.developer.carplay-driving-task
entitlement to test it out (just dont commit it)
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Sure, that would be really good
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.
If you prefer you can do it on a separate PR and add //swiftlint:disable cyclomatic_complexity for now in this class, so we can keep the PR topic in focus
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.
I've reverted the change and disabled the swiftlint rule.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
No, all swift file changes are done by |
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.
LGTM!
Summary
Swift lint and swiftformat are outdated. This PR does update those + applies the new formatting form swiftformat.
There is 1 swift file with a manual change:
Sources/Vehicle/Templates/Areas/CarPlayAreasViewModel.swift
. This is done becauseswiftlint
did create the following swiftlint error:error: Cyclomatic Complexity Violation: Function should have complexity 10 or less; currently complexity is 11 (cyclomatic_complexity)
.Because it does change a lot of files the question is if we want to finetune the
swiftformat
rules.Screenshots
No user facing changes.
Link to pull request in Documentation repository
NA
Any other notes
NA