Skip to content

reduce nesting where possible - #2303

Merged
IndrajeetPatil merged 7 commits into
mainfrom
nesting-fix
Nov 19, 2023
Merged

IndrajeetPatil merged 7 commits into
mainfrom
nesting-fix

Conversation

@MichaelChirico

Copy link
Copy Markdown
Collaborator

Uncovered by #2302

Comment thread inst/example/complexity.R Outdated
if (x > 10.0) {
if (x > 20.0) {
x <- x / 2.0
return(x)

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

codecov-commenter commented Nov 18, 2023 •

Copy link
Copy Markdown

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