CLOC Changelog

What's new in CLOC 1.58

Mar 15, 2013
  • 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.
  • New Languages:
  • Ant
  • Arduino Sketch
  • InstallShield
  • Maven
  • PowerShell
  • Rust
  • Vala
  • 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.
  • skip-archive REGEX:
  • 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 5.16.1.
  • Show an example of alternation in the documentation for the --match-d
  • switch.
  • read-lang-def v. --force-lang-def:
  • The --read-lang-def option allows one to replace cloc's language processing filters with custom settings. The problem with this option is that it overwrites internal logic that handles languages which map to the same file extension. Currently these are:
  • MATLAB/Objective C/MUMPS -> .m
  • Pascal/PHP -> .inc
  • Lisp/OpenCL -> .cl
  • The logic needed to handle these extension collisions is not easily expressed in an input text file. In any event, in most instances one merely wishes to augment cloc's language definitions with entries for new languages rather than replace definitions for known languages.
  • For this reason, the behavior of --read-lang-def has been changed to merge new language definitions found in the given file with cloc's existing languages. Where there are conflicts, cloc's built-in definitions take precedence. This new behavior allows one to add new language definitions without sacrificing cloc's ability to count files languages ending with .m, .inc, or .cl.
  • The new option --force-lang-def behaves exactly like --read-lang-def did in cloc versions 1.56 and earlier--it completely ignores cloc's internal language definitions and repaces them with definitions in the given file. However, one will no longer be able to count files with the extensions .m, .inc, or .cl.

New in CLOC 1.56 (Jul 30, 2012)

  • Version 1.56 introduces an additional documentation file, cloc.1.pod, which
  • can be used to produce cloc's documentation in the style of a Unix man page
  • plain text, HTML, or LaTeX
  • New Languages:
  • Clojure
  • ClojureScript
  • AutoHotkey
  • QML
  • CFScript
  • OpenCL
  • New options and features:
  • Override the operating system autodetection logic and run in
  • Microsoft Windows mode
  • Print the name of the of the operating system mode and exit
  • csv-delimiter
  • Use the provided delimiter instead of a comma when generating csv output
  • Updated yacc counter to recognize C99 comments
  • Improved detection and reporting of ignored zero sized files
  • Removed spurious from YAML output
  • Fixed handling of multi-line Ruby comments surrounded by =begin/=end
  • Associated .ctl and .dsr extensions with Visual Basic
  • Bug Fixes
  • Produce correct diff res:ults when comparing empty files with populated files
  • Remove temporary directory names from --by-file output when working with archive files
  • Honor user's requested scratch directory if given --sdir

New in CLOC 1.55 (Oct 14, 2011)

  • A bugfix release to correct malformed XML output that was introduced in the 1.54 release.
  • Two minor enhancements were added:
  • New Languages:
  • Dart
  • New options and features:
  • --sum-one
  • Force printing of the SUM: line even if only one source file is counted.

New in CLOC 1.53 (Dec 3, 2010)

  • New Languages:
  • MXML
  • New options:
  • lang-no-ext
  • Alternate method to count files without file extension.
  • ignore-case
  • Works with --diff; treat uppercase and lowercase text
  • as equivalent.
  • Bug Fixes:
  • Pascal Add // as a comment marker.
  • IDL Include .pro as a recognized file extension.3
  • Correct XSLT syle when running with --3. diff
  • Implemented YAML output option.
  • Implemented XML output option. Includes an optional default XSLT style file.
  • Include code/comment/blank counts of added files to total added material and include code/comment/blank counts of removed files to total removed material.
  • Ignore unrecognized languages.
  • exclude-ext
  • Was inadvertently disabled in v1.52; works now.
  • Outstanding issues:
  • csv, --sql output formats remain unimplemented for --diff.

New in CLOC 1.52 (Sep 11, 2010)

  • New Languages:
  • Groovy
  • Scala
  • XAML
  • New options:
  • exclude-ext
  • Ignore files with the given file extension.
  • ignore-whitespace
  • Works with --diff; ignore whitespace in code and comments when computing differences.
  • Bug Fixes:
  • Fortran: Treat line starting with an exclamation mark as a comment.
  • Cobol: Treat page eject directive and any line with characters in columns 1-6 as a blank line.
  • diff:
  • Fix negative value of removed blank lines.
  • Better output column alignment when running with --by-file.
  • Bug fixes when dealing with fully qualified Windows paths.
  • exclude-list-file
  • Can now also include directories to ignore in the supplied input file.
  • Other Improvements:
  • Better logic to select the file whose name identifies it as containing source code when the file is one of several having identical contents (for example, if main.c and main.c.bak have identical contents, choose main.c for counting instead of main.c.bak, which would be rejected because the filename does not match any recognized language).
  • Contents of .hg/ (Mercurial) directories are ignored.
  • On Windows: Ignore case in file name extensions.

New in CLOC 1.51 (May 12, 2010)

  • This is a bugfix release for the Windows platform only. It contains a fix for a problem with output filename handling. Without this fix, output files requested with the switches --report-file, --out, --categorized, and --ignored might not be created if the parent directory or file name have spaces or are located in different directories.

New in CLOC 1.50 (Apr 30, 2010)

  • New options, --sql, --sql-project, --sql-append to produce output in the form of SQL table create and insert statements
  • Display code counts when producing YAML output with --by-file
  • Added support for counting Ruby HTML, Kermit
  • New option, --skip-win-hidden, to skip MS/Windows hidden files
  • New option, --read-binary-files, to force reading files Perl's -b operator thinks are binary (could be text with unicode comments)
  • Improve the MUMPS/MATLAB/Objective C filter
  • Fixed bugs 2787984 (--report-file doesn't handle shell expansions) and 2783289 (--sum-reports produces empty results)
  • Fix a variable reference that triggers an error with Perl 5.10

New in CLOC 1.09 (Mar 16, 2010)

  • New options, --sql, --sql-project, --sql-append to produce output in the form of SQL table create and insert statements
  • Display code counts when producing YAML output with --by-file
  • Added support for counting Ruby HTML, Kermit
  • New option, --skip-win-hidden, to skip MS/Windows hidden files
  • New option, --read-binary-files, to force reading files Perl's -b operator thinks are binary (could be text with unicode comments)
  • Improve the MUMPS/MATLAB/Objective C filter
  • Fixed bugs 2787984 (--report-file doesn't handle shell expansions) and 2783289 (--sum-reports produces empty results)
  • Fix a variable reference that triggers an error with Perl 5.10

New in CLOC 1.07 (Jan 14, 2009)

  • Add support for VHDL language.
  • Count source code within archive files such as .tar.gz, .zip, without supplying extra options.
  • Improve filter that distinguishes between MATLAB, MUMPS, and Objective C.