Browse Source

README

master
boB Rudis 5 years ago
parent
commit
f1bcd53654
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 2
      DESCRIPTION
  2. 18
      README.Rmd
  3. 149
      README.md
  4. 130
      docs/CONDUCT.html
  5. 124
      docs/LICENSE-text.html
  6. 139
      docs/authors.html
  7. 148
      docs/docsearch.css
  8. 85
      docs/docsearch.js
  9. 362
      docs/index.html
  10. 12
      docs/link.svg
  11. 166
      docs/news/index.html
  12. 236
      docs/pkgdown.css
  13. 115
      docs/pkgdown.js
  14. 5
      docs/pkgdown.yml
  15. 194
      docs/reference/cloc-package.html
  16. 183
      docs/reference/cloc.html
  17. 185
      docs/reference/cloc_by_file.html
  18. 1009
      docs/reference/cloc_call.html
  19. 180
      docs/reference/cloc_cran.html
  20. 173
      docs/reference/cloc_git.html
  21. 185
      docs/reference/cloc_pkg.html
  22. 144
      docs/reference/cloc_pkg_md.html
  23. 185
      docs/reference/cloc_recognized_languages.html
  24. 160
      docs/reference/cloc_remove_comments.html
  25. 203
      docs/reference/index.html

2
DESCRIPTION

@ -32,4 +32,4 @@ LazyData: true
Suggests:
testthat,
covr
RoxygenNote: 6.0.1.9000
RoxygenNote: 6.1.1

18
README.Rmd

@ -1,5 +1,7 @@
---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
@ -81,14 +83,26 @@ cloc_cran(c("archdata", "hrbrthemes", "iptools", "dplyr"))
git tree
```{r message=FALSE, warning=FALSE, error=FALSE}
```{r message=FALSE, warning=FALSE, error=FALSE, eval=FALSE}
cloc_git("~/packages/cloc")
## source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
## 1 cloc Perl 1 0.1111111 10059 0.9867569158 787 0.910879630 1292 0.9570370370
## 2 cloc Markdown 2 0.2222222 60 0.0058858152 31 0.035879630 0 0.0000000000
## 3 cloc R 4 0.4444444 52 0.0051010398 22 0.025462963 25 0.0185185185
## 4 cloc Rmd 1 0.1111111 13 0.0012752600 21 0.024305556 32 0.0237037037
## 5 cloc YAML 1 0.1111111 10 0.0009809692 3 0.003472222 1 0.0007407407
```
git tree (with specific commit)
```{r message=FALSE, warning=FALSE, error=FALSE}
```{r message=FALSE, warning=FALSE, error=FALSE, eval=FALSE}
cloc_git("~/packages/cloc", "3643cd09d4b951b1b35d32dffe35985dfe7756c4")
## source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
## 1 cloc Perl 1 0.1111111 10059 0.9867569158 787 0.910879630 1292 0.9570370370
## 2 cloc Markdown 2 0.2222222 60 0.0058858152 31 0.035879630 0 0.0000000000
## 3 cloc R 4 0.4444444 52 0.0051010398 22 0.025462963 25 0.0185185185
## 4 cloc Rmd 1 0.1111111 13 0.0012752600 21 0.024305556 32 0.0237037037
## 5 cloc YAML 1 0.1111111 10 0.0009809692 3 0.003472222 1 0.0007407407
```
remote git tree

149
README.md

@ -62,36 +62,35 @@ Basic usage
``` r
# by dir
cloc(system.file("extdata", package="cloc"))
#> # A tibble: 3 x 10
#> # A tibble: 2 x 10
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 extdata C++ 1 0.333 142 0.493 41 0.621 63 0.457
#> 2 extdata R 1 0.333 138 0.479 24 0.364 71 0.514
#> 3 extdata Java 1 0.333 8 0.0278 1 0.0152 4 0.0290
#> 1 extdata C++ 1 0.5 142 0.507 41 0.631 63 0.470
#> 2 extdata R 1 0.5 138 0.493 24 0.369 71 0.530
# by file
cloc(system.file("extdata", "qrencoder.cpp", package="cloc"))
#> # A tibble: 1 x 10
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 qrencoder… C++ 1 1. 142 1. 41 1. 63 1.
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 qrencoder.… C++ 1 1 142 1 41 1 63 1
# from a url
cloc("https://rud.is/dl/cloc-1.74.tar.gz")
#> # A tibble: 93 x 10
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 cloc-1.… Perl 5 0.0180 19712 0.598 1353 0.420 2430 0.443
#> 2 cloc-1.… YAML 141 0.507 2887 0.0876 1 0.000311 141 0.0257
#> 3 cloc-1.… Markdown 1 0.00360 2195 0.0666 226 0.0702 26 0.00474
#> 4 cloc-1.… ANTLR Gr… 2 0.00719 1012 0.0307 200 0.0621 59 0.0108
#> 5 cloc-1.… R 3 0.0108 698 0.0212 95 0.0295 312 0.0569
#> 6 cloc-1.… C/C++ He… 1 0.00360 617 0.0187 191 0.0593 780 0.142
#> 7 cloc-1.… C++ 4 0.0144 570 0.0173 132 0.0410 173 0.0315
#> 8 cloc-1.… Forth 2 0.00719 529 0.0160 17 0.00528 84 0.0153
#> 9 cloc-1.… TypeScri… 3 0.0108 410 0.0124 52 0.0162 39 0.00711
#> 10 cloc-1.… Logtalk 1 0.00360 368 0.0112 59 0.0183 57 0.0104
#> # ... with 83 more rows
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 cloc-1.7… Perl 5 0.0180 19712 0.598 1353 0.420 2430 0.443
#> 2 cloc-1.7… YAML 141 0.507 2887 0.0876 1 0.000311 141 0.0257
#> 3 cloc-1.7… Markdown 1 0.00360 2195 0.0666 226 0.0702 26 0.00474
#> 4 cloc-1.7… ANTLR Gr… 2 0.00719 1012 0.0307 200 0.0621 59 0.0108
#> 5 cloc-1.7… R 3 0.0108 698 0.0212 95 0.0295 312 0.0569
#> 6 cloc-1.7… C/C++ He… 1 0.00360 617 0.0187 191 0.0593 780 0.142
#> 7 cloc-1.7… C++ 4 0.0144 570 0.0173 132 0.0410 173 0.0315
#> 8 cloc-1.7… Forth 2 0.00719 529 0.0160 17 0.00528 84 0.0153
#> 9 cloc-1.7… TypeScri… 3 0.0108 410 0.0124 52 0.0162 39 0.00711
#> 10 cloc-1.7… Logtalk 1 0.00360 368 0.0112 59 0.0183 57 0.0104
#> # with 83 more rows
```
Custom CRAN package counter:
@ -99,58 +98,52 @@ Custom CRAN package counter:
``` r
cloc_cran(c("archdata", "hrbrthemes", "iptools", "dplyr"))
#> # A tibble: 19 x 11
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 archdat<NA> 0. 0. 0. 0. 0. 0. 0. 0.
#> 2 hrbrthe… R 20. 0.690 927. 0.627 183. 0.523 549. 0.823
#> 3 hrbrthe… HTML 2. 0.0690 366. 0.248 48. 0.137 2. 0.00300
#> 4 hrbrthe… CSS 1. 0.0345 113. 0.0765 27. 0.0771 0. 0.
#> 5 hrbrthe… Rmd 3. 0.103 35. 0.0237 78. 0.223 116. 0.174
#> 6 hrbrthe… Markdown 1. 0.0345 29. 0.0196 14. 0.0400 0. 0.
#> 7 hrbrthe… YAML 2. 0.0690 8. 0.00541 0. 0. 0. 0.
#> 8 iptools… C++ 4. 0.143 846. 0.423 167. 0.408 375. 0.289
#> 9 iptools… HTML 2. 0.0714 637. 0.319 54. 0.132 2. 0.00154
#> 10 iptools… R 19. 0.679 431. 0.216 125. 0.306 625. 0.482
#> 11 iptools… Rmd 2. 0.0714 48. 0.0240 33. 0.0807 72. 0.0555
#> 12 iptools… C/C++ H… 1. 0.0357 37. 0.0185 30. 0.0733 223. 0.172
#> 13 dplyr_0… R 147. 0.461 13231. 0.465 2672. 0.390 3879. 0.673
#> 14 dplyr_0… C/C++ H… 125. 0.392 6689. 0.235 1837. 0.268 270. 0.0469
#> 15 dplyr_0… C++ 33. 0.103 4730. 0.166 920. 0.134 337. 0.0585
#> 16 dplyr_0… HTML 5. 0.0157 2040. 0.0718 174. 0.0254 5. 0.000868
#> 17 dplyr_0… Markdown 2. 0.00627 1289. 0.0453 624. 0.0910 0. 0.
#> 18 dplyr_0… Rmd 6. 0.0188 421. 0.0148 622. 0.0907 1270. 0.220
#> 19 dplyr_0… C 1. 0.00313 30. 0.00106 7. 0.00102 0. 0.
#> # ... with 1 more variable: pkg <chr>
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 archd… <NA> 0 0 0 0. 0 0 0 0
#> 2 hrbrt… R 21 0.7 1094 6.63e-1 215 0.560 584 0.832
#> 3 hrbrt… HTML 2 0.0667 366 2.22e-1 48 0.125 2 0.00285
#> 4 hrbrt… CSS 1 0.0333 113 6.85e-2 27 0.0703 0 0
#> 5 hrbrt… Rmd 3 0.1 35 2.12e-2 78 0.203 116 0.165
#> 6 hrbrt… Markdown 1 0.0333 33 2.00e-2 16 0.0417 0 0
#> 7 hrbrt… YAML 2 0.0667 8 4.85e-3 0 0 0 0
#> 8 iptoo… C++ 4 0.138 846 4.21e-1 167 0.400 375 0.286
#> 9 iptoo… HTML 2 0.0690 633 3.15e-1 54 0.129 2 0.00153
#> 10 iptoo… R 20 0.690 444 2.21e-1 133 0.319 638 0.487
#> 11 iptoo… Rmd 2 0.0690 48 2.39e-2 33 0.0791 72 0.0550
#> 12 iptoo… C/C++ H… 1 0.0345 37 1.84e-2 30 0.0719 223 0.170
#> 13 dplyr… R 171 0.552 14999 4.76e-1 3127 0.425 4957 0.685
#> 14 dplyr… C/C++ H… 101 0.326 6661 2.11e-1 1754 0.238 483 0.0668
#> 15 dplyr… C++ 23 0.0742 4706 1.49e-1 954 0.130 437 0.0604
#> 16 dplyr… HTML 5 0.0161 3206 1.02e-1 140 0.0190 5 0.000691
#> 17 dplyr… Markdown 2 0.00645 1479 4.69e-2 708 0.0962 0 0
#> 18 dplyr… Rmd 7 0.0226 462 1.46e-2 667 0.0907 1350 0.187
#> 19 dplyr… C 1 0.00323 30 9.51e-4 7 0.000951 0 0
#> # with 1 more variable: pkg <chr>
```
git tree
``` r
cloc_git("~/packages/cloc")
#> # A tibble: 7 x 10
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 cloc Perl 1 0.0333 11153 0.912 835 0.705 1291 0.722
#> 2 cloc R 17 0.567 622 0.0509 207 0.175 360 0.201
#> 3 cloc Markdown 3 0.100 246 0.0201 49 0.0414 0 0.
#> 4 cloc C++ 1 0.0333 142 0.0116 41 0.0346 63 0.0352
#> 5 cloc YAML 3 0.100 35 0.00286 14 0.0118 3 0.00168
#> 6 cloc Rmd 1 0.0333 24 0.00196 38 0.0321 71 0.0397
#> 7 cloc JSON 4 0.133 4 0.000327 0 0. 0 0.
## source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
## 1 cloc Perl 1 0.1111111 10059 0.9867569158 787 0.910879630 1292 0.9570370370
## 2 cloc Markdown 2 0.2222222 60 0.0058858152 31 0.035879630 0 0.0000000000
## 3 cloc R 4 0.4444444 52 0.0051010398 22 0.025462963 25 0.0185185185
## 4 cloc Rmd 1 0.1111111 13 0.0012752600 21 0.024305556 32 0.0237037037
## 5 cloc YAML 1 0.1111111 10 0.0009809692 3 0.003472222 1 0.0007407407
```
git tree (with specific commit)
``` r
cloc_git("~/packages/cloc", "3643cd09d4b951b1b35d32dffe35985dfe7756c4")
#> # A tibble: 5 x 10
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 cloc Perl 1 0.111 10059 0.987 787 0.911 1292 0.957
#> 2 cloc Markdown 2 0.222 60 0.00589 31 0.0359 0 0.
#> 3 cloc R 4 0.444 52 0.00510 22 0.0255 25 0.0185
#> 4 cloc Rmd 1 0.111 13 0.00128 21 0.0243 32 0.0237
#> 5 cloc YAML 1 0.111 10 0.000981 3 0.00347 1 0.000741
## source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
## 1 cloc Perl 1 0.1111111 10059 0.9867569158 787 0.910879630 1292 0.9570370370
## 2 cloc Markdown 2 0.2222222 60 0.0058858152 31 0.035879630 0 0.0000000000
## 3 cloc R 4 0.4444444 52 0.0051010398 22 0.025462963 25 0.0185185185
## 4 cloc Rmd 1 0.1111111 13 0.0012752600 21 0.024305556 32 0.0237037037
## 5 cloc YAML 1 0.1111111 10 0.0009809692 3 0.003472222 1 0.0007407407
```
remote git tree
@ -158,12 +151,12 @@ remote git tree
``` r
cloc_git("git://github.com/maelle/convertagd.git")
#> # A tibble: 4 x 10
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 convertag… R 7 0.583 249 0.659 70 0.560 68 0.667
#> 2 convertag… Markdown 2 0.167 77 0.204 23 0.184 0 0.
#> 3 convertag… YAML 2 0.167 42 0.111 16 0.128 4 0.0392
#> 4 convertag… Rmd 1 0.0833 10 0.0265 16 0.128 30 0.294
#> source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct
#> <chr> <chr> <int> <dbl> <int> <dbl> <int> <dbl> <int> <dbl>
#> 1 convertagd… R 7 0.583 249 0.659 70 0.56 68 0.667
#> 2 convertagd… Markdown 2 0.167 77 0.204 23 0.184 0 0
#> 3 convertagd… YAML 2 0.167 42 0.111 16 0.128 4 0.0392
#> 4 convertagd… Rmd 1 0.0833 10 0.0265 16 0.128 30 0.294
```
Detailed results by file
@ -171,13 +164,13 @@ Detailed results by file
``` r
# whole dir
str(cloc_by_file(system.file("extdata", package="cloc")))
#> Classes 'tbl_df', 'tbl' and 'data.frame': 3 obs. of 6 variables:
#> $ source : chr "extdata" "extdata" "extdata"
#> $ filename : chr "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/qrencoder.cpp" "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/dbi.r" "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/App.java"
#> $ language : chr "C++" "R" "Java"
#> $ loc : int 142 138 8
#> $ blank_lines : int 41 24 1
#> $ comment_lines: int 63 71 4
#> Classes 'tbl_df', 'tbl' and 'data.frame': 2 obs. of 6 variables:
#> $ source : chr "extdata" "extdata"
#> $ filename : chr "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/qrencoder.cpp" "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/dbi.r"
#> $ language : chr "C++" "R"
#> $ loc : int 142 138
#> $ blank_lines : int 41 24
#> $ comment_lines: int 63 71
# single file
str(cloc_by_file(system.file("extdata", "qrencoder.cpp", package="cloc")))
@ -207,7 +200,7 @@ cloc_recognized_languages()
#> 8 ANTLR Grammar g, g4
#> 9 Apex Trigger trigger
#> 10 Arduino Sketch ino, pde
#> # ... with 232 more rows
#> # with 232 more rows
```
Strip comments and whitespace from individual source files
@ -230,10 +223,10 @@ cat(
## cloc Metrics
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) |
| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | --: |
| R | 16 | 0.94 | 484 | 0.95 | 183 | 0.83 | 289 | 0.8 |
| Rmd | 1 | 0.06 | 24 | 0.05 | 38 | 0.17 | 71 | 0.2 |
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) |
| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: |
| R | 16 | 0.94 | 484 | 0.95 | 183 | 0.83 | 289 | 0.77 |
| Rmd | 1 | 0.06 | 24 | 0.05 | 38 | 0.17 | 85 | 0.23 |
## Code of Conduct

130
docs/CONDUCT.html

@ -0,0 +1,130 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contributor Code of Conduct • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script>
<meta property="og:title" content="Contributor Code of Conduct" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Contributor Code of Conduct</h1>
</div>
<div id="contributor-code-of-conduct" class="section level1">
<p>As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.</p>
<p>We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.</p>
<p>Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.</p>
<p>Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.</p>
<p>Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.</p>
<p>This Code of Conduct is adapted from the Contributor Covenant (<a href="http:contributor-covenant.org" class="uri">http:contributor-covenant.org</a>), version 1.0.0, available at <a href="http://contributor-covenant.org/version/1/0/0/" class="uri">http://contributor-covenant.org/version/1/0/0/</a></p>
</div>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

124
docs/LICENSE-text.html

@ -0,0 +1,124 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>License • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script>
<meta property="og:title" content="License" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>License</h1>
</div>
<pre>YEAR: 2015
COPYRIGHT HOLDER: Bob Rudis
</pre>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

139
docs/authors.html

@ -0,0 +1,139 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authors • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script>
<meta property="og:title" content="Authors" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-authors">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Authors</h1>
</div>
<ul class="list-unstyled">
<li>
<p><strong>Bob Rudis</strong>. Author, maintainer. <a href='https://orcid.org/0000-0001-5670-2640' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid' alt='ORCID' height='16'></a>
</p>
</li>
<li>
<p><strong>Al Danial</strong>. Author.
<br /><small>cloc perl script</small></p>
</li>
<li>
<p><strong>Maëlle Salmon</strong>. Contributor.
</p>
</li>
<li>
<p><strong>Chris Muir</strong>. Contributor.
</p>
</li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

148
docs/docsearch.css

File diff suppressed because one or more lines are too long

85
docs/docsearch.js

@ -0,0 +1,85 @@
$(function() {
// register a handler to move the focus to the search bar
// upon pressing shift + "/" (i.e. "?")
$(document).on('keydown', function(e) {
if (e.shiftKey && e.keyCode == 191) {
e.preventDefault();
$("#search-input").focus();
}
});
$(document).ready(function() {
// do keyword highlighting
/* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */
var mark = function() {
var referrer = document.URL ;
var paramKey = "q" ;
if (referrer.indexOf("?") !== -1) {
var qs = referrer.substr(referrer.indexOf('?') + 1);
var qs_noanchor = qs.split('#')[0];
var qsa = qs_noanchor.split('&');
var keyword = "";
for (var i = 0; i < qsa.length; i++) {
var currentParam = qsa[i].split('=');
if (currentParam.length !== 2) {
continue;
}
if (currentParam[0] == paramKey) {
keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20"));
}
}
if (keyword !== "") {
$(".contents").unmark({
done: function() {
$(".contents").mark(keyword);
}
});
}
}
};
mark();
});
});
/* Search term highlighting ------------------------------*/
function matchedWords(hit) {
var words = [];
var hierarchy = hit._highlightResult.hierarchy;
// loop to fetch from lvl0, lvl1, etc.
for (var idx in hierarchy) {
words = words.concat(hierarchy[idx].matchedWords);
}
var content = hit._highlightResult.content;
if (content) {
words = words.concat(content.matchedWords);
}
// return unique words
var words_uniq = [...new Set(words)];
return words_uniq;
}
function updateHitURL(hit) {
var words = matchedWords(hit);
var url = "";
if (hit.anchor) {
url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor;
} else {
url = hit.url + '?q=' + escape(words.join(" "));
}
return url;
}

362
docs/index.html

@ -0,0 +1,362 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count Lines of Code, Comments and Whitespace in Source Files and Archives • cloc</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script><meta property="og:title" content="Count Lines of Code, Comments and Whitespace in Source Files and Archives">
<meta property="og:description" content="Counts blank lines, comment lines, and physical lines of source code
in source files/trees/archives. An R wrapper to the 'Perl' command-line utility
&lt;https://github.com/AlDanial/cloc&gt;.">
<meta name="twitter:card" content="summary">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<!-- README.md is generated from README.Rmd. Please edit that file -->
<div id="cloc" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#cloc" class="anchor"></a>cloc</h1></div>
<p>Count Lines of Code, Comments and Whitespace in Source Files and Archives</p>
<div id="description" class="section level2">
<h2 class="hasAnchor">
<a href="#description" class="anchor"></a>Description</h2>
<p>Counts blank lines, comment lines, and physical lines of source code in source files/trees/archives. An R wrapper to the Perl <code>cloc</code> utility <a href="https://github.com/AlDanial/cloc" class="uri">https://github.com/AlDanial/cloc</a> by <span class="citation">@AlDanial</span>.</p>
</div>
<div id="whats-inside-the-tin" class="section level2">
<h2 class="hasAnchor">
<a href="#whats-inside-the-tin" class="anchor"></a>What’s Inside The Tin</h2>
<p>The following functions are implemented:</p>
<ul>
<li>
<code>cloc</code>: Count lines of code, comments and whitespace in source files/archives</li>
<li>
<code>cloc_by_file</code>: Count lines of code, comments and whitespace in source files/archives by file</li>
<li>
<code>cloc_cran</code>: Count lines of code (etc) from source packages on CRAN</li>
<li>
<code>cloc_git</code>: Count lines of code, comments and whitespace in a git tree</li>
<li>
<code>cloc_remove_comments</code>: Strip comments and white space from a single source file</li>
<li>
<code>cloc_recognized_languages</code>: Return a data frame of ‘cloc’ recognized languages and associated extensions</li>
<li>
<code>cloc_call</code>: Call ‘cloc.pl’ directly with granular control over options</li>
<li>
<code>clock_pkg_md</code> : Run <code><a href="reference/cloc_pkg.html">cloc_pkg()</a></code> on active package and format it as a markdown table for knitting into reports</li>
<li>
<code>cloc_help</code>: See the command-line help</li>
<li>
<code>cloc_version</code>: Retrieve the version of the embedded perl script</li>
<li>
<code>cloc_os</code>: Ask the embedded perl script to detect the OS type</li>
</ul>
</div>
<div id="usage" class="section level2">
<h2 class="hasAnchor">
<a href="#usage" class="anchor"></a>Usage</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">devtools<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">install_github</a></span>(<span class="st">"hrbrmstr/cloc"</span>)</a></code></pre></div>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(cloc)</a>
<a class="sourceLine" id="cb2-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(tibble)</a>
<a class="sourceLine" id="cb2-3" title="3"></a>
<a class="sourceLine" id="cb2-4" title="4"><span class="co"># current verison</span></a>
<a class="sourceLine" id="cb2-5" title="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/packageDescription">packageVersion</a></span>(<span class="st">"cloc"</span>)</a>
<a class="sourceLine" id="cb2-6" title="6"><span class="co">#&gt; [1] '0.3.0'</span></a></code></pre></div>
<p>Basic usage</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="co"># by dir</span></a>
<a class="sourceLine" id="cb3-2" title="2"><span class="kw"><a href="reference/cloc.html">cloc</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/system.file">system.file</a></span>(<span class="st">"extdata"</span>, <span class="dt">package=</span><span class="st">"cloc"</span>))</a>
<a class="sourceLine" id="cb3-3" title="3"><span class="co">#&gt; # A tibble: 2 x 10</span></a>
<a class="sourceLine" id="cb3-4" title="4"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb3-5" title="5"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb3-6" title="6"><span class="co">#&gt; 1 extdata C++ 1 0.5 142 0.507 41 0.631 63 0.470</span></a>
<a class="sourceLine" id="cb3-7" title="7"><span class="co">#&gt; 2 extdata R 1 0.5 138 0.493 24 0.369 71 0.530</span></a>
<a class="sourceLine" id="cb3-8" title="8"></a>
<a class="sourceLine" id="cb3-9" title="9"><span class="co"># by file</span></a>
<a class="sourceLine" id="cb3-10" title="10"><span class="kw"><a href="reference/cloc.html">cloc</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/system.file">system.file</a></span>(<span class="st">"extdata"</span>, <span class="st">"qrencoder.cpp"</span>, <span class="dt">package=</span><span class="st">"cloc"</span>))</a>
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#&gt; # A tibble: 1 x 10</span></a>
<a class="sourceLine" id="cb3-12" title="12"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb3-13" title="13"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#&gt; 1 qrencoder.… C++ 1 1 142 1 41 1 63 1</span></a>
<a class="sourceLine" id="cb3-15" title="15"></a>
<a class="sourceLine" id="cb3-16" title="16"><span class="co"># from a url</span></a>
<a class="sourceLine" id="cb3-17" title="17"><span class="kw"><a href="reference/cloc.html">cloc</a></span>(<span class="st">"https://rud.is/dl/cloc-1.74.tar.gz"</span>)</a>
<a class="sourceLine" id="cb3-18" title="18"><span class="co">#&gt; # A tibble: 93 x 10</span></a>
<a class="sourceLine" id="cb3-19" title="19"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb3-20" title="20"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb3-21" title="21"><span class="co">#&gt; 1 cloc-1.7… Perl 5 0.0180 19712 0.598 1353 0.420 2430 0.443 </span></a>
<a class="sourceLine" id="cb3-22" title="22"><span class="co">#&gt; 2 cloc-1.7… YAML 141 0.507 2887 0.0876 1 0.000311 141 0.0257 </span></a>
<a class="sourceLine" id="cb3-23" title="23"><span class="co">#&gt; 3 cloc-1.7… Markdown 1 0.00360 2195 0.0666 226 0.0702 26 0.00474</span></a>
<a class="sourceLine" id="cb3-24" title="24"><span class="co">#&gt; 4 cloc-1.7… ANTLR Gr… 2 0.00719 1012 0.0307 200 0.0621 59 0.0108 </span></a>
<a class="sourceLine" id="cb3-25" title="25"><span class="co">#&gt; 5 cloc-1.7… R 3 0.0108 698 0.0212 95 0.0295 312 0.0569 </span></a>
<a class="sourceLine" id="cb3-26" title="26"><span class="co">#&gt; 6 cloc-1.7… C/C++ He… 1 0.00360 617 0.0187 191 0.0593 780 0.142 </span></a>
<a class="sourceLine" id="cb3-27" title="27"><span class="co">#&gt; 7 cloc-1.7… C++ 4 0.0144 570 0.0173 132 0.0410 173 0.0315 </span></a>
<a class="sourceLine" id="cb3-28" title="28"><span class="co">#&gt; 8 cloc-1.7… Forth 2 0.00719 529 0.0160 17 0.00528 84 0.0153 </span></a>
<a class="sourceLine" id="cb3-29" title="29"><span class="co">#&gt; 9 cloc-1.7… TypeScri… 3 0.0108 410 0.0124 52 0.0162 39 0.00711</span></a>
<a class="sourceLine" id="cb3-30" title="30"><span class="co">#&gt; 10 cloc-1.7… Logtalk 1 0.00360 368 0.0112 59 0.0183 57 0.0104 </span></a>
<a class="sourceLine" id="cb3-31" title="31"><span class="co">#&gt; # … with 83 more rows</span></a></code></pre></div>
<p>Custom CRAN package counter:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="reference/cloc_cran.html">cloc_cran</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"archdata"</span>, <span class="st">"hrbrthemes"</span>, <span class="st">"iptools"</span>, <span class="st">"dplyr"</span>))</a>
<a class="sourceLine" id="cb4-2" title="2"><span class="co">#&gt; # A tibble: 19 x 11</span></a>
<a class="sourceLine" id="cb4-3" title="3"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb4-4" title="4"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb4-5" title="5"><span class="co">#&gt; 1 archd… &lt;NA&gt; 0 0 0 0. 0 0 0 0 </span></a>
<a class="sourceLine" id="cb4-6" title="6"><span class="co">#&gt; 2 hrbrt… R 21 0.7 1094 6.63e-1 215 0.560 584 0.832 </span></a>
<a class="sourceLine" id="cb4-7" title="7"><span class="co">#&gt; 3 hrbrt… HTML 2 0.0667 366 2.22e-1 48 0.125 2 0.00285 </span></a>
<a class="sourceLine" id="cb4-8" title="8"><span class="co">#&gt; 4 hrbrt… CSS 1 0.0333 113 6.85e-2 27 0.0703 0 0 </span></a>
<a class="sourceLine" id="cb4-9" title="9"><span class="co">#&gt; 5 hrbrt… Rmd 3 0.1 35 2.12e-2 78 0.203 116 0.165 </span></a>
<a class="sourceLine" id="cb4-10" title="10"><span class="co">#&gt; 6 hrbrt… Markdown 1 0.0333 33 2.00e-2 16 0.0417 0 0 </span></a>
<a class="sourceLine" id="cb4-11" title="11"><span class="co">#&gt; 7 hrbrt… YAML 2 0.0667 8 4.85e-3 0 0 0 0 </span></a>
<a class="sourceLine" id="cb4-12" title="12"><span class="co">#&gt; 8 iptoo… C++ 4 0.138 846 4.21e-1 167 0.400 375 0.286 </span></a>
<a class="sourceLine" id="cb4-13" title="13"><span class="co">#&gt; 9 iptoo… HTML 2 0.0690 633 3.15e-1 54 0.129 2 0.00153 </span></a>
<a class="sourceLine" id="cb4-14" title="14"><span class="co">#&gt; 10 iptoo… R 20 0.690 444 2.21e-1 133 0.319 638 0.487 </span></a>
<a class="sourceLine" id="cb4-15" title="15"><span class="co">#&gt; 11 iptoo… Rmd 2 0.0690 48 2.39e-2 33 0.0791 72 0.0550 </span></a>
<a class="sourceLine" id="cb4-16" title="16"><span class="co">#&gt; 12 iptoo… C/C++ H… 1 0.0345 37 1.84e-2 30 0.0719 223 0.170 </span></a>
<a class="sourceLine" id="cb4-17" title="17"><span class="co">#&gt; 13 dplyr… R 171 0.552 14999 4.76e-1 3127 0.425 4957 0.685 </span></a>
<a class="sourceLine" id="cb4-18" title="18"><span class="co">#&gt; 14 dplyr… C/C++ H… 101 0.326 6661 2.11e-1 1754 0.238 483 0.0668 </span></a>
<a class="sourceLine" id="cb4-19" title="19"><span class="co">#&gt; 15 dplyr… C++ 23 0.0742 4706 1.49e-1 954 0.130 437 0.0604 </span></a>
<a class="sourceLine" id="cb4-20" title="20"><span class="co">#&gt; 16 dplyr… HTML 5 0.0161 3206 1.02e-1 140 0.0190 5 0.000691</span></a>
<a class="sourceLine" id="cb4-21" title="21"><span class="co">#&gt; 17 dplyr… Markdown 2 0.00645 1479 4.69e-2 708 0.0962 0 0 </span></a>
<a class="sourceLine" id="cb4-22" title="22"><span class="co">#&gt; 18 dplyr… Rmd 7 0.0226 462 1.46e-2 667 0.0907 1350 0.187 </span></a>
<a class="sourceLine" id="cb4-23" title="23"><span class="co">#&gt; 19 dplyr… C 1 0.00323 30 9.51e-4 7 0.000951 0 0 </span></a>
<a class="sourceLine" id="cb4-24" title="24"><span class="co">#&gt; # … with 1 more variable: pkg &lt;chr&gt;</span></a></code></pre></div>
<p>git tree</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="reference/cloc_git.html">cloc_git</a></span>(<span class="st">"~/packages/cloc"</span>)</a>
<a class="sourceLine" id="cb5-2" title="2"><span class="co">#&gt; # A tibble: 10 x 10</span></a>
<a class="sourceLine" id="cb5-3" title="3"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb5-4" title="4"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb5-5" title="5"><span class="co">#&gt; 1 cloc Perl 1 0.0256 11153 0.863 835 0.592 1291 0.690 </span></a>
<a class="sourceLine" id="cb5-6" title="6"><span class="co">#&gt; 2 cloc R 17 0.436 622 0.0481 207 0.147 360 0.192 </span></a>
<a class="sourceLine" id="cb5-7" title="7"><span class="co">#&gt; 3 cloc CSS 2 0.0513 282 0.0218 71 0.0504 31 0.0166 </span></a>
<a class="sourceLine" id="cb5-8" title="8"><span class="co">#&gt; 4 cloc Markdown 4 0.103 265 0.0205 57 0.0404 0 0 </span></a>
<a class="sourceLine" id="cb5-9" title="9"><span class="co">#&gt; 5 cloc HTML 3 0.0769 251 0.0194 106 0.0752 36 0.0192 </span></a>
<a class="sourceLine" id="cb5-10" title="10"><span class="co">#&gt; 6 cloc JavaScript 2 0.0513 144 0.0111 40 0.0284 16 0.00855</span></a>
<a class="sourceLine" id="cb5-11" title="11"><span class="co">#&gt; 7 cloc C++ 1 0.0256 142 0.0110 41 0.0291 63 0.0337 </span></a>
<a class="sourceLine" id="cb5-12" title="12"><span class="co">#&gt; 8 cloc YAML 4 0.103 39 0.00302 15 0.0106 3 0.00160</span></a>
<a class="sourceLine" id="cb5-13" title="13"><span class="co">#&gt; 9 cloc Rmd 1 0.0256 24 0.00186 38 0.0270 71 0.0379 </span></a>
<a class="sourceLine" id="cb5-14" title="14"><span class="co">#&gt; 10 cloc JSON 4 0.103 4 0.000309 0 0 0 0</span></a></code></pre></div>
<p>git tree (with specific commit)</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><a href="reference/cloc_git.html">cloc_git</a></span>(<span class="st">"~/packages/cloc"</span>, <span class="st">"3643cd09d4b951b1b35d32dffe35985dfe7756c4"</span>)</a>
<a class="sourceLine" id="cb6-2" title="2"><span class="co">#&gt; # A tibble: 5 x 10</span></a>
<a class="sourceLine" id="cb6-3" title="3"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb6-4" title="4"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb6-5" title="5"><span class="co">#&gt; 1 cloc Perl 1 0.111 10059 0.987 787 0.911 1292 0.957 </span></a>
<a class="sourceLine" id="cb6-6" title="6"><span class="co">#&gt; 2 cloc Markdown 2 0.222 60 0.00589 31 0.0359 0 0 </span></a>
<a class="sourceLine" id="cb6-7" title="7"><span class="co">#&gt; 3 cloc R 4 0.444 52 0.00510 22 0.0255 25 0.0185 </span></a>
<a class="sourceLine" id="cb6-8" title="8"><span class="co">#&gt; 4 cloc Rmd 1 0.111 13 0.00128 21 0.0243 32 0.0237 </span></a>
<a class="sourceLine" id="cb6-9" title="9"><span class="co">#&gt; 5 cloc YAML 1 0.111 10 0.000981 3 0.00347 1 0.000741</span></a></code></pre></div>
<p>remote git tree</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1"><span class="kw"><a href="reference/cloc_git.html">cloc_git</a></span>(<span class="st">"git://github.com/maelle/convertagd.git"</span>)</a>
<a class="sourceLine" id="cb7-2" title="2"><span class="co">#&gt; # A tibble: 4 x 10</span></a>
<a class="sourceLine" id="cb7-3" title="3"><span class="co">#&gt; source language file_count file_count_pct loc loc_pct blank_lines blank_line_pct comment_lines comment_line_pct</span></a>
<a class="sourceLine" id="cb7-4" title="4"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt;</span></a>
<a class="sourceLine" id="cb7-5" title="5"><span class="co">#&gt; 1 convertagd… R 7 0.583 249 0.659 70 0.56 68 0.667 </span></a>
<a class="sourceLine" id="cb7-6" title="6"><span class="co">#&gt; 2 convertagd… Markdown 2 0.167 77 0.204 23 0.184 0 0 </span></a>
<a class="sourceLine" id="cb7-7" title="7"><span class="co">#&gt; 3 convertagd… YAML 2 0.167 42 0.111 16 0.128 4 0.0392</span></a>
<a class="sourceLine" id="cb7-8" title="8"><span class="co">#&gt; 4 convertagd… Rmd 1 0.0833 10 0.0265 16 0.128 30 0.294</span></a></code></pre></div>
<p>Detailed results by file</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="co"># whole dir</span></a>
<a class="sourceLine" id="cb8-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/str">str</a></span>(<span class="kw"><a href="reference/cloc_by_file.html">cloc_by_file</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/system.file">system.file</a></span>(<span class="st">"extdata"</span>, <span class="dt">package=</span><span class="st">"cloc"</span>)))</a>
<a class="sourceLine" id="cb8-3" title="3"><span class="co">#&gt; Classes 'tbl_df', 'tbl' and 'data.frame': 2 obs. of 6 variables:</span></a>
<a class="sourceLine" id="cb8-4" title="4"><span class="co">#&gt; $ source : chr "extdata" "extdata"</span></a>
<a class="sourceLine" id="cb8-5" title="5"><span class="co">#&gt; $ filename : chr "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/qrencoder.cpp" "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/dbi.r"</span></a>
<a class="sourceLine" id="cb8-6" title="6"><span class="co">#&gt; $ language : chr "C++" "R"</span></a>
<a class="sourceLine" id="cb8-7" title="7"><span class="co">#&gt; $ loc : int 142 138</span></a>
<a class="sourceLine" id="cb8-8" title="8"><span class="co">#&gt; $ blank_lines : int 41 24</span></a>
<a class="sourceLine" id="cb8-9" title="9"><span class="co">#&gt; $ comment_lines: int 63 71</span></a>
<a class="sourceLine" id="cb8-10" title="10"></a>
<a class="sourceLine" id="cb8-11" title="11"><span class="co"># single file</span></a>
<a class="sourceLine" id="cb8-12" title="12"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/str">str</a></span>(<span class="kw"><a href="reference/cloc_by_file.html">cloc_by_file</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/system.file">system.file</a></span>(<span class="st">"extdata"</span>, <span class="st">"qrencoder.cpp"</span>, <span class="dt">package=</span><span class="st">"cloc"</span>)))</a>
<a class="sourceLine" id="cb8-13" title="13"><span class="co">#&gt; Classes 'tbl_df', 'tbl' and 'data.frame': 1 obs. of 6 variables:</span></a>
<a class="sourceLine" id="cb8-14" title="14"><span class="co">#&gt; $ source : chr "qrencoder.cpp"</span></a>
<a class="sourceLine" id="cb8-15" title="15"><span class="co">#&gt; $ filename : chr "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/cloc/extdata/qrencoder.cpp"</span></a>
<a class="sourceLine" id="cb8-16" title="16"><span class="co">#&gt; $ language : chr "C++"</span></a>
<a class="sourceLine" id="cb8-17" title="17"><span class="co">#&gt; $ loc : int 142</span></a>
<a class="sourceLine" id="cb8-18" title="18"><span class="co">#&gt; $ blank_lines : int 41</span></a>
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#&gt; $ comment_lines: int 63</span></a></code></pre></div>
<p>Recognized languages</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1"><span class="kw"><a href="reference/cloc_recognized_languages.html">cloc_recognized_languages</a></span>()</a>
<a class="sourceLine" id="cb9-2" title="2"><span class="co">#&gt; # A tibble: 242 x 2</span></a>
<a class="sourceLine" id="cb9-3" title="3"><span class="co">#&gt; lang extensions </span></a>
<a class="sourceLine" id="cb9-4" title="4"><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; </span></a>
<a class="sourceLine" id="cb9-5" title="5"><span class="co">#&gt; 1 ABAP abap </span></a>
<a class="sourceLine" id="cb9-6" title="6"><span class="co">#&gt; 2 ActionScript as </span></a>
<a class="sourceLine" id="cb9-7" title="7"><span class="co">#&gt; 3 Ada ada, adb, ads, pad </span></a>
<a class="sourceLine" id="cb9-8" title="8"><span class="co">#&gt; 4 ADSO/IDSM adso </span></a>
<a class="sourceLine" id="cb9-9" title="9"><span class="co">#&gt; 5 Agda agda, lagda </span></a>
<a class="sourceLine" id="cb9-10" title="10"><span class="co">#&gt; 6 AMPLE ample, dofile, startup</span></a>
<a class="sourceLine" id="cb9-11" title="11"><span class="co">#&gt; 7 Ant build.xml, build.xml </span></a>
<a class="sourceLine" id="cb9-12" title="12"><span class="co">#&gt; 8 ANTLR Grammar g, g4 </span></a>
<a class="sourceLine" id="cb9-13" title="13"><span class="co">#&gt; 9 Apex Trigger trigger </span></a>
<a class="sourceLine" id="cb9-14" title="14"><span class="co">#&gt; 10 Arduino Sketch ino, pde </span></a>
<a class="sourceLine" id="cb9-15" title="15"><span class="co">#&gt; # … with 232 more rows</span></a></code></pre></div>
<p>Strip comments and whitespace from individual source files</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/cat">cat</a></span>(</a>
<a class="sourceLine" id="cb10-2" title="2"> <span class="kw"><a href="reference/cloc_remove_comments.html">cloc_remove_comments</a></span>(<span class="st">"https://raw.githubusercontent.com/maelle/convertagd/master/README.Rmd"</span>)</a>
<a class="sourceLine" id="cb10-3" title="3">)</a>
<a class="sourceLine" id="cb10-4" title="4"><span class="co">#&gt; library("knitr")</span></a>
<a class="sourceLine" id="cb10-5" title="5"><span class="co">#&gt; library("devtools")</span></a>
<a class="sourceLine" id="cb10-6" title="6"><span class="co">#&gt; install_github("masalmon/convertagd")</span></a>
<a class="sourceLine" id="cb10-7" title="7"><span class="co">#&gt; library("convertagd")</span></a>
<a class="sourceLine" id="cb10-8" title="8"><span class="co">#&gt; file &lt;- system.file("extdata", "dummyCHAI.agd", package = "convertagd")</span></a>
<a class="sourceLine" id="cb10-9" title="9"><span class="co">#&gt; testRes &lt;- read_agd(file, tz = "GMT")</span></a>
<a class="sourceLine" id="cb10-10" title="10"><span class="co">#&gt; kable(testRes[["settings"]])</span></a>
<a class="sourceLine" id="cb10-11" title="11"><span class="co">#&gt; kable(head(testRes[["raw.data"]]))</span></a>
<a class="sourceLine" id="cb10-12" title="12"><span class="co">#&gt; path_to_directory &lt;- system.file("extdata", package = "convertagd")</span></a>
<a class="sourceLine" id="cb10-13" title="13"><span class="co">#&gt; batch_read_agd(path_to_directory, tz="GMT")</span></a></code></pre></div>
</div>
<div id="cloc-metrics" class="section level2">
<h2 class="hasAnchor">
<a href="#cloc-metrics" class="anchor"></a>cloc Metrics</h2>
<table class="table table">
<thead><tr class="header">
<th align="left">Lang</th>
<th align="right"># Files</th>
<th align="right">(%)</th>
<th align="right">LoC</th>
<th align="right">(%)</th>
<th align="right">Blank lines</th>
<th align="right">(%)</th>
<th align="right"># Lines</th>
<th align="right">(%)</th>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">R</td>
<td align="right">16</td>
<td align="right">0.94</td>
<td align="right">484</td>
<td align="right">0.95</td>
<td align="right">183</td>
<td align="right">0.83</td>
<td align="right">289</td>
<td align="right">0.8</td>
</tr>
<tr class="even">
<td align="left">Rmd</td>
<td align="right">1</td>
<td align="right">0.06</td>
<td align="right">24</td>
<td align="right">0.05</td>
<td align="right">38</td>
<td align="right">0.17</td>
<td align="right">71</td>
<td align="right">0.2</td>
</tr>
</tbody>
</table>
</div>
<div id="code-of-conduct" class="section level2">
<h2 class="hasAnchor">
<a href="#code-of-conduct" class="anchor"></a>Code of Conduct</h2>
<p>Please note that this project is released with a <a href="CONDUCT.html">Contributor Code of Conduct</a>. By participating in this project you agree to abide by its terms.</p>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div class="links">
<h2>Links</h2>
<ul class="list-unstyled">
<li>Report a bug at <br><a href="https://gitlab.com/hrbrmstr/cloc/issues">https://​gitlab.com/​hrbrmstr/​cloc/​issues</a>
</li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<ul class="list-unstyled">
<li>
<a href="https://opensource.org/licenses/mit-license.php">MIT</a> + file <a href="LICENSE-text.html">LICENSE</a>
</li>
</ul>
</div>
<div class="developers">
<h2>Developers</h2>
<ul class="list-unstyled">
<li>Bob Rudis <br><small class="roles"> Author, maintainer </small> <a href="https://orcid.org/0000-0001-5670-2640" target="orcid.widget"><img src="https://members.orcid.org/sites/default/files/vector_iD_icon.svg" class="orcid" alt="ORCID" height="16"></a> </li>
<li>Al Danial <br><small class="roles"> Author </small> <br><small>(cloc perl script)</small>
</li>
<li><a href="authors.html">All authors...</a></li>
</ul>
</div>
<div class="dev-status">
<h2>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://travis-ci.org/hrbrmstr/cloc"><img src="https://travis-ci.org/hrbrmstr/cloc.svg?branch=master" alt="Travis-CI Build Status"></a></li>
<li><a href="https://ci.appveyor.com/project/hrbrmstr/cloc"><img src="https://ci.appveyor.com/api/projects/status/github/hrbrmstr/cloc?branch=master&amp;svg=true" alt="AppVeyor Build Status"></a></li>
<li><a href="https://codecov.io/github/hrbrmstr/cloc?branch=master"><img src="https://img.shields.io/codecov/c/github/hrbrmstr/cloc/master.svg" alt="Coverage Status"></a></li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

12
docs/link.svg

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<style type="text/css">
.st0{fill:#75AADB;}
</style>
<path class="st0" d="M4,11.3h1.3v1.3H4c-2,0-4-2.3-4-4.7s2.1-4.7,4-4.7h5.3c1.9,0,4,2.3,4,4.7c0,1.9-1.2,3.6-2.7,4.3v-1.5
C11.4,10.2,12,9.1,12,8c0-1.7-1.4-3.3-2.7-3.3H4C2.7,4.7,1.3,6.3,1.3,8S2.7,11.3,4,11.3z M16,7.3h-1.3v1.3H16c1.3,0,2.7,1.6,2.7,3.3
s-1.4,3.3-2.7,3.3h-5.3C9.4,15.3,8,13.7,8,12c0-1.1,0.6-2.2,1.3-2.8V7.7C7.9,8.4,6.7,10.1,6.7,12c0,2.4,2.1,4.7,4,4.7H16
c1.9,0,4-2.3,4-4.7S18,7.3,16,7.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 810 B

166
docs/news/index.html

@ -0,0 +1,166 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changelog • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Changelog" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-news">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Changelog <small></small></h1>
</div>
<div id="cloc-030" class="section level1">
<h1 class="page-header">
<a href="#cloc-030" class="anchor"></a>cloc 0.3.0</h1>
<ul>
<li>upgraded bundled cloc.pl to 1.80</li>
</ul>
</div>
<div id="cloc-020" class="section level1">
<h1 class="page-header">
<a href="#cloc-020" class="anchor"></a>cloc 0.2.0</h1>
<ul>
<li>included a custom <code>cloc.pl</code> script (<code>cloc</code> pending PR <a href="https://github.com/AlDanial/cloc/pull/294" class="uri">https://github.com/AlDanial/cloc/pull/294</a>) that adds support for R Markdown (Rmd) files. Only the lines of code between the triple-backticks clode blocks are included. THe resultant “language” type is <code>Rmd</code> as the code blocks could be anything. The results will only be fully accurate for R/Python-ish syntax languages (i.e. the ones supporting the basic <code>cloc</code> rules for those languages) but they should be accurate enough for rough estimates for other languages used in Rmd code blocks.</li>
<li>URLs as sources work in more funtions now</li>
<li>cloc_git() can now clone repo when using <a href="git://" class="uri">git://</a> URLs</li>
<li>removed dplyr dependency</li>
<li>created an RStudio addin to enable reducing the active Rmd document to just code (in a new document)</li>
</ul>
</div>
<div id="cloc-010" class="section level1">
<h1 class="page-header">
<a href="#cloc-010" class="anchor"></a>cloc 0.1.0</h1>
<ul>
<li>added support for many cloc.pl features</li>
<li>overhaul to resurrect the package</li>
<li>upgraded to latest (1.74) cloc perl utility (<a href='https://github.com/maelle'>@maelle</a>)</li>
</ul>
</div>
<div id="cloc-0009000" class="section level1">
<h1 class="page-header">
<a href="#cloc-0009000" class="anchor"></a>cloc 0.0.0.9000</h1>
<ul>
<li>initial version</li>
</ul>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#cloc-030">0.3.0</a></li>
<li><a href="#cloc-020">0.2.0</a></li>
<li><a href="#cloc-010">0.1.0</a></li>
<li><a href="#cloc-0009000">0.0.0.9000</a></li>
</ul>
</div>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

236
docs/pkgdown.css

@ -0,0 +1,236 @@
/* Sticky footer */
/**
* Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
* Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css
*
* .Site -> body > .container
* .Site-content -> body > .container .row
* .footer -> footer
*
* Key idea seems to be to ensure that .container and __all its parents__
* have height set to 100%
*
*/
html, body {
height: 100%;
}
body > .container {
display: flex;
height: 100%;
flex-direction: column;
padding-top: 60px;
}
body > .container .row {
flex: 1 0 auto;
}
footer {
margin-top: 45px;
padding: 35px 0 36px;
border-top: 1px solid #e5e5e5;
color: #666;
display: flex;
flex-shrink: 0;
}
footer p {
margin-bottom: 0;
}
footer div {
flex: 1;
}
footer .pkgdown {
text-align: right;
}
footer p {
margin-bottom: 0;
}
img.icon {
float: right;
}
img {
max-width: 100%;
}
/* Fix bug in bootstrap (only seen in firefox) */
summary {
display: list-item;
}
/* Typographic tweaking ---------------------------------*/
.contents .page-header {
margin-top: calc(-60px + 1em);
}
/* Section anchors ---------------------------------*/
a.anchor {
margin-left: -30px;
display:inline-block;
width: 30px;
height: 30px;
visibility: hidden;
background-image: url(./link.svg);
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: center center;
}
.hasAnchor:hover a.anchor {
visibility: visible;
}
@media (max-width: 767px) {
.hasAnchor:hover a.anchor {
visibility: hidden;
}
}
/* Fixes for fixed navbar --------------------------*/
.contents h1, .contents h2, .contents h3, .contents h4 {
padding-top: 60px;
margin-top: -40px;
}
/* Static header placement on mobile devices */
@media (max-width: 767px) {
.navbar-fixed-top {
position: absolute;
}
.navbar {
padding: 0;
}
}
/* Sidebar --------------------------*/
#sidebar {
margin-top: 30px;
}
#sidebar h2 {
font-size: 1.5em;
margin-top: 1em;
}
#sidebar h2:first-child {
margin-top: 0;
}
#sidebar .list-unstyled li {
margin-bottom: 0.5em;
}
.orcid {
height: 16px;
vertical-align: middle;
}
/* Reference index & topics ----------------------------------------------- */
.ref-index th {font-weight: normal;}
.ref-index td {vertical-align: top;}
.ref-index .icon {width: 40px;}
.ref-index .alias {width: 40%;}
.ref-index-icons .alias {width: calc(40% - 40px);}
.ref-index .title {width: 60%;}
.ref-arguments th {text-align: right; padding-right: 10px;}
.ref-arguments th, .ref-arguments td {vertical-align: top;}
.ref-arguments .name {width: 20%;}
.ref-arguments .desc {width: 80%;}
/* Nice scrolling for wide elements --------------------------------------- */
table {
display: block;
overflow: auto;
}
/* Syntax highlighting ---------------------------------------------------- */
pre {
word-wrap: normal;
word-break: normal;
border: 1px solid #eee;
}
pre, code {
background-color: #f8f8f8;
color: #333;
}
pre code {
overflow: auto;
word-wrap: normal;
white-space: pre;
}
pre .img {
margin: 5px 0;
}
pre .img img {
background-color: #fff;
display: block;
height: auto;
}
code a, pre a {
color: #375f84;
}
a.sourceLine:hover {
text-decoration: none;
}
.fl {color: #1514b5;}
.fu {color: #000000;} /* function */
.ch,.st {color: #036a07;} /* string */
.kw {color: #264D66;} /* keyword */
.co {color: #888888;} /* comment */
.message { color: black; font-weight: bolder;}
.error { color: orange; font-weight: bolder;}
.warning { color: #6A0366; font-weight: bolder;}
/* Clipboard --------------------------*/
.hasCopyButton {
position: relative;
}
.btn-copy-ex {
position: absolute;
right: 0;
top: 0;
visibility: hidden;
}
.hasCopyButton:hover button.btn-copy-ex {
visibility: visible;
}
/* mark.js ----------------------------*/
mark {
background-color: rgba(255, 255, 51, 0.5);
border-bottom: 2px solid rgba(255, 153, 51, 0.3);
padding: 1px;
}
/* vertical spacing after htmlwidgets */
.html-widget {
margin-bottom: 10px;
}

115
docs/pkgdown.js

@ -0,0 +1,115 @@
/* http://gregfranko.com/blog/jquery-best-practices/ */
(function($) {
$(function() {
$("#sidebar")
.stick_in_parent({offset_top: 40})
.on('sticky_kit:bottom', function(e) {
$(this).parent().css('position', 'static');
})
.on('sticky_kit:unbottom', function(e) {
$(this).parent().css('position', 'relative');
});
$('body').scrollspy({
target: '#sidebar',
offset: 60
});
$('[data-toggle="tooltip"]').tooltip();
var cur_path = paths(location.pathname);
var links = $("#navbar ul li a");
var max_length = -1;
var pos = -1;
for (var i = 0; i < links.length; i++) {
if (links[i].getAttribute("href") === "#")
continue;
// Ignore external links
if (links[i].host !== location.host)
continue;
var nav_path = paths(links[i].pathname);
var length = prefix_length(nav_path, cur_path);
if (length > max_length) {
max_length = length;
pos = i;
}
}
// Add class to parent <li>, and enclosing <li> if in dropdown
if (pos >= 0) {
var menu_anchor = $(links[pos]);
menu_anchor.parent().addClass("active");
menu_anchor.closest("li.dropdown").addClass("active");
}
});
function paths(pathname) {
var pieces = pathname.split("/");
pieces.shift(); // always starts with /
var end = pieces[pieces.length - 1];
if (end === "index.html" || end === "")
pieces.pop();
return(pieces);
}
// Returns -1 if not found
function prefix_length(needle, haystack) {
if (needle.length > haystack.length)
return(-1);
// Special case for length-0 haystack, since for loop won't run
if (haystack.length === 0) {
return(needle.length === 0 ? 0 : -1);
}
for (var i = 0; i < haystack.length; i++) {
if (needle[i] != haystack[i])
return(i);
}
return(haystack.length);
}
/* Clipboard --------------------------*/
function changeTooltipMessage(element, msg) {
var tooltipOriginalTitle=element.getAttribute('data-original-title');
element.setAttribute('data-original-title', msg);
$(element).tooltip('show');
element.setAttribute('data-original-title', tooltipOriginalTitle);
}
if(ClipboardJS.isSupported()) {
$(document).ready(function() {
var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-label='Copy to clipboard' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy'></i></button>";
$(".examples, div.sourceCode").addClass("hasCopyButton");
// Insert copy buttons:
$(copyButton).prependTo(".hasCopyButton");
// Initialize tooltips:
$('.btn-copy-ex').tooltip({container: 'body'});
// Initialize clipboard:
var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', {
text: function(trigger) {
return trigger.parentNode.textContent;
}
});
clipboardBtnCopies.on('success', function(e) {
changeTooltipMessage(e.trigger, 'Copied!');
e.clearSelection();
});
clipboardBtnCopies.on('error', function() {
changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
});
});
}
})(window.jQuery || window.$)

5
docs/pkgdown.yml

@ -0,0 +1,5 @@
pandoc: '2.6'
pkgdown: 1.3.0
pkgdown_sha: ~
articles: []

194
docs/reference/cloc-package.html

@ -0,0 +1,194 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count Lines of Code, Comments and Whitespace in Source Files and Archives — cloc-package • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Count Lines of Code, Comments and Whitespace in Source Files and Archives — cloc-package" />
<meta property="og:description" content="Counts blank lines, comment lines, and physical lines of source code in source
files/trees/archives. An R wrapper to the Perl cloc utility
https://github.com/AlDanial/cloc by @AlDanial." />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count Lines of Code, Comments and Whitespace in Source Files and Archives</h1>
<div class="hidden name"><code>cloc-package.Rd</code></div>
</div>
<div class="ref-description">
<p>Counts blank lines, comment lines, and physical lines of source code in source
files/trees/archives. An R wrapper to the Perl <code>cloc</code> utility
<a href='https://github.com/AlDanial/cloc'>https://github.com/AlDanial/cloc</a> by @AlDanial.</p>
</div>
<h2 class="hasAnchor" id="how-it-works"><a class="anchor" href="#how-it-works"></a>How it works</h2>
<p><code>cloc</code>'s method of operation resembles <a href='https://www.dwheeler.com/sloccount/'>SLOCCount</a>'s:
First, create a list of files to consider. Next, attempt to determine whether or not
found files contain recognized computer language source code. Finally, for files
identified as source files, invoke language-specific routines to count the number of
source lines.</p>
<p>A more detailed description:</p><ol>
<li><p>If the input file is an archive (such as a <code>.tar.gz</code> or <code>.zip</code> file),
create a temporary directory and expand the archive there using a
system call to an appropriate underlying utility (<code>tar</code>, <code>bzip2</code>, <code>unzip</code>,
etc) then add this temporary directory as one of the inputs. (This
works more reliably on Unix than on Windows.)</p></li>
<li><p>Use perl's <code>File::Find</code> to recursively descend the input directories and make
a list of candidate file names. Ignore binary and zero-sized files.</p></li>
<li><p>Make sure the files in the candidate list have unique contents
(first by comparing file sizes, then, for similarly sized files,
compare MD5 hashes of the file contents with perl's <code>Digest::MD5</code>). For each
set of identical files, remove all but the first copy, as determined
by a lexical sort, of identical files from the set. The removed
files are not included in the report.</p></li>
<li><p>Scan the candidate file list for file extensions which cloc
associates with programming languages. Files which match are classified as
containing source
code for that language. Each file without an extensions is opened
and its first line read to see if it is a Unix shell script
(anything that begins with <code>#!</code>). If it is shell script, the file is
classified by that scripting language (if the language is
recognized). If the file does not have a recognized extension or is
not a recognzied scripting language, the file is ignored.</p></li>
<li><p>All remaining files in the candidate list should now be source files
for known programming languages. For each of these files:</p><ol>
<li><p>Read the entire file into memory.</p></li>
<li><p>Count the number of lines (= L <em>original</em>).</p></li>
<li><p>Remove blank lines, then count again (= L <em>non-blank</em>).</p></li>
<li><p>Loop over the comment filters defined for this language. (For
example, C++ as two filters: (1) remove lines that start with
optional whitespace followed by <code>//</code> and (2) remove text between
<code>/*</code> and <code>*/</code>) Apply each filter to the code to remove comments.
Count the left over lines (= L <em>code</em>).</p></li>
<li><p>Save the counts for this language:</p><ul>
<li><p>blank lines = L <em>original</em> - L <em>non-blank</em></p></li>
<li><p>comment lines = L <em>non-blank</em> - L <em>code</em></p></li>
<li><p>code lines = L <em>code</em></p></li>
</ul></li>
</ol></li>
</ol>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#how-it-works">How it works</a></li>
</ul>
<h2>Author</h2>
<p>Bob Rudis (bob@rud.is)</p>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

183
docs/reference/cloc.html

@ -0,0 +1,183 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count lines of code, comments and whitespace in source files/archives — cloc • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Count lines of code, comments and whitespace in source files/archives — cloc" />
<meta property="og:description" content="Count lines of code, comments and whitespace in source files/archives" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count lines of code, comments and whitespace in source files/archives</h1>
<div class="hidden name"><code>cloc.Rd</code></div>
</div>
<div class="ref-description">
<p>Count lines of code, comments and whitespace in source files/archives</p>
</div>
<pre class="usage"><span class='fu'>cloc</span>(<span class='kw'>source</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>extract_with</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>source</th>
<td><p>file, directory or archive to read from (can be a valid URL)</p></td>
</tr>
<tr>
<th>extract_with</th>
<td><p>passed into <code>cloc</code> command line. This option is only
needed if cloc is unable to figure out how to extract the contents of
the input file(s) by itself.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>tibble</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># by dir</span>
<span class='fu'>cloc</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"cloc"</span>))</div><div class='output co'>#&gt; <span style='color: #949494;'># A tibble: 2 x 10</span><span>
#&gt; source language file_count file_count_pct loc loc_pct blank_lines
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> extda… C++ 1 0.5 142 0.507 41
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> extda… R 1 0.5 138 0.493 24
#&gt; </span><span style='color: #949494;'># … with 3 more variables: blank_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span style='color: #949494;'>, comment_lines </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span style='color: #949494;'>,
#&gt; # comment_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span></div><div class='input'>
<span class='co'># by file</span>
<span class='fu'>cloc</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='st'>"qrencoder.cpp"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"cloc"</span>))</div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 1 x 10</span><span>
#&gt; source language file_count file_count_pct loc loc_pct blank_lines
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> qrenc… C++ 1 1 142 1 41
#&gt; </span><span style='color: #949494;'># … with 3 more variables: blank_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span style='color: #949494;'>, comment_lines </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span style='color: #949494;'>,
#&gt; # comment_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span></div><div class='input'>
# requires a network connection therefore is set for you to run it manually
</div></span><span class='co'># NOT RUN {</span>
<span class='co'># from a url</span>
<span class='fu'>cloc</span>(<span class='st'>"https://rud.is/dl/cloc-1.74.tar.gz"</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

185
docs/reference/cloc_by_file.html

@ -0,0 +1,185 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count lines of code, comments and whitespace in source files/archives by file — cloc_by_file • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Count lines of code, comments and whitespace in source files/archives by file — cloc_by_file" />
<meta property="og:description" content="Count lines of code, comments and whitespace in source files/archives by file" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count lines of code, comments and whitespace in source files/archives by file</h1>
<div class="hidden name"><code>cloc_by_file.Rd</code></div>
</div>
<div class="ref-description">
<p>Count lines of code, comments and whitespace in source files/archives by file</p>
</div>
<pre class="usage"><span class='fu'>cloc_by_file</span>(<span class='no'>source</span>, <span class='kw'>extract_with</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>source</th>
<td><p>file, directory or archive to read from (can be a valid URL)</p></td>
</tr>
<tr>
<th>extract_with</th>
<td><p>passed into <code>cloc</code> command line. This option is only
needed if cloc is unable to figure out how to extract the contents of
the input file(s) by itself.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>tibble</p>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>Unlike it's <code><a href='cloc.html'>cloc()</a></code> counterpart, no percentages are reported by this function</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># whole dir</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/str'>str</a></span>(<span class='fu'>cloc_by_file</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"cloc"</span>)))</div><div class='output co'>#&gt; Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 2 obs. of 6 variables:
#&gt; $ source : chr "extdata" "extdata"
#&gt; $ filename : chr "/Users/bob/packages/cloc/inst/extdata/qrencoder.cpp" "/Users/bob/packages/cloc/inst/extdata/dbi.r"
#&gt; $ language : chr "C++" "R"
#&gt; $ loc : int 142 138
#&gt; $ blank_lines : int 41 24
#&gt; $ comment_lines: int 63 71</div><div class='input'>
<span class='co'># single file</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/str'>str</a></span>(<span class='fu'>cloc_by_file</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='st'>"qrencoder.cpp"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"cloc"</span>)))</div><div class='output co'>#&gt; Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 1 obs. of 6 variables:
#&gt; $ source : chr "qrencoder.cpp"
#&gt; $ filename : chr "/Users/bob/packages/cloc/inst/extdata/qrencoder.cpp"
#&gt; $ language : chr "C++"
#&gt; $ loc : int 142
#&gt; $ blank_lines : int 41
#&gt; $ comment_lines: int 63</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#note">Note</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

1009
docs/reference/cloc_call.html

File diff suppressed because it is too large

180
docs/reference/cloc_cran.html

@ -0,0 +1,180 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count lines of code (etc) from source packages on CRAN — cloc_cran • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Count lines of code (etc) from source packages on CRAN — cloc_cran" />
<meta property="og:description" content="Count lines of code (etc) from source packages on CRAN" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count lines of code (etc) from source packages on CRAN</h1>
<div class="hidden name"><code>cloc_cran.Rd</code></div>
</div>
<div class="ref-description">
<p>Count lines of code (etc) from source packages on CRAN</p>
</div>
<pre class="usage"><span class='fu'>cloc_cran</span>(<span class='no'>pkgs</span>, <span class='kw'>repos</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/options'>getOption</a></span>(<span class='st'>"repos"</span>),
<span class='kw'>contrib_url</span> <span class='kw'>=</span> <span class='kw pkg'>utils</span><span class='kw ns'>::</span><span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/contrib.url'>contrib.url</a></span>(<span class='no'>repos</span>, <span class='st'>"source"</span>),
<span class='kw'>.progress</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/interactive'>interactive</a></span>())</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>pkgs</th>
<td><p>names of packages</p></td>
</tr>
<tr>
<th>repos</th>
<td><p>character vector, the base URL(s) of the repositories to use,
i.e., the URL of the CRAN master such as "<code>https://cran.r-project.org</code>"
or its Statlib mirror, "<code>http://lib.stat.cmu.edu/R/CRAN</code>".</p></td>
</tr>
<tr>
<th>contrib_url</th>
<td><p>URL(s) of the contrib sections of the repositories. Use
this argument only if your repository mirror is incomplete, e.g.,
because you burned only the ‘contrib’ section on a CD. Overrides
argument repos.</p></td>
</tr>
<tr>
<th>.progress</th>
<td><p>show a progress bar? Default: <code>TRUE</code> if running interactively.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>data frame (tibble)</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'># requires a network connection therefore is set for you to run it manually
</div><span class='co'># NOT RUN {</span>
<span class='fu'>cloc_cran</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"archdata"</span>, <span class='st'>"hrbrthemes"</span>, <span class='st'>"iptools"</span>, <span class='st'>"dplyr"</span>))
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

173
docs/reference/cloc_git.html

@ -0,0 +1,173 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count lines of code, comments and whitespace in a git tree — cloc_git • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Count lines of code, comments and whitespace in a git tree — cloc_git" />
<meta property="og:description" content="Count lines of code, comments and whitespace in a git tree" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count lines of code, comments and whitespace in a git tree</h1>
<div class="hidden name"><code>cloc_git.Rd</code></div>
</div>
<div class="ref-description">
<p>Count lines of code, comments and whitespace in a git tree</p>
</div>
<pre class="usage"><span class='fu'>cloc_git</span>(<span class='no'>repo</span>, <span class='kw'>commit</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>branch</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>credentials</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>progress</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>repo</th>
<td><p>path to git repo; if <code>repo</code> is a URL like <code>git://</code>, it will be fetched into
a temporary directory</p></td>
</tr>
<tr>
<th>commit</th>
<td><p>"<code>.</code>" for the current source tree or the commit identifier for a specific commit</p></td>
</tr>
<tr>
<th>branch, credentials, progress</th>
<td><p>passed on to <code><a href='https://www.rdocumentation.org/packages/git2r/topics/clone'>git2r::clone()</a></code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>data frame (tibble)</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='fu'>cloc_git</span>(<span class='st'>"~/packages/cloc"</span>, <span class='st'>"3643cd09d4b951b1b35d32dffe35985dfe7756c4"</span>)
<span class='co'># from remote git</span>
<span class='fu'>cloc_git</span>(<span class='st'>"git://github.com/hrbrmstr/cloc.git"</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

185
docs/reference/cloc_pkg.html

@ -0,0 +1,185 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Count lines of code, comments and whitespace in a package — cloc_pkg • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Count lines of code, comments and whitespace in a package — cloc_pkg" />
<meta property="og:description" content="Think of this as cloc() with saner defaults for packages. Skips common
IDE tempdirs, .git, inst, man." />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Count lines of code, comments and whitespace in a package</h1>
<div class="hidden name"><code>cloc_pkg.Rd</code></div>
</div>
<div class="ref-description">
<p>Think of this as <code><a href='cloc.html'>cloc()</a></code> with saner defaults for packages. Skips common
IDE tempdirs, <code>.git</code>, <code>inst</code>, <code>man</code>.</p>
</div>
<pre class="usage"><span class='fu'>cloc_pkg</span>(<span class='kw'>source</span> <span class='kw'>=</span> <span class='st'>"."</span>, <span class='kw'>extract_with</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>source</th>
<td><p>file, directory or archive to read from (can be a valid URL)</p></td>
</tr>
<tr>
<th>extract_with</th>
<td><p>passed into <code>cloc</code> command line. This option is only
needed if cloc is unable to figure out how to extract the contents of
the input file(s) by itself.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>data frame (tibble)</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># by dir</span>
<span class='fu'><a href='cloc.html'>cloc</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"cloc"</span>))</div><div class='output co'>#&gt; <span style='color: #949494;'># A tibble: 2 x 10</span><span>
#&gt; source language file_count file_count_pct loc loc_pct blank_lines
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> extda… C++ 1 0.5 142 0.507 41
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> extda… R 1 0.5 138 0.493 24
#&gt; </span><span style='color: #949494;'># … with 3 more variables: blank_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span style='color: #949494;'>, comment_lines </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span style='color: #949494;'>,
#&gt; # comment_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span></div><div class='input'>
<span class='co'># by file</span>
<span class='fu'><a href='cloc.html'>cloc</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='st'>"qrencoder.cpp"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"cloc"</span>))</div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 1 x 10</span><span>
#&gt; source language file_count file_count_pct loc loc_pct blank_lines
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> qrenc… C++ 1 1 142 1 41
#&gt; </span><span style='color: #949494;'># … with 3 more variables: blank_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span style='color: #949494;'>, comment_lines </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span style='color: #949494;'>,
#&gt; # comment_line_pct </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span></div><div class='input'>
# requires a network connection therefore is set for you to run it manually
</div></span><span class='co'># NOT RUN {</span>
<span class='co'># from a url</span>
<span class='fu'><a href='cloc.html'>cloc</a></span>(<span class='st'>"https://rud.is/dl/cloc-1.74.tar.gz"</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

144
docs/reference/cloc_pkg_md.html

@ -0,0 +1,144 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Run <code><a href='cloc_pkg.html'>cloc_pkg()</a></code> on active package and format it as a markdown table for knitting into reports — cloc_pkg_md • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Run <code><a href='cloc_pkg.html'>cloc_pkg()</a></code> on active package and format it as a markdown table for knitting into reports — cloc_pkg_md" />
<meta property="og:description" content="Run cloc_pkg() on active package and format it as a markdown table for knitting into reports" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Run <code><a href='cloc_pkg.html'>cloc_pkg()</a></code> on active package and format it as a markdown table for knitting into reports</h1>
<div class="hidden name"><code>cloc_pkg_md.Rd</code></div>
</div>
<div class="ref-description">
<p>Run <code><a href='cloc_pkg.html'>cloc_pkg()</a></code> on active package and format it as a markdown table for knitting into reports</p>
</div>
<pre class="usage"><span class='fu'>cloc_pkg_md</span>()</pre>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>Target application is output to Rmd files</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#note">Note</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

185
docs/reference/cloc_recognized_languages.html

@ -0,0 +1,185 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Return a data frame of <code>cloc</code> recognized languages and associated extensions — cloc_recognized_languages • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Return a data frame of <code>cloc</code> recognized languages and associated extensions — cloc_recognized_languages" />
<meta property="og:description" content="Some file extensions map to multiple languages:" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Return a data frame of <code>cloc</code> recognized languages and associated extensions</h1>
<div class="hidden name"><code>cloc_recognized_languages.Rd</code></div>
</div>
<div class="ref-description">
<p>Some file extensions map to multiple languages:</p>
</div>
<pre class="usage"><span class='fu'>cloc_recognized_languages</span>()</pre>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>tibble</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<ul>
<li><p><code>.cl</code> files could be Lisp or OpenCL</p></li>
<li><p><code>.d</code> files could be D or dtrace</p></li>
<li><p><code>.f</code> or <code>.for</code> files could be Fortran or Forth</p></li>
<li><p><code>.fs</code> files could be Forth or F#</p></li>
<li><p><code>.inc</code> files could be PHP or Pascal</p></li>
<li><p><code>.jl</code> files could be Lisp or Julia</p></li>
<li><p><code>.m</code> files could be MATLAB, Mathematica, Mercury, MUMPS, or Objective C</p></li>
<li><p><code>.pl</code> files could be Perl or Prolog</p></li>
<li><p><code>.pp</code> files could be Pascal or Puppet</p></li>
<li><p><code>.pro</code> files could be IDL, Prolog, or a Qt Project</p></li>
<li><p><code>.ts</code> files could be TypeScript or Qt Linguist</p></li>
<li><p><code>.v</code> files Coq or Verilog/SystemVerilog</p></li>
</ul>
<p><code>cloc</code> has subroutines that attempt to identify the correct language based
on the file's contents for these special cases. Language identification
accuracy is a function of how much code the file contains; .m files with
just one or two lines for example, seldom have enough information to
correctly distinguish between MATLAB, Mercury, MUMPS, or Objective C.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>cloc_recognized_languages</span>()</div><div class='output co'>#&gt; <span style='color: #949494;'># A tibble: 242 x 2</span><span>
#&gt; lang extensions
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 1</span><span> ABAP abap
#&gt; </span><span style='color: #BCBCBC;'> 2</span><span> ActionScript as
#&gt; </span><span style='color: #BCBCBC;'> 3</span><span> Ada ada, adb, ads, pad
#&gt; </span><span style='color: #BCBCBC;'> 4</span><span> ADSO/IDSM adso
#&gt; </span><span style='color: #BCBCBC;'> 5</span><span> Agda agda, lagda
#&gt; </span><span style='color: #BCBCBC;'> 6</span><span> AMPLE ample, dofile, startup
#&gt; </span><span style='color: #BCBCBC;'> 7</span><span> Ant build.xml, build.xml
#&gt; </span><span style='color: #BCBCBC;'> 8</span><span> ANTLR Grammar g, g4
#&gt; </span><span style='color: #BCBCBC;'> 9</span><span> Apex Trigger trigger
#&gt; </span><span style='color: #BCBCBC;'>10</span><span> Arduino Sketch ino, pde
#&gt; </span><span style='color: #949494;'># … with 232 more rows</span><span></div></span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#value">Value</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>

160
docs/reference/cloc_remove_comments.html

File diff suppressed because one or more lines are too long

203
docs/reference/index.html

@ -0,0 +1,203 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Function reference • cloc</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Function reference" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-index">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">cloc</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Reference</h1>
</div>
<table class="ref-index">
<colgroup>
<col class="alias" />
<col class="title" />
</colgroup>
<tbody>
<tr>
<th colspan="2">
<h2 id="section-all-functions" class="hasAnchor"><a href="#section-all-functions" class="anchor"></a>All functions</h2>
<p class="section-desc"></p>
</th>
</tr>
<tr>
<td>
<p><code><a href="cloc-package.html">cloc-package</a></code> </p>
</td>
<td><p>Count Lines of Code, Comments and Whitespace in Source Files and Archives</p></td>
</tr><tr>
<td>
<p><code><a href="cloc.html">cloc()</a></code> </p>
</td>
<td><p>Count lines of code, comments and whitespace in source files/archives</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_by_file.html">cloc_by_file()</a></code> </p>
</td>
<td><p>Count lines of code, comments and whitespace in source files/archives by file</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_call.html">cloc_call()</a></code> <code><a href="cloc_call.html">cloc_help()</a></code> <code><a href="cloc_call.html">cloc_version()</a></code> <code><a href="cloc_call.html">cloc_os()</a></code> </p>
</td>
<td><p>Call <code>cloc.pl</code> directly with granular control over options</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_cran.html">cloc_cran()</a></code> </p>
</td>
<td><p>Count lines of code (etc) from source packages on CRAN</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_git.html">cloc_git()</a></code> </p>
</td>
<td><p>Count lines of code, comments and whitespace in a git tree</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_pkg.html">cloc_pkg()</a></code> </p>
</td>
<td><p>Count lines of code, comments and whitespace in a package</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_pkg_md.html">cloc_pkg_md()</a></code> </p>
</td>
<td><p>Run <code>cloc_pkg()</code> on active package and format it as a markdown table for knitting into reports</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_recognized_languages.html">cloc_recognized_languages()</a></code> </p>
</td>
<td><p>Return a data frame of <code>cloc</code> recognized languages and associated extensions</p></td>
</tr><tr>
<td>
<p><code><a href="cloc_remove_comments.html">cloc_remove_comments()</a></code> </p>
</td>
<td><p>Strip comments and white space from a single source file</p></td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#section-all-functions">All functions</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Al Danial.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>
Loading…
Cancel
Save