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 of expressions/routines over 25 #34

Open
MichaelChirico opened this issue Oct 28, 2024 · 0 comments
Open

Comments

@MichaelChirico
Copy link
Collaborator

25 seems like a reasonable target for simplifying implementations/delegating to helper functions. Here are the functions/expression that are flagged as having a higher complexity currently:

R/bit.R:223:1: style: [cyclocomp_linter] Reduce the cyclomatic complexity of this function from 55 to at most 25.
bitwhich <- function(
^
R/bit.R:2446:1: style: [cyclocomp_linter] Reduce the cyclomatic complexity of this function from 29 to at most 25.
`[<-.bit` <- function(x, i, value) {
^
R/bit.R:2710:1: style: [cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 25.
`[<-.bitwhich` <- function(x, i, value) {
^
tests/testthat/test-bit.R:510:1: style: [cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 25.
test_that("aggregation functions work", {
^
tests/testthat/test-old-regtest.R:2:1: style: [cyclocomp_linter] Reduce the cyclomatic complexity of this function from 99 to at most 25.
regtest.bit <- function(N = 50) {
^
vignettes/bit-performance.Rmd:371:1: style: [cyclocomp_linter] Reduce the cyclomatic complexity of this function from 47 to at most 25.
for (n in names(binaryDomain)) {
^
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

No branches or pull requests

1 participant