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.27k stars 250 forks source link

Flag --not-match/-M not working, got ignored entirely #457

Closed erinacio closed 1 month ago

erinacio commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

scc ignores --not-match flag or -M flag entirely.

To Reproduce

Just use scc -M '.*\.go' on scc repository itself.

Expected behavior

You should not see any go source file counted in the result.

Desktop (please complete the following information):


Some extra information:

Flag --not-match/-M binds to processor.Exclude, which has two usages in old revisions. One at main.go and one at processor/file.go. However, in the latest revision it only has one usage in main.go for registering flags. git bisect shows that 33cb71dcbf589b3c681ae4522bf6f8480a60085a is the first commit that processor module no longer cares about the value of processor.Exclude.

boyter commented 1 month ago

Right should be resolved in master. Ill see about pushing out a release soon.

boyter commented 1 month ago

Latest release 3.3.4 should have this for you.