From 5b9cdec1eb63ae04d32d2c3fc1bc192ab5480fd1 Mon Sep 17 00:00:00 2001 From: AlDanial Date: Sat, 19 Aug 2023 12:56:03 -0700 Subject: [PATCH] v1.98 --- README.md | 116 ++++++++++++++++++++---------------------------- Unix/NEWS | 40 +++++++++++++++++ Unix/cloc | 5 ++- Unix/cloc.1.pod | 11 ++++- cloc | 5 ++- 5 files changed, 104 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 8c8ecca8..499cc595 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ * * * cloc counts blank lines, comment lines, and physical lines of source code in many programming languages. -Latest release: v1.96 (Dec. 18, 2022) +Latest release: v1.98 (Aug. 19, 2023) @@ -64,11 +64,9 @@ Step 3: Invoke cloc to count your source files, directories, archives, or git commits. The executable name differs depending on whether you use the development source version (`cloc`), source for a -released version (`cloc-1.96.pl`) or a Windows executable -(`cloc-1.96.1.exe`). -(2023-01-10: a special -[1.96.1 release](https://github.com/AlDanial/cloc/releases/tag/v1.96.1) of cloc was made to update the Windows executable to use the -``Win32::LongPath`` module.) +released version (`cloc-1.98.pl`) or a Windows executable +(`cloc-1.98.exe`). + On this page, `cloc` is the generic term used to refer to any of these. @@ -385,38 +383,44 @@ and Digest::MD5 installed locally. []({{{1) # [Building a Windows Executable ▲](#___top "click to go to top of document") -The Windows downloads -cloc-1.94.exe, -cloc-1.92.exe, -cloc-1.90.exe and -cloc-1.88.exe were built on a 64 bit Windows 10 computer -using -[Strawberry Perl](http://strawberryperl.com/) -5.30.2 and -[PAR::Packer](http://search.cpan.org/~rschupp/PAR-Packer-1.050/lib/pp.pm) -to build the `.exe`. +#### Create your own executable +The most robust option for creating a Windows executable of +cloc is to use [ActiveState's Perl Development Kit](http://www.activestate.com/perl-dev-kit). +It includes a utility, `perlapp`, which can build stand-alone +Windows, Mac, and Linux binaries of Perl source code. -Release 1.86 was built on a 64 bit Windows 10 virtual machine -downloaded from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/; -releases 1.74 through 1.84 -were was built on a 32 bit Windows 7 virtual machine -using Strawberry Perl 5.26.1.1, while -1.70 and 1.72 were built with Strawberry Perl 5.24.0.1 -on an Amazon Web Services t2.micro instance running Microsoft Windows Server 2008 -(32 bit for 1.70 and 1.72; 64 bit for 1.74). -Release 1.66 was built on a 32 bit Windows 7 VirtualBox image. -Windows executables of cloc versions 1.60 and earlier were built with -[perl2exe](http://www.indigostar.com/perl2exe/) on a 32 bit Windows -XP computer. A small modification was made to the cloc source code -before passing it to perl2exe; lines 87 and 88 were uncommented: +[perl2exe](http://www.indigostar.com/perl2exe/) +will also do the trick. If you do have `perl2exe`, modify lines +84-87 in the cloc source code for a minor code +modification that is necessary to make a cloc Windows executable. + +Otherwise, to build a Windows executable with `pp` from +`PAR::Packer`, first install a Windows-based Perl distribution +(for example Strawberry Perl or ActivePerl) following their +instructions. Next, open a command prompt, aka a DOS window and install +the PAR::Packer module. Finally, invoke the newly installed `pp` +command with the cloc source code to create an `.exe` file:
-85  # Uncomment next two lines when building Windows executable with perl2exe
-86  # or if running on a system that already has Regexp::Common.
-87  #use Regexp::Common;
-88  #$HAVE_Rexexp_Common = 1;
+C:> cpan -i Digest::MD5
+C:> cpan -i Regexp::Common
+C:> cpan -i Algorithm::Diff
+C:> cpan -i PAR::Packer
+C:> cpan -i Win32::LongPath
+C:> pp -M Win32::LongPath -M Encode::Unicode -M Digest::MD5 -c -x -o cloc-1.98.exe cloc-1.98.pl
 
+A variation on the instructions above is if you installed the portable +version of Strawberry Perl, you will need to run `portableshell.bat` first +to properly set up your environment. + +The Windows executable in the Releases section, cloc-1.98.exe, +was built on a 64 bit Windows 10 computer using +[Strawberry Perl](http://strawberryperl.com/) +5.30.2 and +[PAR::Packer](http://search.cpan.org/~rschupp/PAR-Packer-1.050/lib/pp.pm) +to build the `.exe`. + #### Is the Windows executable safe to run? Does it have malware? Ideally, no one would need the Windows executable because they @@ -432,6 +436,9 @@ executable and also check sites such https://www.virustotal.com/ . The entries for recent versions are: +cloc-1.98.exe: +https://www.virustotal.com/gui/file/88615d193ec8c06f7ceec3cc1d661088af997798d87ddff331d9e9f9128a6782?nocache=1 + cloc-1.96.1.exe: https://www.virustotal.com/gui/file/00b1c9dbbfb920dabd374418e1b86d2c24b8cd2b8705aeb956dee910d0d75d45?nocache=1 @@ -494,37 +501,6 @@ much larger than those built with perl2exe? My theory is that perl2exe uses smarter tree pruning logic than `PAR::Packer`, but that's pure speculation. -#### Create your own executable -The most robust option for creating a Windows executable of -cloc is to use [ActiveState's Perl Development Kit](http://www.activestate.com/perl-dev-kit). -It includes a utility, `perlapp`, which can build stand-alone -Windows, Mac, and Linux binaries of Perl source code. - -[perl2exe](http://www.indigostar.com/perl2exe/) -will also do the trick. If you do have `perl2exe`, modify lines -84-87 in the cloc source code for a minor code -modification that is necessary to make a cloc Windows executable. - -Otherwise, to build a Windows executable with `pp` from -`PAR::Packer`, first install a Windows-based Perl distribution -(for example Strawberry Perl or ActivePerl) following their -instructions. Next, open a command prompt, aka a DOS window and install -the PAR::Packer module. Finally, invoke the newly installed `pp` -command with the cloc source code to create an `.exe` file: - -
-C:> cpan -i Digest::MD5
-C:> cpan -i Regexp::Common
-C:> cpan -i Algorithm::Diff
-C:> cpan -i PAR::Packer
-C:> cpan -i Win32::LongPath
-C:> pp -M Win32::LongPath -M Encode::Unicode -M Digest::MD5 -c -x -o cloc-1.96.exe cloc-1.96.pl
-
- -A variation on the instructions above is if you installed the portable -version of Strawberry Perl, you will need to run `portableshell.bat` first -to properly set up your environment. - [](1}}}) []({{{1) # [Basic Use ▲](#___top "click to go to top of document") @@ -1054,6 +1030,7 @@ ASP (asa, ashx, asp, axd) ASP.NET (asax, ascx, asmx, aspx, master, sitemap, webinfo) AspectJ (aj) Assembly (a51, asm, nasm, S, s) +Asymptote (asy) AutoHotkey (ahk, ahkl) awk (auk, awk, gawk, mawk, nawk) Bazel (BUILD) @@ -1068,7 +1045,7 @@ C (c, cats, ec, idc, pgc) C Shell (csh, tcsh) C# (cs) C# Designer (designer.cs) -C++ (C, c++, cc, CPP, cpp, cxx, h++, inl, ipp, pcc, tcc, tpp) +C++ (C, c++, c++m, cc, ccm, CPP, cpp, cppm, cxx, cxxm, h++, inl, ipp, ixx, pcc, tcc, tpp) C/C++ Header (H, h, hh, hpp, hxx) Cairo (cairo) Cake Build Script (cake) @@ -1082,9 +1059,11 @@ ClojureC (cljc) ClojureScript (cljs) CMake (cmake, cmake.in, CMakeLists.txt) COBOL (CBL, cbl, ccp, COB, cob, cobol, cpy) +CoCoA 5 (c5, cocoa5, cocoa5server, cpkg5) CoffeeScript (_coffee, cakefile, cjsx, coffee, iced) ColdFusion (cfm, cfml) ColdFusion CFScript (cfc) +Constraint Grammar (cg3, rlx) Containerfile (Containerfile) Coq (v) Crystal (cr) @@ -1149,6 +1128,7 @@ Groovy (gant, groovy, grt, gtpl, gvy, jenkinsfile) Haml (haml, haml.deface) Handlebars (handlebars, hbs) Harbour (hb) +Hare (ha) Haskell (hs, hsc, lhs) Haxe (hx, hxsl) HCL (hcl, nomad, tf, tfvars) @@ -1161,9 +1141,10 @@ IDL (dlm, idl, pro) Idris (idr) Igor Pro (ipf) Imba (imba) -INI (buildozer.spec, ini, lektorproject, prefs) +INI (buildozer.spec, editorconfig, ini, lektorproject, prefs) InstallShield (ism) IPL (ipl) +Jai (jai) Java (java) JavaScript (_js, bones, cjs, es6, jake, jakefile, js, jsb, jscad, jsfl, jsm, jss, mjs, njs, pac, sjs, ssjs, xsjs, xsjslib) JavaServer Faces (jsf) @@ -1212,6 +1193,7 @@ MXML (mxml) NAnt script (build) NASTRAN DMAP (dmap) Nemerle (n) +NetLogo (nlogo, nls) Nim (nim, nim.cfg, nimble, nimrod, nims) Nix (nix) Nunjucks (njk) @@ -1317,6 +1299,7 @@ tspeg (jspeg, tspeg) TTCN (ttcn, ttcn2, ttcn3, ttcnpp) Twig (twig) TypeScript (tsx, ts) +Typst (typ) Umka (um) Unity-Prefab (mat, prefab) Vala (vala) @@ -1330,7 +1313,6 @@ Visual Basic (BAS, bas, ctl, dsr, frm, FRX, frx, VBHTML, vbhtml, v Visual Basic .NET (VB, vb, vbproj) Visual Basic Script (VBS, vbs) Visual Fox Pro (SCA, sca) -Visual Studio Module (ixx) Visual Studio Solution (sln) Visualforce Component (component) Visualforce Page (page) diff --git a/Unix/NEWS b/Unix/NEWS index 8d9a1f7f..7afd14d7 100644 --- a/Unix/NEWS +++ b/Unix/NEWS @@ -1,3 +1,43 @@ + Release Notes for cloc version 1.98 + https://github.com/AlDanial/cloc + Aug. 19, 2023 + +New Languages and File Types: + o Asymptote + o CoCoA 5 + o Constraint Grammar + o Hare + o Jai + o Linker Script + o NetLogo + o Typst + +Updates: + o Added .editorconfig as an INI extension. + o Added .cppm, .ixx, .ccm, .cxxm, .c++m as C++ extensions. + o Improved handling of trailing slash with --match-d + o --exclude-list-file with --git now works as expected. + o --not-match-d, --not-match-f can now be repeated. + o --quiet mode is now enabled when STDOUT is not a terminal. + This makes for cleaner output when piping to other programs. + o New switch --include-content=regex to only count files whose + content matches the given regex. + o New switch --only-count-files to only count files. Counts for + blank, comment, and code lines will be zero. + +Bug fixes: + o --no-recurse on Windows + o Improved exclusion of autogenerated files on Windows. + o Improved handling of path separators with git in PowerShell. + o Resolve nondeterministic --diff output. + o --hide-rate supports all output file types + o Fixed --diff-list-file with unknown listed file. + o Fixed parsing of verbose option in the cloc configuration file. + +NOTE: The next release of cloc will be 2.00. Despite the major version + number bump, there will be no breaking changes. + +============================================================================ Release Notes for cloc version 1.96 https://github.com/AlDanial/cloc Dec. 18, 2022 diff --git a/Unix/cloc b/Unix/cloc index fe9b4485..85f6f30d 100755 --- a/Unix/cloc +++ b/Unix/cloc @@ -29,7 +29,7 @@ # . # # 1}}} -my $VERSION = "1.97"; # odd number == beta; even number == stable +my $VERSION = "1.98"; # odd number == beta; even number == stable my $URL = "github.com/AlDanial/cloc"; # 'https://' pushes header too wide require 5.10.0; # use modules {{{1 @@ -365,7 +365,8 @@ Usage: $script [options] | | . +# Copyright (C) 2018-2023 Al Danial . # Copyright (C) 2010-2017 Jari Aalto # # License @@ -323,6 +323,11 @@ See also B<--autoconf>. Count files in the given directories without recursively descending below them. +=item B<--only-count-files> + +Only count files by language. Blank, comment, and +code counts will be zero. + =item B<--original-dir> Only effective in combination with @@ -553,6 +558,7 @@ Add B<--fullpath> to compare parent directories to the regex. Do not include file path separators at the beginning or end of the regex. +This switch may be repeated. =item B<--match-f=REGEX> @@ -569,6 +575,7 @@ in the regex instead of just the basename. Count all files except those whose basenames match the Perl regex. Add B<--fullpath> to include parent directories in the regex instead of just the basename. +This switch may be repeated. =item B<--skip-archive=REGEX> @@ -851,7 +858,7 @@ sloccount(1) =head1 AUTHORS The cloc program was written by Al Danial and -is Copyright (C) 2006-2022 . +is Copyright (C) 2006-2023 . The manual page was originally written by Jari Aalto . diff --git a/cloc b/cloc index f5f09fff..7b3276cf 100755 --- a/cloc +++ b/cloc @@ -29,7 +29,7 @@ # . # # 1}}} -my $VERSION = "1.97"; # odd number == beta; even number == stable +my $VERSION = "1.98"; # odd number == beta; even number == stable my $URL = "github.com/AlDanial/cloc"; # 'https://' pushes header too wide require 5.10.0; # use modules {{{1 @@ -390,7 +390,8 @@ Usage: $script [options] | |