No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
7 changed files with
9 additions and
6 deletions
-
NAMESPACE
-
R/cloc-cran.r
-
R/cloc-package.r
-
R/cloc-recognized-languages.r
-
README.Rmd
-
man/cloc_recognized_languages.Rd
-
tests/testthat/test-cloc.R
|
|
@ -24,4 +24,6 @@ importFrom(utils,contrib.url) |
|
|
|
importFrom(utils,download.file) |
|
|
|
importFrom(utils,download.packages) |
|
|
|
importFrom(utils,read.table) |
|
|
|
importFrom(utils,setTxtProgressBar) |
|
|
|
importFrom(utils,tail) |
|
|
|
importFrom(utils,txtProgressBar) |
|
|
|
|
|
@ -36,7 +36,7 @@ cloc_cran <- function(pkgs, |
|
|
|
|
|
|
|
# call "cloc" on each package archive, bind results into a single data frame |
|
|
|
if (.progress) { |
|
|
|
pb <- txtProgressBar(min = 0, max = length(res_p$V2), style = 3) |
|
|
|
pb <- utils::txtProgressBar(min = 0, max = length(res_p$V2), style = 3) |
|
|
|
on.exit(close(pb), add = TRUE) |
|
|
|
} |
|
|
|
|
|
|
@ -46,7 +46,7 @@ cloc_cran <- function(pkgs, |
|
|
|
lapply(res_p$V2, function(x) { |
|
|
|
|
|
|
|
if (.progress) { |
|
|
|
setTxtProgressBar(pb, i) |
|
|
|
utils::setTxtProgressBar(pb, i) |
|
|
|
i <<- i + 1 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -62,4 +62,5 @@ |
|
|
|
#' @importFrom git2r clone |
|
|
|
#' @importFrom processx run |
|
|
|
#' @importFrom utils read.table contrib.url download.file download.packages tail |
|
|
|
#' @importFrom utils setTxtProgressBar txtProgressBar |
|
|
|
NULL |
|
|
|
|
|
@ -24,7 +24,7 @@ |
|
|
|
#' @return tibble |
|
|
|
#' @export |
|
|
|
#' @examples |
|
|
|
#' cloc_reognized_languages() |
|
|
|
#' cloc_recognized_languages() |
|
|
|
cloc_recognized_languages <- function() { |
|
|
|
|
|
|
|
perl <- Sys.which("perl") |
|
|
|
|
|
@ -108,7 +108,7 @@ str(cloc_by_file(system.file("extdata", "App.java", package="cloc"))) |
|
|
|
Recognized languages |
|
|
|
|
|
|
|
```{r message=FALSE, warning=FALSE, error=FALSE} |
|
|
|
cloc_reognized_languages() |
|
|
|
cloc_recognized_languages() |
|
|
|
``` |
|
|
|
|
|
|
|
Strip comments and whitespace from individual source files |
|
|
|
|
|
@ -35,5 +35,5 @@ just one or two lines for example, seldom have enough information to |
|
|
|
correctly distinguish between MATLAB, Mercury, MUMPS, or Objective C. |
|
|
|
} |
|
|
|
\examples{ |
|
|
|
cloc_reognized_languages() |
|
|
|
cloc_recognized_languages() |
|
|
|
} |
|
|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
context("cloc works (get it?") |
|
|
|
test_that("core bits are functioning as expected", { |
|
|
|
|
|
|
|
langs <- cloc_reognized_languages() |
|
|
|
langs <- cloc_recognized_languages() |
|
|
|
expect_equal(langs$lang[4], "ADSO/IDSM") |
|
|
|
expect_equal(cloc_version(), "1.77") |
|
|
|
expect_is(cloc_os(), "character") |
|
|
|