Instant LoC Analyzer

Instant LoC Analyzer v1.0

(A Lines of Code Analyzer Tool developed by me)

Download Instant LoC Analyzer v1.0 (977.66 Kb)

Introduction

Over time we have seen a lot of Lines of Code counter utilities for code written in .Net languages and other platforms in the market. Even though we have a lot of such or similar utilities I as an end user or developer always felt that the following were the main problems that haunted me if I wanted to do a quick lines of code analysis:

· There are so many of them out there that I was confused as to which one to use.

· Most of them didn’t even have a user manual.

· If one tool had a particular feature that I wanted, it would not have some other feature which would have helped me analyze the effort more accurately.

· Finally, I think one of the most sought after feature in any LoC counter utility, is the ability to export the analysis results into an excel file, which is a feature which not many LoC counter tools I have seen, provide.

Let me just give you a very brief introduction to the LoC counter tool that I have developed, for VS 2005 solutions and projects as well as for any C# or VB code files:

Instant Loc Analyzer is a simple windows application/tool that can be used to count the lines of code that make up a Visual Studio 2005 Solution, Project or C#/VB Code Files. The application can provide you valuable information like the number of designer generated lines of code in addition to providing the number of lines of code, the number of commented lines, the number of blank lines, and the total number of lines at a solution level, project level and code file level. It gives you the additional option of exporting the analysis results to an excel file.

 

Instant LoC Analyzer v1.0 Features

Using the tool lines of code analysis can be done at 3 different levels:

· The Visual Studio 2005 solution level

· The Visual Studio 2005 project level

· C#/VB Code File level

Now let us have a look at the information that the tool provides us with at each level. Let us start with the first level.

The Visual Studio 2005 solution level

At a Visual Studio 2005 solution level, the tool gives us the following information:

· The total number of lines of code

· The total number of commented lines

· The total number of blank lines

· The total number of lines

· The total number of projects

· The total number of code files

· The total number of designer code files

· The total number of lines of designer code

The Visual Studio 2005 project level

At a Visual Studio 2005 project level, the tool gives us the following information:

· The total number of lines of code

· The total number of commented lines

· The total number of blank lines

· The total number of lines

· The total number of code files

· The total number of designer code files

· The total number of lines of designer code

C#/VB Code File level

At a C#/VB code file level , the tool gives us the following information

· The total number of lines of code

· The total number of commented lines

· The total number of blank lines

· The total number of lines

Export to Excel Feature

One of the most important feature of the tool is its ability to dump all the data/information that you see on the screen into a Microsoft Excel file, which I think is the place where all this data would have ended up anyways.

Again you have been given this option of exporting the data to excel, at a solution level, project level as well as a code file level for easiness.

Multi-tabbed User Interface

Even though this is a UI level feature, it makes the tool easier to use. There are 3 Tabs:

· The VS 2005 Solution File Tab – You would be using this tab if you have a VS 2005 solution file that has a number of projects, and these projects have a number of code files within them, and you want to get a consolidated lines of code information for this solution file.

· The VS 2005 Project File Tab – You would be using this tab if you have a VS 2005 project file that has a number of code files, and you want to get a consolidated lines of code information for this project file.

· C#/VB Code File(s) – You would be using this tab for three purposes as I see it:

o To get the lines of code information for a single C#/VB code file

o To get the lines of code information for a set of C#/VB code files.

o To do a comparison between lines of code analysis information provided by the tool for 2 or more different C#/VB code files.

Instant LoC Analyzer v1.0

Fig. Instant LoC Analyzer v1.0 Screenshot

Advertisements
  1. Bill
    Monday, September 18, 2006 at 6:02 am

    Great tool! Sorting is broken though, everything is being sorted as a string 🙂

  2. Krishna Kumar
    Monday, September 18, 2006 at 12:04 pm

    Thanks Bill..Thanks for evaluating the tool…in fact to be really frank if you are talking abt the datagrid..i had really not thought about making it sortable…but that is a good idea..will consider it for my next release..if tht happens :). But if you can export it to an excel then you can do all your analysis in excel. Thanks once again.

  3. kris
    Wednesday, September 20, 2006 at 3:45 pm

    Hi Krishna,
    Good Tool. But one cannot count the lines in aspx code files.
    So for ASP.NET applications, its quite required.

    Anyways its a good tool.

    Regards,
    Kris

  4. Krishna Kumar
    Wednesday, September 20, 2006 at 3:51 pm

    Kris, actually the tool also counts the no. of lines of code in aspx.cs and aspx.vb files (code behind)…if you are talking about html source, the tool does not count that.

  5. Krishna Kumar
    Wednesday, September 20, 2006 at 4:00 pm

    Make sure that your website folder is on the local system (system on which u hav the tool installed).

  6. Bhuvanraj
    Monday, September 25, 2006 at 11:37 am

    Hi Krishna Kumar.

    The Loc Analyzer came in very handy in my project.

    Thanks a lot

    Regards
    Bhuvan

  7. Abhilash
    Monday, December 4, 2006 at 7:32 pm

    Hi,

    KK ..good tool

  8. Andy
    Friday, December 29, 2006 at 4:04 am

    Hey, thanks for this tool. Unfortunately for me it does work on one solution since I have projects and solutions containing periods like: x.y.vbproj

    This returns an “Illegal characters in path” error.

  9. Sandeep
    Wednesday, March 7, 2007 at 11:25 am

    Can you confirm if this count physical lines of code?

  10. Krishna Kumar
    Friday, March 9, 2007 at 10:14 am

    Sandeep, as most of the line counters do, my tool also counts the number of physical lines of code and not the logical number of lines.

  11. Wednesday, October 3, 2007 at 2:37 am

    Want to start your private office arms race right now?

    I just got my own USB rocket launcher 🙂 Awsome thing.

    Plug into your computer and you got a remote controlled office missile launcher with 360 degrees horizontal and 45 degree vertival rotation with a range of more than 6 meters – which gives you a coverage of 113 square meters round your workplace.
    You can get the gadget here: http://tinyurl.com/2qul3c

    Check out the video they have on the page.

    Cheers

    Marko Fando

  12. Idetrorce
    Sunday, December 16, 2007 at 9:02 am

    very interesting, but I don’t agree with you
    Idetrorce

  13. Max
    Wednesday, August 20, 2008 at 6:33 am

    Source code? Need to finish a few things in the tool.

  14. salomon
    Friday, June 5, 2009 at 5:47 pm

    Give option to command line executor so we can integrate with CruiseControl and view the report in CruiseControl Dashboard.

  15. Paul
    Friday, October 30, 2009 at 6:23 pm

    Any chance of getting updated version that would run with VS 2008?

    A command line option would be great!

  1. Saturday, August 19, 2006 at 9:54 pm
  2. Tuesday, February 20, 2007 at 8:05 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: