Cloc Changelog

What's new in Cloc 1.62

Dec 16, 2014
  • New Languages:
  • CUDA
  • ECPP
  • Grails
  • Haml
  • Handlebars
  • Harbour
  • HLSL
  • JSON
  • Kotlin
  • Mustache
  • PL/I
  • Puppet manifest
  • Racket
  • Rake
  • RobotFramework
  • Swift
  • TypeScript
  • Unity-Prefab
  • Velocity Template Language
  • Windows Message
  • Windows Module Definition
  • Windows Resource
  • WiX include
  • WiX source
  • WiX string localization
  • xBase
  • xBase Header
  • XQuery
  • Updates:
  • JSP Added extension .jspf
  • MSBuild script Added extensions .vcproj, .wixproj, .vbproj
  • DOS Batch Added extensions .cmd, .btm
  • C++ Added extension .c++
  • Pascal Lines that begin with {! are counted as code as some compilers treat these as a compiler directives.
  • Lisp Treat text between #| and |# as a block comment.
  • Suppress progress rate display if --quiet is set.
  • --exclude-dir directories are pruned before the file search descends into those directories instead of just ignoring files there
  • The logic that aligns file pairs between --diff sets was rewritten. Corner cases such as diff between one file and a set of files are handled much more precisely.
  • New options and features:
  • --explain=LANG Print the filters used to remove comments for language LANG and exit. In some cases the filters refer to Perl subroutines rather than regular expressions. An examination of the source code may be needed for further explanation.
  • Added new filter macros:
  • remove_between_general, which accepts start and end comment marker.
  • remove_between_regex, which accepts start and end comment regexes.
  • Properly handle text files that begin with Unicode Byte Order Marks.
  • Bug Fixes:
  • Remove spurious newlines produced by bad comment removal regexes
  • which could cause incorrect diff's.
  • Correctly handle file extensions with non-alphanumeric characters.
  • Show file count with --sum-reports.
  • Properly encode characters &,,",' in XML output.
  • Properly read and write entries for the 'remove_between_general'
  • macro in language definition text files.

New in Cloc 1.60 (Feb 4, 2014)

  • This version adds support for LESS, Razor, JavaServer Faces, SASS, Apex Trigger, Visualforce Component, Visualforce Page, Verilog-SystemVerilog, and Pig Latin.
  • Language filters for MXML, CMake, Groovy, and Vala were improved.
  • An undefined array reference error was corrected.

New in Cloc 1.54 (Oct 3, 2011)

  • Release Notes for cloc version 1.54 http://cloc.sourceforge.net October 1, 2011
  • New Languages:
  • CMake
  • Cython
  • Objective C++
  • Ocaml
  • Smarty
  • New options and features:
  • --autoconf
  • Count files of recognized languages that end with ".in" (for example, code.h.in, Makefile.in) as used by GNU automake/autoconf.
  • --match-d, --not-match-d
  • Include, or skip over, directories whose names match provided regular expressions.
  • --follow-links
  • Follow symbolic links (on Unix-like OS's).
  • YAML and XML output: header lines now include the cloc URL,
  • version, # lines and files counted, etc.
  • YAML and XML output: if writing to a file (rather than STDOUT),
  • save the file name as an element inside the file.
  • Include support for languages with double extensions. First
  • implementation of these uses .spc.sql for SQL Stored Procedures
  • and .data.sql as SQL Data as distinct from just SQL.
  • Handle archive files (tar files, zip files, etc) with spaces
  • in their names.
  • Bug Fixes:
  • Lisp: Include .lisp as a valid file extension.
  • Correctly identify operating system as Windows if MKS Toolkit is
  • installed.
  • Fix incorrectly handled .inc files (could be PHP or Pascal).
  • --counted
  • Correct output to show only files which were actually used to produce the code count. Also show the output by language rather than by filename.
  • --diff
  • Fixed null output when one input has a single file while the comparison input has multiple files.
  • Fixed null output when no lines of code are modified in common files (only entire files were added or removed).
  • Handle cases where one of the two inputs is an empty file or directory.
  • --diff + --exclude-file-list
  • --diff now skips files defined by --exclude-file-list
  • --diff + --exclude-lang
  • --diff now skips languages defined by --exclude-lang
  • --diff + --xml
  • Include user-provided xsl file name in XML --diff output.
  • XML output for --by-file and --by-file-by-lang.
  • --diff + --csv
  • Added comma separated value output for --diff.
  • --diff + --sum-reports
  • Can now use the --sum-reports option with --diff.
  • --exclude-dir
  • Quote metacharacters when comparing directory names against
  • --exclude-dir value.
  • --strip-comments
  • Do not remove blank lines if they follow lines with (language-dependent) continuation markers.
  • --sum-reports + --list-file
  • Allow the --sum-reports option to take its inputs from files defined by --list-file
  • Outstanding issues:
  • --sql output formats remain unimplemented for --diff.

New in Cloc 1.53 (Dec 3, 2010)

  • This version adds support for Go and MXML, improves XML/XSLT output, and includes bug fixes for the --diff option.

New in Cloc 1.52 (Sep 13, 2010)

  • This release adds support for Groovy, Scala, and XAML, improves the counters for Fortran and COBOL, and adds new options for ignoring whitespace when computing diffs and excluding files with given extensions. Several minor bugs in the diff option were also fixed.

New in Cloc 1.07 (Jan 14, 2009)

  • This release adds support for the VHDL language and improves the filter that distinguishes between MATLAB, MUMPS, and Objective C files.
  • Additionally, the tool now processes archive files directly on Unix-like operating systems.
  • One can issue, for example, "cloc perl-5.10.0.tar.gz" to count code within this compressed tar file.

New in Cloc 1.05 (Oct 2, 2008)

  • New languages: ActionScript, D.
  • New options: --skip-uniqueness, --original-dir, --match-f, --not-match-f Python triple quoted strings now treated as comments.
  • JSP is now also processed with C/C++ filters.
  • Exit (instead of warn and continue) if incorrect options are given.
  • Fixed a bug in the duplicate file identifying code.
  • Previous versions counted duplicate files twice.
  • Fix output column alignment when working with long file names or languages.