cloc

CLOC --diff and --exclude-dir don't seem to work together


I am trying to compare two directories with multiple subfolders. This is my CLOC script:

cloc-1.76.exe --diff test_initial test_latest --timeout 60 --exclude-dir=ZC_DATA --out=results.txt

Both folders have a ZC_DATA directory. In test_initial it is empty, in test_latest has several C and XML files, therefore lots of code to count.

What I am experiencing is that with or without the switch exclude-dir=ZC_DATA I am getting exactly the same results, no difference at all.

I need a way to include or exclude this folder in order to get different results. Please advise.

Regards, M.R.


Solution

  • If you do a straight count of one of the input directories, for example,

    cloc-1.76.exe --timeout 60 --exclude-dir=ZC_DATA --out=results.txt test_latest
    

    with and without --exclude-dir=ZC_DATA do the counts change? Repeat the two invocations with the second directory, test_initial, and report if there are differences there as well.