Can't use an undefined value as an ARRAY reference at cloc-1.63.pl line 1176.
Brought to you by:
alnd
This issue seems similar to #13 for v.1.62. Execution of
cloc-1.63.pl –-diff mysql-5.0.15.tar.gz mysql-5.0.16.tar.gz
leads to
Can't use an undefined value as an ARRAY reference at cloc-1.63a.pl line 1176.
The code trips on files with .inc extension. As a workaround, one can add
--exclude-ext=inc
To reproduce, the source packages can be obtained from
http://downloads.mysql.com/archives/get/file/mysql-5.0.15.tar.gz
http://downloads.mysql.com/archives/get/file/mysql-5.0.16.tar.gz
Anonymous
I tripped on the same error while running diff, but in this case the file (namely, compile-ia64-debug-max) does not have an extension.
Workaround: add --not-match-f='^compile-ia64-debug-max'
To repro: the packages can be downloaded from
http://downloads.mysql.com/archives/get/file/mysql-5.1.72.tar.gz http://downloads.mysql.com/archives/get/file/mysql-5.5.0-m2.tar.gz
The file in question is: mysql-5.1.72/BUILD/compile-ia64-debug-max
Thanks for narrowing the problem down to a single file. You've uncovered an interesting corner case where the left and right files are properly paired, but one can be identified as a programming language but the other can't.
In this particular case the code correctly pairs the files
The first is a shell script (first line starts with #!/bin/sh) but the second is just a series of commands. Without a #! line or an extension, cloc doesn't know how to identify it, so it says the language of the file on the right is "(unknown)". This turns out to be an unknown key in the dictionary %Filters_by_Language.
svn commit 422 fixes the problem by defining a null language filter for "(unknown)" which has the effect of skipping file pairs where one of the two cannot be identified.
Thank you, validated! Please close the ticket
Thanks for validating the code. I keep tickets as 'pending' until the stable release of the tool containing the updated code. Once that's out, I switch all the pending bug reports to closed. My plan is to make a stable release in May.
Sure, thank you for all your work!
Related
Bugs:
#128v1.64 released