SourceForge has been redesigned. Learn more.
Close

#15 measure blank and comment lines

open
None
3
2003-06-04
2003-06-04
Frank Sauer
No

measure blank and comment lines and the ratio of real
statement lines vs. total lines

Discussion

  • James Hu

    James Hu - 2003-11-13

    Logged In: YES
    user_id=37483

    Agree with Frank, I think this is very useful too.

     
  • Daniel Serodio

    Daniel Serodio - 2003-12-09

    Logged In: YES
    user_id=58637

    Actually, I think LOC is a pretty meaningless metric, since
    coding style can affect it _a_lot_, eg, putting opening braces
    in a line by itself, breaking long lines, etc.

    NCSS (Non-Comment Source Statements) is a much more
    useful metric (roughly the same as counting '{' and ';'). See
    http://www.kclee.com/clemens/java/javancss/ for more
    information.

     
  • Nobody/Anonymous

    Logged In: NO

    It would be better to allow the user to specify different
    preferrences when counting LOC. For example, count only
    NCSS, or count all lines including/excluding blank
    lines/comments/variable declarations/importing statements...
    Thanks!

     
  • Frank Sauer

    Frank Sauer - 2003-12-17

    Logged In: YES
    user_id=52904

    I like that approach from a user's standpoint, but the
    downside is that it becomes hard to compare metrics for
    different code bases generated by different users with
    different settings. If some measure one way and others
    another way you're comparing apples and oranges. Now at
    least it's always measured the same way, good or bad.

     

Log in to post a comment.