#53 Better handling of binary/non-binary files

open
nobody
5
2004-11-03
2004-11-03
Richard Cyganiak
No

Currently, StatCVS counts a file's contents as LOC if and only if it is
not marked as a binary file at checkin time with the -kb keyword
substitution switch. That's not perfect because

1) some projects check in *everything*, including all code, as
binary

2) there are non-binary files that are not code, e.g. documentation
or language files.

The first issue is the bigger one. It's showed up repeatedly on the
mailing lists and bug tracker. Many CVS users simply don't know
about the various keyword substitution flags. If you use a decent
IDE, it's all handled automatically for you.

Idea: Have a "-code" switch on the command line to specify the
file extensions of code files:

java -jar statcvs.jar ... -code java;c;h;inc

If not present, all files marked as -kb would be counted. If present,
all files with one of the given extensions would be counted, be they
-kb or not.

There could be a warning when StatCVS runs and all files are -kb.
It would suggest to mark code files using the -code switch.

Discussion