-
Notifications
You must be signed in to change notification settings - Fork 186
reduce nesting where possible #2303
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
Conversation
inst/example/complexity.R
Outdated
@@ -3,6 +3,7 @@ complexity <- function(x) { | |||
if (x > 10.0) { | |||
if (x > 20.0) { | |||
x <- x / 2.0 | |||
return(x) |
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.
maybe it's preferable to delete this file? Why do we keep it here... it's used in two tests, shouldn't we prefer to write out the code directly in those tests?
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, I agree. We can either directly include this code in tests or move this file somewhere to the tests
folder and use it from there.
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 would vote for ditching the file.
We can also lower the cyclocomp threshold in the tests to make the test code smaller.
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.
Reminded me I forgot to push the edit I made locally
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2303 +/- ##
=======================================
Coverage 99.40% 99.40%
=======================================
Files 117 117
Lines 5334 5334
=======================================
Hits 5302 5302
Misses 32 32 ☔ View full report in Codecov by Sentry. |
Uncovered by #2302