I've tried the Metrics plugin and although it's nice and all, it's not what my boss is looking for. It counts a line with just one }
as a line and he doesn't want that to count as "its not a line, its a style choice". I also need to generate some form of report about the metrics provided. Are there any good tools for this?
After installation: - Right click on your project - Choose codepro tools --> compute metrics - And you will get your answer in a Metrics tab as Number of Lines. This one is actually quite good!
Go to Window > Preferences > General > Editors > Text Editors and select the option Show line numbers as shown below. After this step, you can see that line numbers appear for the source code as shown.
To use cloc simply type cloc followed by the file or directory which you wish to examine. Now lets run cloc on it. As you can see it counted the number of files, blank lines, comments and lines of code. Another cool feature of cloc is that can even be used on compressed files.
There's always the "brute force":
Search->File
Type the following in "Containing text" -> ^.*$
. Then check the "Regular Expression" checkbox
Type the following in "File name patterns" -> *.java
Click "Search"
Check the number of matches in the "Search" Tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With