Menu

#128 Can't use an undefined value as an ARRAY reference at cloc-1.63.pl line 1176.

v1.63
closed
nobody
None
2
2015-06-27
2014-12-10
Andrei
No

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

Related

Bugs: #128

Discussion

  • Al Danial

    Al Danial - 2014-12-10
    • status: open --> accepted
     
  • Andrei

    Andrei - 2014-12-10

    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

     
  • Al Danial

    Al Danial - 2014-12-12
    • status: accepted --> pending
     
  • Al Danial

    Al Danial - 2014-12-12

    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

    mysql-5.1.72/BUILD/compile-ia64-debug-max
    mysql-5.5.0-m2/BUILD/compile-ia64-debug-max
    

    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.

     
  • Andrei

    Andrei - 2015-04-21

    Thank you, validated! Please close the ticket

     
  • Al Danial

    Al Danial - 2015-04-21

    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.

     
  • Al Danial

    Al Danial - 2015-06-27
    • status: pending --> closed
     
  • Al Danial

    Al Danial - 2015-06-27

    v1.64 released

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.