|[dsdp-dd-dev] Committes: How to count lines of code in a contribution|
You might want to consider using my "lcp" script to count lines in a patch: http://www.eclipse.org/dsdp/tm/development/committer_howto.php#sloccount It counts the "+" added lines only and subtracts empty lines as well as lines that only have a comment. You're right that removing lines also constitutes an act of creativity so even a patch that ONLY removes lines is valuable. But for the application in our tm-log.csv it's more important to count how much new copyrightable stuff comes in through the patch. And that is comprised of the "+" lines only. The script is still not perfect in the case where existing code is only moved to a different place (leading to lots of + along with the same number of - lines, which also constitutes creativity but not necessarily new copyrightable stuff). But finding out such moves is beyond the scope of what we should do when counting lines.
Hope you find this useful,
Back to the top