-
Notifications
You must be signed in to change notification settings - Fork 294
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
Enhancement - Improve Deployment-Phase Towing Logic #6606
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6606 +/- ##
==========================================
Coverage 29.13% 29.14%
- Complexity 15366 15405 +39
==========================================
Files 2863 2863
Lines 279868 279996 +128
Branches 49291 49302 +11
==========================================
+ Hits 81553 81611 +58
- Misses 192855 192908 +53
- Partials 5460 5477 +17 ☔ View full report in Codecov by Sentry. |
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.
this PR uses alot of lists and sets, which is great, but it also uses alot of nulls and null checks, please take a look if you can change some or most of the nulls you are using for empty collections instead, just to reduce the number of situations where we have to check for null, also there is deeply nested code in many places, see if its possible to avoid some of the nesting and aggregate multiple conditionals in a single test.
The usage of nulls & null checking was intentional, null is returned for those sets/lists as an alternative to getting and returning every valid coord. I'll see if I can get this refactored to not need to do that. |
Removed all of the null lists, reduced conditional nesting, and added a manual stack overflow exception for if a tractor->trailer->tractor situation occurs (which should & is prevented outside of this class). Thanks Luana! |
The original implementation of "put warning signs where your tractor/trailer wouldn't be valid" did not properly consider an already deployed tractors/trailers that were more than one link away. This is specifically tested now with
TowLinkWarningTest::testDeployTrailerMultiDeployed()
. This also includes a change to Princess to use the new method.