It's all about the answers!

Ask a question

How to find the lines of code in a snapshot or between 2 snapshots?


Praveen Chougala (31730) | asked Mar 14 '16, 5:59 a.m.
Hi,

One of our client has asked to find the LOC( Lines of code) in a snapshot or between any 2 snapshots in RTC eclipse client.
pls let us know, if there is a way to achieve this.

if at least, we can find one snapshots lines of code then i can manually find the difference. but i am not finding the way to do so.

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Mar 14 '16, 7:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am not aware that we count LOC in RTC. What you can do though is to

  1. Create a repository workspace from a snapshot
  2. Load said workspace
  3. Use a LOC tool to count

I think you could also use a LOC tool during builds.You could store the LOC.

With respect to LOC between two snapshots, what do you want to count? The lines added and deleted in changes? Or the difference in the total amount of lines? This already points out the dilemma with LOC and why it is not necessary a very useful metric.


Dependent on what you want  to count, you have it already with the first solution. Otherwise you could try to use the SCM commandline and look at the difference between the snapshots and try to count through the changes. I am not sure this is really applicable or not however.


Praveen Chougala selected this answer as the correct answer

Comments
Praveen Chougala commented Mar 16 '16, 5:06 a.m.

Thanks a lot! it helps in calculating LOC.

Your answer


Register or 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.