Code File Analysis

Discussion in 'Webmastering & Programming' started by Trepidati0n, Oct 8, 2011.

  1. Trepidati0n

    Trepidati0n [H]ardForum Junkie

    Messages:
    8,875
    Joined:
    Oct 26, 2004
    I use notepad++ for most of my coding. However, I'm going through a bit of effort to reduce total lines of code by a previous developer (put it this way, a header file is a foreign concept to him). I'm looking for a application that can count the amount of lines in a file that are non blanks. Anybody know of anything? I need this automated, because I have roughly 100k lines of code but I need an accurate estimate to show before after.

    Note: this is for vhdl.
     
  2. Sgraffite

    Sgraffite 2[H]4U

    Messages:
    4,039
    Joined:
    Jan 10, 2006
    You can use Notepad++ to do a find, select regex, and click on Count using this regex:
    Code:
    ^[\s]*$
    That will tell you the total number of lines that only contain whitespace within the file, so just subtract that from the total number of lines.
     
  3. Trepidati0n

    Trepidati0n [H]ardForum Junkie

    Messages:
    8,875
    Joined:
    Oct 26, 2004
    Thanks...that will work :)