Install the Eclipse Metrics plugin . To create an HTML report (with optional XML and CSV) right-click a project -> Export -> Other -> Metrics .
You can adjust code line metrics by ignoring blank lines and only comment lines, or excluding Javadoc if you want. To do this, check the tab in Preferences -> Metrics -> LoC .
What is it. There is no special option to exclude curly braces {} .
The plugin offers an alternative metric for LoC, called the Number of applications . About this, the author should say about this:
This metric represents the number of statements in a method. I find this a more reliable measure than lines of code, as the latter is fragile in relation to various formatting conventions.
Edit:
After you clarified your question, I understand that you need an idea of real-time violations, such as compiler warnings or errors. You also need a reporting feature to create reports for your boss. The plugin described above is intended for reports because you must export indicators when you want to see them.
aliopi Aug 03 2018-11-11T00: 00Z
source share