Menu

#130 The same files excluded by `--exclude-list-file` not counted later

v1.63
closed
nobody
None
1
2015-05-14
2015-01-14
wild
No

Hello,

Here it seems to be some bug. I expect the file to be counted in the first case or is it a feature?

Case 1

& .\cloc-1.62.exe `
  --windows `
  --list-file=v3_cloc_include.txt `
  --exclude-list-file=v3_cloc_exclude.txt 

(Run from Powershell)

Result:

In ignored:
{PATH1}/Scripts/operator-screen.js: listed in exclusion file v3_cloc_exclude.txt

This present only in found and not counted!:
{PATH2}/Scripts/operatorScreenPrototype.js

Case 2

& .\cloc-1.62.exe `
  --windows `
  --skip-uniqueness `
  --list-file=v3_cloc_include.txt `
  --exclude-list-file=v3_cloc_exclude.txt `

Result:

In ignored:
{PATH1}/Scripts/operator-screen.js: listed in exclusion file v3_cloc_exclude.txt

Now it is counted:
{PATH2}/Scripts/operatorScreenPrototype.js

Discussion

  • Al Danial

    Al Danial - 2015-01-15

    Could you attach a zip file containing sample inputs for me to work with? If I can reproduce your problem I'll be able to fix it.

     
  • wild

    wild - 2015-01-17

    Here I've tried to reproduce this with directory and files structure similar to my project. But the bug is not reproduced. I'm attaching the archive with a try. Probably I'll check it again later. In my project strangely enough it does not include some files without --skip-uniqueness. I can't attach it as of NDA. Thank you!

     
  • Al Danial

    Al Danial - 2015-01-19

    Here's what's probably happening: you have copies of a file in two locations, one of which is in the list of excluded files or directories. The logic becomes tricky in this case--should the file be counted or not? cloc will only count one instance. I believe the current implementation of cloc will exclude both copies of the file if one instance is in the excluded list.

     
  • Al Danial

    Al Danial - 2015-05-14

    no feedback, change to closed

     
  • Al Danial

    Al Danial - 2015-05-14
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel