Hello.
I have searched the net but haven't found a way to calculate lines of code for files in a folder in fortress/vault. Is there a way to do that? SQL query will do, as well as a tool (if there is any).
-SF
How to calculate lines of code (LOC) for a folder?
Moderator: SourceGear
-
- Posts: 1
- Joined: Mon Mar 08, 2010 6:38 am
Re: How to calculate lines of code (LOC) for a folder?
We don't have a built in way to do this with Vault. Files are stored as binary Blobs, not text in the datasbase, so you can't run queries against source code in the database.
If you Get the code to disk, you can count lines of code from there.
You can use the Command Line Client or Fortress Client API to do the get of current files or current and previous versions to compare the difference in line count.
Command Line Client documentation is here:
http://download.sourcegear.com/misc/vau ... nt/clc.htm
I found this simple SourceCodeLineCounter on the Internet -- I haven't tried it and don't know how well it works, but I do know that CodeProject is a reputable site. You have to register (it's free) to download the code.
http://www.codeproject.com/KB/files/Sou ... unter.aspx
HTH
If you Get the code to disk, you can count lines of code from there.
You can use the Command Line Client or Fortress Client API to do the get of current files or current and previous versions to compare the difference in line count.
Command Line Client documentation is here:
http://download.sourcegear.com/misc/vau ... nt/clc.htm
I found this simple SourceCodeLineCounter on the Internet -- I haven't tried it and don't know how well it works, but I do know that CodeProject is a reputable site. You have to register (it's free) to download the code.
http://www.codeproject.com/KB/files/Sou ... unter.aspx
HTH
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager