All Questions

441
votes
30answers
139037 views

What is a reasonable code coverage % for unit tests (and why)?

If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be? Please explain how you arrived at your answer...
621
votes
25answers
314700 views

How do you count the lines of code in a Visual Studio solution?

Is it possible to find the number of lines of code in an entire solution? I've heard of MZ-Tools, but is there an open source equivalent?
80
votes
18answers
10041 views

What is the fascination with code metrics?

I've seen a number of 'code metrics' related questions on SO lately, and have to wonder what the fascination is? Here are some recent examples: what code metrics convince you that provided code is c...
119
votes
14answers
64817 views

How to find out how many lines of code there are in an Xcode project?

Is there a way to determine how many lines of code an Xcode project contains? I promise not to use such information for managerial measurement or employee benchmarking purposes. ;)
197
votes
1answers
70077 views

How to use IntelliJ IDEA to find all unused code?

I have been a happy IntelliJ IDEA user for a long time but I have this question. When I am in a .java file, the unused code is usually grayed out or has a green underline saying this code will probabl...
33
votes
7answers
25962 views

How many lines of code should a function/procedure/method have?

Possible Duplicate: When is a function too long? I've recently been given the unenviable task of reviewing poor code written by another developer and documenting the bad practices. (This is...
52
votes
15answers
7434 views

Do you find cyclomatic complexity a useful measure?

I've been playing around with measuring the cyclomatic complexity of a big code base. Cyclomatic complexity is the number of linearly independent paths through a program's source code and there are l...
13
votes
11answers
4406 views

Code metrics

I'm just curious about what kind of code metrics people are using and opinions/experience on the most effective use of code metrics. All of our code, regardless of language, uses the following: Cyc...
13
votes
5answers
5288 views

Free C# metrics calculation library (DLL)

I wanted to ask whether you know about some free C# libraries (dlls) that calculate CK metrics (mainly Cyclomatic Complexity). I would need that for a project I'm planning to do. I know that there ar...
4
votes
2answers
1089 views

TFS 2010/Code Metrics Integration, Automated Builds Fail, Code Metrics Don't Run

I'm trying to add an automatic post-build trigger to run NDepend (code metrics software) after an automated team build in TFS 2010. NDepend's website provided code for integrating this capability, an...

Previous Next