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?
I’ve tried the Metrics plugin and although it’s nice and all, it’s not what
Share
Install the Eclipse Metrics Plugin. To create a HTML report (with optional XML and CSV)
right-click a project -> Export -> Other -> Metrics.You can adjust the Lines of Code metrics by ignoring blank and comment-only lines or exclude Javadoc if you want. To do this check the tab at
Preferences -> Metrics -> LoC.That’s it. There is no special option to exclude curly braces
{}.The plugin offers an alternative metric to LoC called Number of Statements. This is what the author has to say about it:
Edit:
After you clarified your question, I understand that you need a view for real-time metrics violations, like compiler warnings or errors. You also need a reporting functionality to create reports for your boss. The plugin I described above is for reporting because you have to export the metrics when you want to see them.