Number of code lines, comment lines, and empty lines

Given a JavaScript file, for intance the jQuery Core file: http://code.jquery.com/jquery-1.6.2.js which consists of 8981 lines, if I load this file in WebStorm, is there anywhere information about how many

(1) lines of code
(2) comment lines
(3) empty lines

there are?

Obviously:

(1) + (2) + (3) = 8981

So, does WebStrom provide this information? If not, please do implement this !

1
5 comments

phpStorm does show the line count in the bottom status bar. eg: 14:31   31 is the line count 14 the position of the cursor.

What I use beyhond that is a command line tool Cloc http://cloc.sourceforge.net/

prompt> cloc perl-5.10.0.tar.gz
    4076 text files.
    3883 unique files.                                          
    1521 files ignored.

http://cloc.sourceforge.net v 1.50  T=12.0 s (209.2 files/s, 70472.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Perl                          2052         110356         130018         292281
C                              135          18718          22862         140483
C/C++ Header                   147           7650          12093          44042
Bourne Shell                   116           3402           5789          36882
Lisp                             1            684           2242           7515
make                             7            498            473           2044
C++                             10            312            277           2000
XML                             26            231              0           1972
yacc                             2            128             97           1549
YAML                             2              2              0            489
DOS Batch                       11             85             50            322
HTML                             1             19              2             98
-------------------------------------------------------------------------------
SUM:                          2510         142085         173903         529677
-------------------------------------------------------------------------------
0

Hello Jeff,

Please create a feature request - http://youtrack.jetbrains.net/issues/WI#newissue=yes

Thank you for feedback!

0

There is a relevant plugin for the platform
http://plugins.intellij.net/plugin/?idea&id=4509
But its currently incompatible with all but IDEA IDEs.
You try pinging the author for a compatible update.

0

That's really useful, thanks!

0

Did you create a feature request? I couldn't find it in YouTRACK...

0

Please sign in to leave a comment.