cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.
Note: There are no breaking changes between the 1.xx versions and this 2.00 release.
New Languages and File Types:
Updates:
--fmt
switch. Includes the often- requested addition of language name with --by-file
counts.--diff
.--exclude-list-file
.--no-autogen
.--list-file
with --git-diff-*
.--exclude-file-list
with --git --diff
.--strip-code
, which attempts to only leave comments in the output file.Bug fixes:
--match-d
and --not-match-d
.New Languages: Asymptote, CoCoA 5, Constraint Grammar, Hare, Jai, Linker Script, NetLogo, Typst
Updates:
--match-d
--exclude-list-file
with --git
now works as expected.--not-match-d
, --not-match-f
can now be repeated.--quiet
mode is now enabled when STDOUT is not a terminal. This makes for cleaner output when piping to other programs.--include-content=regex
to only count files whose content matches the given regex.--only-count-files
to only count files. Counts for blank, comment, and code lines will be zero.Bug fixes:
--no-recurse
now works on Windows--diff
output.--hide-rate
supports all output file types--diff-list-file
with unknown listed file.NOTE: The next release of cloc will be 2.00. Despite the major version number bump, there will be no breaking changes.
This release merely updates the Windows executable of cloc 1.96 to use the Win32::LongPath
module per issue #704. The cloc source code itself is unchanged from 1.96. Here's the VirusTotal entry for this updated v1.96.1 executable.
If you use the source version of cloc, or if Win32::LongPath
isn't important to you, use the regular 1.96 release bundle.
Update 2023-01-10 for Windows users: minor release 1.96.1 has an updated executable that works better for Windows file paths longer than 255 characters.
New Languages: Cairo, Carbon, Circom, Containerfile, HolyC, kvlang, Nunjucks, OpenSCAD, P4, Pest, Pony, TEAL, WGSL
Updates: New switch --diff-list-files
to run diff given two list files; handle comments embedded in OCaml strings; write empty JSON and XML structures if the inputs yield zero counts; support for long paths on Windows; better support for building and running Docker image on Windows; better output file names when running with --count-and-diff
and --out
; resolve internal file handle conflict when running --diff
with --sdir
or --categorized
.
Added support for languages Derw, Finite State Language, Flatbuffers, Futhark, Godot Shaders, HTML EEx, Lem, PEG, peg.js, peggy, tspeg, Text (.txt and .text), Visual Studio Module, X++.
Updates include making arguments to --include-lang
case insensitive; adding git metadata (origin, branch, commit hash) in XML output when running with --git
and --xml
. Future releases will include the git metadata additions in YAML, JSON, SQL, and Markdown output as well. The new switch --no-recurse
prevents recursive directory traversal.
New languages GraphQL, Metal Shading Language, PlantUML, Properties, Umka. Better consistency with upper- and lowercase file names on Windows. Bug fixes for --force-lang-def, --csv-delimiter, --vcs=git with --max-file-size, --unicode, --ignored (directory names no longer appear).
New languages BizTalk Orchestration, BizTalk Pipeline, Cake Build Script, C# Designer, CSV, Delphi Form, Gleam, Godot Resource, Godot Scene, Juniper Junos, ReScript, Ring, Visual Studio Solution, Web Services Description, Zig. Track upper/lowercase file names on Windows to permit consistent diffs, support macOS in Makefule, improve logic to identify Dockerfiles, update to Regexp::Common 2017060201, Minimum Perl version raised to 5.10.0.
Add missing Raku_or_Prolog() subroutine; new languages and file types LLVM IR, Logos, Meson, Mojo, Odin, Jinja Templates, WXML, WXSS; support MATLAB block comments; minor bug fixes.
New languages: ASP.NET Core Blazor WASM, Bazel, dhall, Squirrel, SugarSS, Svelte, TNSDL. Perl 6 is renamed to Raku. Two algorithms are implemented for --git --diff
: the new switch --git-diff-rel
only computes differences for files which have deltas while --git-diff-all
performs the complete diff for all files in the repo at the two states. Several bugs related to language inclusion or exclusion along with --diff
were fixed.
Added support for APL, Apache Thrift, Imba, IPL, SaltStack. Improved accuracy of --git --diff
. New options --stat
, --exclude-content
, --timeout
; miscellaneous bug fixes.