Skip to content

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

Merged
merged 7 commits into from
Nov 19, 2023
Merged

reduce nesting where possible #2303

merged 7 commits into from
Nov 19, 2023

Conversation

MichaelChirico
Copy link
Collaborator

Uncovered by #2302

@@ -3,6 +3,7 @@ complexity <- function(x) {
if (x > 10.0) {
if (x > 20.0) {
x <- x / 2.0
return(x)
Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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-commenter
Copy link

codecov-commenter commented Nov 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2460465) 99.40% compared to head (1c842bd) 99.40%.

❗ Current head 1c842bd differs from pull request most recent head 98ff681. Consider uploading reports for the commit 98ff681 to get more accurate results

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.
📢 Have feedback on the report? Share it here.

@IndrajeetPatil IndrajeetPatil merged commit 9920110 into main Nov 19, 2023
@IndrajeetPatil IndrajeetPatil deleted the nesting-fix branch December 3, 2023 07:33
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.

4 participants