inst/runit_tests/source/R/functions.R

failing_function <- function(x, clean = FALSE) {
    y <- c(x, x)  # add some comment that makes the line toooooooooooooooooooooooo wide
    # this is a comment only
    if (istrue(clean)) {
        if (istrue(clean)) {
            if (istrue(clean)) {
                if (istrue(clean)) {
                    message("This is nested")
                }
            }
        }
    }
}

passing_function <- function(x, clean = FALSE) {
    y <- c(x, x)
    # this is a comment only
    if (istrue(clean)) {
        if (istrue(clean)) {
            message("This is nested")
        }
    }
    return(TRUE)
}

Try the cleanr package in your browser

Any scripts or data that you put into this service are public.

cleanr documentation built on July 9, 2023, 7:30 p.m.