boyter / scc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
MIT License
6.58k stars 261 forks source link

Different Results on Windows and Linux #404

Open scottc-WellSky opened 1 year ago

scottc-WellSky commented 1 year ago

I'm getting significantly different results on the same repo using the same scc 3.1.0 release on Windows 10 Enterprise vs Debian. Using scc with no options:

Linux / Debian ─────────────────────────────────────────────────────────────────────────────── Total 1355 528206 33321 75815 419070 16525 ───────────────────────────────────────────────────────────────────────────────

Windows 10 Ent ─────────────────────────────────────────────────────────────────────────────── Total 1592 1162312 39713 91856 1030743 21925 ───────────────────────────────────────────────────────────────────────────────

When using the --no-gitignore I do get the same results on both systems so I'm pretty sure this is related to the known issues with gitignore. I did not realize this issue affected the different OSs differently though.

Can anyone confirm this is because of the gitignore issue?

I'm excluding a lot of directories that should be excluded by gitignore which minimizes the issue. Any other hints to minimize the differences?

boyter commented 1 year ago

Now thats an interesting situation.

Could you possibly try the following for me, https://github.com/boyter/cs run that with something you know exists in both and see if you get the expected results?

That's using the new file walking I want to use which should be accurate.

scottc-WellSky commented 1 year ago

I'll be happy to @boyter, but I'm traveling so it will take me a couple of days.

boyter commented 1 year ago

No problem. I am prepared to wait while I try to replicate myself.

scottc-WellSky commented 1 year ago

@boyter, I am seeing differences with cs between Windows and Debian as well. The first screenshot is without any flags. In the second image I used the no-gitignore flag. image

image

boyter commented 1 year ago

OK that's odd. I will see what I can do to track this down.