The attached 'garter_init.d' rc.d script is:
- incorrectly detected as language 'D'
- has a negative comment count (-1)
The issue was tested on the following versions of cloc:
- v1.60
- v1.62
On OpenBSD i386 current snapshots from march 19th using:
$ perl --version
This is perl 5, version 20, subversion 1 (v5.20.1) built for i386-openbsd
Copyright 1987-2014, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ cloc garter_init.d 1 text file. 1 unique file. 0 files ignored. http://cloc.sourceforge.net v 1.60 T=0.14 s (7.2 files/s, 460.8 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- D 1 11 -1 54 -------------------------------------------------------------------------------
Anonymous
Thanks for the bug report. While implementing the fix I learned .d could also refer to dtrace scripts so I added support for that too. Fix went in with svn commit 441; svn head is at
https://sourceforge.net/p/cloc/code/HEAD/tree/trunk/cloc
would be grateful if you'd test it out a bit.
Tested on revision 444:
Looks OK to me. No apparent issues while running on local checkouts of my code.
v1.64 released