Skip to content
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

Reduce cyclomatic complexity #244

Closed
2 tasks
bms63 opened this issue Feb 20, 2024 · 0 comments · Fixed by #254
Closed
2 tasks

Reduce cyclomatic complexity #244

bms63 opened this issue Feb 20, 2024 · 0 comments · Fixed by #254
Labels

Comments

@bms63
Copy link
Collaborator

bms63 commented Feb 20, 2024

Background

While working on xportr_length() the cyclomatic complexity lintr was failing.

What should I do to resolve this lint error? image

It has to do with the number of conditions being used in a function. https://en.wikipedia.org/wiki/Cyclomatic_complexity

I increased it to 18 in the .lintr file so this would check. Will make an issue for someone to look into for next release.

Originally posted by @bms63 in #238 (comment)

Definition of Done

  • Reduce the cyclomatic complexity of xportr_length()
  • Reduce .lintr file back to default of 15
@bms63 bms63 added the 0.5.0 label Feb 20, 2024
@averissimo averissimo linked a pull request Feb 29, 2024 that will close this issue
15 tasks
@bms63 bms63 closed this as completed in #254 Mar 4, 2024
bms63 pushed a commit that referenced this issue Mar 4, 2024
#254)

* chore: reduce cyclomatic complexity

* chore: remove extra lintr rules

* fix: force numeric width attribute

* lintr: reduce complexity and improve lintr rules

* lintr: allows object_usage linter with specific exception for glue

* chore: revert import of deprecate_stop

* chore: use integer for vapply template

* lintr: rename argument of internal function

* chore: missed 1 deprecated_stop in regression

* lintr: remove exception no longer necessary

* feat: remove repeated $

* chore: remove extra empty line

* lintr: revert to disable object_usage

* fix: remove space

* chore: removes unused import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant