Wednesday, April 11, 2007

 
Counting Lines in a Project

I can't believe how fast time goes by. It has been a few months since my last post on using InnerLoop. I guess a combination of travel and rushing to get new releases out takes it toll.

Just to get things started again, I'm going to cover something simple today. One of the things nobody seems to know is how many lines of code are in a verification environment. Sure, you can use wc -l to count them but all the files are usually in many places and it's not worth writing a script for such purposes.

InnerLoop now has a linecount command to take care of this automatically. When your project is open just click on the bottom left area of InnerLoop to activate the command box and type: linecount

You will see a new buffer created named LineCountResults.txt with the summary of the project.

There will also be a list of each file with the filename and number of lines of code. Note that the count doesn't include comments. Some people like to count comments since they are important and some do not. This command does not, but I'm sure if you really want to count them just send a message to support@posedgesoft.com and it will be added. Have fun counting your code.

Here's an example:
**************** LINE COUNT RESULTS ****************

WORKSPACE NAME: junk.vpw
REPORT GENERATED: 4/11/2007

TOTAL PROJECTS: 1
TOTAL NUMBER OF FILES: 150
TOTAL LINES OF CODE: 19331


PROJECT NAME: junk.vpj - 150 Files, 19331 Lines

****************************************************

DETAILED RESULTS PER PROJECT & PER FILE:
---------------------------------------

PROJECT NAME: junk.vpj - 150 Files, 19331 Lines




Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?