Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

LOC/SLOC/LLOC tools?

An extension like this may be well off-topic for jazz.extend.
If so, my apologies.

My boss wants a tool to measure Lines of Code (Source Lines of Code,
Logical Lines of Code, whatever). It needs to have a command-line
interface so we can invoke it from builds, and it needs to be able to
count changes between different versions of the same code, like
counting lines added/deleted/changed between the current tip versus a
snapshot. Our primary language is Java but we have a few programs in
C. We use RTC for source control.

If anyone has suggestions, primarly for tools that are RTC-aware but
also for tools that just work on filesystems, please e-mail
tmcd@panix.com

--
Tim McDaniel, tmcd@panix.com

0 votes



2 answers

Permanent link
My boss also want me to provide the "lines of code" metrics for changes between builds. Anyone have some info on this, or expert advice on not doing this?

0 votes


Permanent link
You can use the SCM CLI to list files changed between the current state loaded for the build and a specific snapshot.
See https://jazz.net/wiki/bin/view/Main/BuildFAQ#ScmCli

You don't mention which language you're using, but there are various tools out there for calculating LOC. See for example:
http://stackoverflow.com/questions/2773055/lines-of-code-counting-for-many-c-solutions

You could then publish the resulting file using the logPublisher Ant task.
See https://jazz.net/wiki/bin/view/Main/BuildFAQ#BuildSystemToolkitContents

Regards,
Nick

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,936

Question asked: Jun 10 '10, 12:59 p.m.

Question was seen: 8,402 times

Last updated: Jun 10 '10, 12:59 p.m.

Confirmation Cancel Confirm