atorus-research / xportr

Tools to build CDISC compliant data sets and check for CDISC compliance.

Home Page:https://atorus-research.github.io/xportr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce cyclomatic complexity

bms63 opened this issue · comments

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