Sha256: a7e5673b4350b39e67c02ad0dfca86639e3c5acd3864f5b41edca652228f4295
Contents?: true
Size: 781 Bytes
Versions: 171
Compression:
Stored size: 781 Bytes
Contents
library(lintr) linters <- list( a = line_length_linter(80), b = camel_case_linter, c = assignment_linter, d = commas_linter, e = absolute_paths_linter, f = infix_spaces_linter ) files <- list.files(path = "exercises", pattern = ".+\\.R$", recursive = TRUE, full.names = TRUE) lints <- lintr:::flatten_lints(lapply(files, function(file) { if (interactive()) { message(".", appendLF = FALSE) } lint(file, linters, parse_settings = FALSE) })) if (interactive()) { message() } lints <- lintr:::reorder_lints(lints) class(lints) <- "lints" has_lints <- length(lints) > 0 lint_output <- NULL if (has_lints) { lint_output <- paste(collapse = "\n", capture.output(print(lints))) } testthat::expect(!has_lints, paste(sep = "\n", "Not lint free", lint_output))
Version data entries
171 entries across 171 versions & 1 rubygems