Each time we make a build (C#), we run CLOC and get an output of the "totals" which go into one log file (in a separate directory). Then we run the tool again with the -diff option enabled, comparing the new build to the previous build, so that we can determine added/modified/removed lines of code. These stats go into separate log file.
Here's what I am observing:
Build A's CLOC Code "SUM" = Build A's CLOC-diff "SUM" of (Same + Modified + Removed).
Build A's CLOC Code "SUM" = Build B's CLOC-diff "SUM" of (Same + Modified + Added).
Why is the Total SLOC for Build equal to the sum of the "lines which remained the same since the last build", the "lines which were modified since the last build" and the "lines that were removed" since the last build? The inclusion of "Removed" lines is what is throwing me. If the lines were removed since the last build - why are they included in the SLOC total?
See actual example below.
SUM Code SUM Code 'Same' SUM Code 'Modified' SUM Code 'Added' SUM Code 'Removed'
Build A 566605 564172 10 0 2423
Build B 567463 566573 2 30 888
Build A total 566605 = Build A (564172 + 10 + 2423)
Build A total 566605 = Build B (566573 + 2 + 30)
I can upload actual output files if needed.
Thanks,
Matt
Anonymous
Yes, please post the output files. Among other things that will also tell me the version of cloc you're running.
How do I upload files? When I was creating the support request, I noticed a link to upload a file, but now I am not seeing the ability to edit my post/upload files.
We're using cloc version 1.53. This is what appears at the top of the logs that cloc is generating: "http://cloc.sourceforge.net v 1.53"
If you scroll to the bottom of this support request (for me the url is https://sourceforge.net/tracker/?func=detail&aid=3398099&group_id=174787&atid=870623) you should see a line for "Attached File". If you click on that you'll see "Add File". (Yes, it is poorly phrased; should be present tense "Attach File" instead of past tense.)
I clicked there but no "Add File" text/limk/button appears.
When I first submitted this support request, I did not have an account, so the system thinks 'Anonymous' submitted the request. Perhaps it is not letting me attach files? I tried logging out and clicking the Attached Files, but still no "Add File" appears... Do you have an email I can send the output files to? Or should I create a new support request and attach the file(s) as I create the request?
Yeah, looks like anonymous submitters cannot attach files. I wasn't aware of that restriction before. Sure, go ahead and email the file to me. You can find my email address near the top of the Perl cloc source file.