CLOC was designed to count blank lines, comment lines, and physical lines of source code in many programming languages.
It is written entirely in Perl using only modules from the standard distribution of Perl v5.6 and higher (well, sort of) and so is quite portable. cloc is known to run on many flavors of Linux, AIX, Solaris, IRIX64, z/OS, and Windows. (To run the Perl source version of cloc on Windows one needs ActiveState Perl 5.6.1 or higher, or Cygwin installed.
Alternatively one can use the Windows binary of cloc generated with perl2exe to run on Windows computers that have neither Perl nor Cygwin.)
Here are some key features of "CLOC":
· Exists as a single, self-contained file that requires minimal installation effort---just download the file and run it.
· Can read language comment definitions from a file and thus potentially work with computer languages that do not yet exist.
· Allows results from multiple runs to be summed together by language and by project.
· Can count code within compressed archives (tar balls, Zip files, Java .ear files).
· Has numerous troubleshooting options.
· Handles file and directory names with spaces and other unusual characters.
· Has no dependencies outside the standard Perl distribution.
· Runs on Linux, FreeBSD, NetBSD, AIX, HP-UX, Solaris, IRIX64, and z/OS systems that have Perl 5.6 or higher. The source version runs on Windows with either ActiveState Perl or cygwin. Alternatively on Windows one can run the Windows binary which has no dependencies.
What's New in This Release: [ read full changelog ]
· Version 1.58 introduces a new version numbering scheme: odd numbers
· represent development versions while even numbers represent stable,
· released versions. There was no release 1.57 as it was the development
· version leading to this release.
· Arduino Sketch
New options and features:
· diff-timeout N
· Running diff on large files with many repeated lines may cause Algorithm::Diff::sdiff() to run for hours. This option sets the upper time limit on the duration of this operation for a single file pair. Default is 10 seconds.
· force-lang-def FILE: See the section --read-lang-def v. --force-lang-def below.
· Ignore files that end with the given Perl regular expression. For example, if given --skip-archive='(zip|tar(.(gz|Z|bz2|xz|7z))?)' the code will skip files that end with .zip, .tar, .tar.gz, tar.Z, .tar.bz2, .tar.xz, and .tar.7z (feature req. 32).
· Prevent "defined(@array) is deprecated" warnings with Perl...