cloc_by_file: Count lines of code, comments and whitespace in source...

View source: R/cloc-by-file.r

cloc_by_fileR Documentation

Count lines of code, comments and whitespace in source files/archives by file

Description

Count lines of code, comments and whitespace in source files/archives by file

Usage

cloc_by_file(source, extract_with = NULL)

Arguments

source

file, directory or archive to read from (can be a valid URL)

extract_with

passed into cloc 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.

Value

tibble

Note

Unlike it's cloc() counterpart, no percentages are reported by this function

Examples

# whole dir
str(cloc_by_file(system.file("extdata", package="cloc")))

# single file
str(cloc_by_file(system.file("extdata", "qrencoder.cpp", package="cloc")))

hrbrmstr/cloc documentation built on May 1, 2023, 7:34 a.m.