This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 134152 - C/C++ code metrics
Summary: C/C++ code metrics
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-29 12:03 UTC by crimcat
Modified: 2013-07-19 12:52 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crimcat 2008-04-29 12:03:10 UTC
I need simple code metrics functionality which I think is useful in support and refactoring old projects (especially,
written by someone else).

I'd suggest to implement the following:
1) total lines of code in the source file (only code);
2) total lines of code in sense of number of operators (it may be useful when several operators are placed in the same
line, separated with ';');
3) total lines of comments in the given source file (in line comments should be counted as well);
4) code density for any given source code file (lines of code and lines of comments ratio);
5) source code complexity (any method, for example, number of nested constructions - if, switch, for, while, do - in the
function body).
Comment 1 Alexander Simon 2008-04-29 12:23:34 UTC
Well known metrics for code complexity.
Simple:
- LOC lines of code
- SLOC semicolon lines of code
- CR comments ratio
Halstead complexity metric:
- Program length
- Program vocabulary
- Volume
- Difficulty
- Effort
McCabe complexity:
- Cyclomatic Complexity