-
Notifications
You must be signed in to change notification settings - Fork 276
chore(cmd/cli): Reduce cyclomatic complexity of uninstall command #4825
chore(cmd/cli): Reduce cyclomatic complexity of uninstall command #4825
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4825 +/- ##
==========================================
+ Coverage 68.71% 68.73% +0.02%
==========================================
Files 220 220
Lines 15907 15927 +20
==========================================
+ Hits 10930 10947 +17
- Misses 4925 4928 +3
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
5bdb0b0
to
ffc87fa
Compare
LGTM other than Thomas's comments |
0fbcb45
to
9ba7ab2
Compare
aaf0a87
to
1141e73
Compare
3272702
to
81f70f8
Compare
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.
Who can argue against reduction in cyclomatic complexity!
Thank you for these changes @shalier
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.
a couple small comments, but otherwise LGTM!
f994bdb
to
ef6890d
Compare
acdb9ec
to
c05af3e
Compare
Separate code into functions to reduce the cyclomatic complexity And adds unit tests to functions created Helps unblock openservicemesh#4555 Signed-off-by: Shalier Xia <[email protected]>
Signed-off-by: Shalier Xia <[email protected]>
…function signature Signed-off-by: Shalier Xia <[email protected]>
Signed-off-by: Shalier Xia <[email protected]>
…to errors pkg Signed-off-by: Shalier Xia <[email protected]>
Signed-off-by: Shalier Xia <[email protected]>
c05af3e
to
2355600
Compare
* chore(cmd/cli): Reduce cyclomatic complexity of uninstall command (#4825) * chore(cmd/cli): Reduce cyclomatic complexity of uninstall command Separate code into functions to reduce the cyclomatic complexity And adds unit tests to functions created Helps unblock #4555 Signed-off-by: Shalier Xia <[email protected]> (cherry picked from commit d5d3a25) * Golang errors pkg (#4904) This PR partially resolves #4524 * Removes "github.com/pkg/errors" package from the repo * Wrap errors wherever possible rather than using the string format of the error as part of the message Signed-off-by: Allen Leigh <[email protected]> (cherry picked from commit 8030047) * fix golints and security scan issues (#4915) fix golints and security for: 1. G112 (ReadHeaderTimeout) 2. prometheus client_go version pinned to bad version Signed-off-by: Sean Teeling <[email protected]> (cherry picked from commit f768f64) * Fix lints by removing superfluous var type from var instantiation (#4917) Remove unnecessary var types during instantiation to fix lints Signed-off-by: Sean Teeling <[email protected]> (cherry picked from commit 9e9f712) Co-authored-by: Shalier Xia <[email protected]> Co-authored-by: allenlsy <[email protected]> Co-authored-by: steeling <[email protected]>
Description:
Separate code into functions to reduce the cyclomatic complexity
Helps unblock #4555
Signed-off-by: Shalier Xia [email protected]
Reduces cyclomatic complexity 30->19
Testing done:
Affected area:
Please answer the following questions with yes/no.
Does this change contain code from or inspired by another project?
Is this a breaking change?
Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?