inst/lint.R

# Lint
if (!require(styler, quietly = TRUE)) {
     install.packages("styler")
}
docOrg <- lapply(dir("R", pattern="*.R", recursive = TRUE, full.names = TRUE), readLines)
styler::style_pkg()
docNew <- lapply(dir("R", pattern="*.R", recursive = TRUE, full.names = TRUE), readLines)
# Test
if (!identical(docOrg, docNew)) {
     stop("Lint was not performed, try running styler::style_pkg().")
}
adimajo/glmdisc documentation built on March 7, 2024, 7:47 p.m.