Comparing version 2.7.0 to 2.8.0
{ | ||
"name": "cloc", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "An npm module for distributing cloc by Al Danial https://github.com/AlDanial/cloc", | ||
@@ -5,0 +5,0 @@ "main": "lib/cloc", |
208
README.md
@@ -53,7 +53,8 @@ # cloc | ||
``` | ||
Usage: cloc [options] <file(s)/dir(s)> | <set 1> <set 2> | <report files> | ||
Usage: cloc [options] <file(s)/dir(s)/git hash(es)> | <set 1> <set 2> | <report files> | ||
Count, or compute differences of, physical lines of source code in the | ||
given files (may be archives such as compressed tarballs or zip files) | ||
and/or recursively below the given directories. | ||
given files (may be archives such as compressed tarballs or zip files, | ||
or git commit hashes or branch names) and/or recursively below the | ||
given directories. | ||
@@ -81,4 +82,11 @@ Input Options | ||
relative path names will be resolved starting from | ||
the directory where cloc is invoked. | ||
the directory where cloc is invoked. Set <file> | ||
to - to read file names from a STDIN pipe. | ||
See also --exclude-list-file. | ||
--diff-list-file=<file> Take the pairs of file names to be diff'ed from | ||
<file>, whose format matches the output of | ||
--diff-alignment. (Run with that option to | ||
see a sample.) The language identifier at the | ||
end of each line is ignored. This enables --diff | ||
mode and bypasses file pair alignment logic. | ||
--vcs=<VCS> Invoke a system call to <VCS> to obtain a list of | ||
@@ -88,8 +96,9 @@ files to work on. If <VCS> is 'git', then will | ||
'git submodule status' to get a list of submodules | ||
whose contents will be ignored. If <VCS> is 'svn' | ||
then will invoke 'svn list -R'. The primary benefit | ||
is that cloc will then skip files explicitly | ||
excluded by the versioning tool in question, | ||
ie, those in .gitignore or have the svn:ignore | ||
property. | ||
whose contents will be ignored. See also --git | ||
which accepts git commit hashes and branch names. | ||
If <VCS> is 'svn' then will invoke 'svn list -R'. | ||
The primary benefit is that cloc will then skip | ||
files explicitly excluded by the versioning tool | ||
in question, ie, those in .gitignore or have the | ||
svn:ignore property. | ||
Alternatively <VCS> may be any system command | ||
@@ -104,2 +113,6 @@ that generates a list of files. | ||
the files themselves must be local. | ||
Setting <VCS> to 'auto' selects between 'git' | ||
and 'svn' (or neither) depending on the presence | ||
of a .git or .svn subdirectory below the directory | ||
where cloc is invoked. | ||
--unicode Check binary files to see if they contain Unicode | ||
@@ -111,6 +124,13 @@ expanded ASCII text. This causes performance to | ||
--autoconf Count .in files (as processed by GNU autoconf) of | ||
recognized languages. | ||
recognized languages. See also --no-autogen. | ||
--by-file Report results for every source file encountered. | ||
--by-file-by-lang Report results for every source file encountered | ||
in addition to reporting by language. | ||
--config <file> Read command line switches from <file> instead of | ||
the default location of /Users/kentcdodds/.config/cloc/options.txt. | ||
The file should contain one switch, along with | ||
arguments (if any), per line. Blank lines and lines | ||
beginning with '#' are skipped. Options given on | ||
the command line take priority over entries read from | ||
the file. | ||
--count-and-diff <set1> <set2> | ||
@@ -120,17 +140,30 @@ First perform direct code counts of source file(s) | ||
of these. Inputs may be pairs of files, directories, | ||
or archives. See also --diff, --diff-alignment, | ||
--diff-timeout, --ignore-case, --ignore-whitespace. | ||
or archives. If --out or --report-file is given, | ||
three output files will be created, one for each | ||
of the two counts and one for the diff. See also | ||
--diff, --diff-alignment, --diff-timeout, | ||
--ignore-case, --ignore-whitespace. | ||
--diff <set1> <set2> Compute differences in code and comments between | ||
source file(s) of <set1> and <set2>. The inputs | ||
may be pairs of files, directories, or archives. | ||
Use --diff-alignment to generate a list showing | ||
which file pairs where compared. See also | ||
--count-and-diff, --diff-alignment, --diff-timeout, | ||
--ignore-case, --ignore-whitespace. | ||
may be any mix of files, directories, archives, | ||
or git commit hashes. Use --diff-alignment to | ||
generate a list showing which file pairs where | ||
compared. When comparing git branches, only files | ||
which have changed in either commit are compared. | ||
See also --git, --count-and-diff, --diff-alignment, | ||
--diff-list-file, --diff-timeout, --ignore-case, | ||
--ignore-whitespace. | ||
--diff-timeout <N> Ignore files which take more than <N> seconds | ||
to process. Default is 10 seconds. | ||
(Large files with many repeated lines can cause | ||
Algorithm::Diff::sdiff() to take hours.) | ||
to process. Default is 10 seconds. Setting <N> | ||
to 0 allows unlimited time. (Large files with many | ||
repeated lines can cause Algorithm::Diff::sdiff() | ||
to take hours.) See also --timeout. | ||
--docstring-as-code cloc considers docstrings to be comments, but this is | ||
not always correct as docstrings represent regular | ||
strings when they appear on the right hand side of an | ||
assignment or as function arguments. This switch | ||
forces docstrings to be counted as code. | ||
--follow-links [Unix only] Follow symbolic links to directories | ||
(sym links to files are always followed). | ||
See also --stat. | ||
--force-lang=<lang>[,<ext>] | ||
@@ -153,3 +186,3 @@ Process all files that have a <ext> extension | ||
file extension (for example: | ||
MATLAB/Mathematica/Objective C/MUMPS/Mercury; | ||
MATLAB/Mathematica/Objective-C/MUMPS/Mercury; | ||
Pascal/PHP; Lisp/OpenCL; Lisp/Julia; Perl/Prolog) | ||
@@ -160,8 +193,33 @@ will be ignored as these require additional | ||
new language filters without replacing built-in | ||
filters (see also --write-lang-def). | ||
filters (see also --write-lang-def, | ||
--write-lang-def-incl-dup). | ||
--git Forces the inputs to be interpreted as git targets | ||
(commit hashes, branch names, et cetera) if these | ||
are not first identified as file or directory | ||
names. This option overrides the --vcs=git logic | ||
if this is given; in other words, --git gets its | ||
list of files to work on directly from git using | ||
the hash or branch name rather than from | ||
'git ls-files'. This option can be used with | ||
--diff to perform line count diffs between git | ||
commits, or between a git commit and a file, | ||
directory, or archive. Use -v/--verbose to see | ||
the git system commands cloc issues. | ||
--git-diff-rel Same as --git --diff, or just --diff if the inputs | ||
are recognized as git targets. Only files which | ||
have changed in either commit are compared. | ||
--git-diff-all Git diff strategy #2: compare all files in the | ||
repository between the two commits. | ||
--ignore-whitespace Ignore horizontal white space when comparing files | ||
with --diff. See also --ignore-case. | ||
--ignore-case Ignore changes in case; consider upper- and lower- | ||
case letters equivalent when comparing files with | ||
--diff. See also --ignore-whitespace. | ||
--ignore-case Ignore changes in case within file contents; | ||
consider upper- and lowercase letters equivalent | ||
when comparing files with --diff. See also | ||
--ignore-whitespace. | ||
--ignore-case-ext Ignore case of file name extensions. This will | ||
cause problems counting some languages | ||
(specifically, .c and .C are associated with C and | ||
C++; this switch would count .C files as C rather | ||
than C++ on *nix operating systems). File name | ||
case insensitivity is always true on Windows. | ||
--lang-no-ext=<lang> Count files without extensions using the <lang> | ||
@@ -181,2 +239,6 @@ counter. This option overrides internal logic | ||
explicitly passed as command line arguments. | ||
--no-autogen[=list] Ignore files generated by code-production systems | ||
such as GNU autoconf. To see a list of these files | ||
(then exit), run with --no-autogen list | ||
See also --autoconf. | ||
--original-dir [Only effective in combination with | ||
@@ -194,3 +256,4 @@ --strip-comments] Write the stripped files | ||
Use --force-lang-def to over-ride cloc's | ||
definitions (see also --write-lang-def ). | ||
definitions (see also --write-lang-def, | ||
--write-lang-def-incl-dup). | ||
--script-lang=<lang>,<s> Process all files that invoke <s> as a #! | ||
@@ -215,2 +278,10 @@ scripting language with the counter for language | ||
(if such duplicates exist). | ||
--stat Some file systems (AFS, CD-ROM, FAT, HPFS, SMB) | ||
do not have directory 'nlink' counts that match | ||
the number of its subdirectories. Consequently | ||
cloc may undercount or completely skip the | ||
contents of such file systems. This switch forces | ||
File::Find to stat directories to obtain the | ||
correct count. File search spead will decrease. | ||
See also --follow-links. | ||
--stdin-name=<file> Give a file name to use to determine the language | ||
@@ -221,10 +292,34 @@ for standard input. (Use - as the input name to | ||
directory a version of the file which has blank | ||
lines and comments removed. The name of each | ||
stripped file is the original file name with | ||
.<ext> appended to it. It is written to the | ||
current directory unless --original-dir is on. | ||
and commented lines removed (in-line comments | ||
persist). The name of each stripped file is the | ||
original file name with .<ext> appended to it. | ||
It is written to the current directory unless | ||
--original-dir is on. | ||
--strip-str-comments Replace comment markers embedded in strings with | ||
'xx'. This attempts to work around a limitation | ||
in Regexp::Common::Comment where comment markers | ||
embedded in strings are seen as actual comment | ||
markers and not strings, often resulting in a | ||
'Complex regular subexpression recursion limit' | ||
warning and incorrect counts. There are two | ||
disadvantages to using this switch: 1/code count | ||
performance drops, and 2/code generated with | ||
--strip-comments will contain different strings | ||
where ever embedded comments are found. | ||
--sum-reports Input arguments are report files previously | ||
created with the --report-file option. Makes | ||
a cumulative set of results containing the | ||
created with the --report-file option in plain | ||
format (eg. not JSON, YAML, XML, or SQL). | ||
Makes a cumulative set of results containing the | ||
sum of data from the individual report files. | ||
--timeout <N> Ignore files which take more than <N> seconds | ||
to process at any of the language's filter stages. | ||
The default maximum number of seconds spent on a | ||
filter stage is the number of lines in the file | ||
divided by one thousand. Setting <N> to 0 allows | ||
unlimited time. See also --diff-timeout. | ||
--processes=NUM [Available only on systems with a recent version | ||
of the Parallel::ForkManager module. Not | ||
available on Windows.] Sets the maximum number of | ||
cores that cloc uses. The default value of 0 | ||
disables multiprocessing. | ||
--unix Override the operating system autodetection | ||
@@ -247,2 +342,4 @@ logic and run in UNIX mode. See also | ||
Filter Options | ||
--exclude-content=<regex> Exclude files containing text that matches the given | ||
regular expression. | ||
--exclude-dir=<D1>[,D2,] Exclude the given comma separated directories | ||
@@ -253,4 +350,4 @@ D1, D2, D3, et cetera, from being scanned. For | ||
or /test/ as their parent directory. | ||
Directories named .bzr, .cvs, .hg, .git, and | ||
.svn are always excluded. | ||
Directories named .bzr, .cvs, .hg, .git, .svn, | ||
and .snapshot are always excluded. | ||
This option only works with individual directory | ||
@@ -263,3 +360,4 @@ names so including file path separators is not | ||
extensions. | ||
--exclude-lang=<L1>[,L2,] Exclude the given comma separated languages | ||
--exclude-lang=<L1>[,L2[...]] | ||
Exclude the given comma separated languages | ||
L1, L2, L3, et cetera, from being counted. | ||
@@ -280,4 +378,10 @@ --exclude-list-file=<file> Ignore files and/or directories whose names | ||
path and therefore is unaffected by --fullpath. | ||
--include-lang=<L1>[,L2,] Count only the given comma separated languages | ||
L1, L2, L3, et cetera. | ||
--include-ext=<ext1>[,ext2[...]] | ||
Count only languages having the given comma | ||
separated file extensions. Use --show-ext to | ||
see the recognized extensions. | ||
--include-lang=<L1>[,L2[...]] | ||
Count only the given comma separated languages | ||
L1, L2, L3, et cetera. Use --show-lang to see | ||
the list of recognized languages. | ||
--match-d=<regex> Only count files in directories matching the Perl | ||
@@ -289,3 +393,4 @@ regex. For example | ||
--match-f, and --not-match-f, --match-d always | ||
compares the fully qualified path against the regex. | ||
compares the fully qualified path against the | ||
regex. | ||
--not-match-d=<regex> Count all files except those in directories | ||
@@ -298,4 +403,4 @@ matching the Perl regex. Only the trailing | ||
the regex. | ||
Do not include file path separators at the beginning | ||
or end of the regex. | ||
Do not include file path separators at the | ||
beginning or end of the regex. | ||
--match-f=<regex> Only count files whose basenames match the Perl | ||
@@ -348,4 +453,10 @@ regex. For example | ||
then exits. Useful as a first step to creating | ||
custom language definitions (see also | ||
--force-lang-def, --read-lang-def). | ||
custom language definitions. Note: languages which | ||
map to the same file extension will be excluded. | ||
(See also --force-lang-def, --read-lang-def). | ||
--write-lang-def-incl-dup=<file> | ||
Same as --write-lang-def, but includes duplicated | ||
extensions. This generates a problematic language | ||
definition file because cloc will refuse to use | ||
it until duplicates are removed. | ||
@@ -371,2 +482,9 @@ Output Options | ||
separated files instead of ,. This switch forces | ||
--file-encoding=<E> Write output files using the <E> encoding instead of | ||
the default ASCII (<E> = 'UTF-7'). Examples: 'UTF-16', | ||
'euc-kr', 'iso-8859-16'. Known encodings can be | ||
printed with | ||
perl -MEncode -e 'print join("\n", Encode->encodings(":all")), "\n"' | ||
--hide-rate Do not show line and file processing rates in the | ||
output header. This makes output deterministic. | ||
--json Write the results as JavaScript Object Notation | ||
@@ -392,4 +510,4 @@ (JSON) formatted output. | ||
--sql-style=<style> Write SQL statements in the given style instead | ||
of the default SQLite format. Currently, the | ||
only style option is Oracle. | ||
of the default SQLite format. Styles include | ||
'Oracle' and 'Named_Columns'. | ||
--sum-one For plain text reports, show the SUM: output line | ||
@@ -396,0 +514,0 @@ even if only one input file is processed. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
520
881460