Questions tagged [code-metrics]

Software metrics are quantitative data pertaining to source code, e.g. number of lines of code (LOC) for a file.

Questions with this tag will often be about which metrics are most useful for certain purposes or which tools are available to provide certain metrics.

276 questions
2
votes
1 answer

Visual Studio 2012 Ultimate: count code lines in Team Explorer

I know we can use code metrics to count code lines of the whole project, but my source code from Team Explorer, when I use code metrics, it jumps to Solution Explorer. I tried to move all my files to a blank solution, but cannot move/ So, my…
2
votes
4 answers

Available Code Metric Systems?

Besides Cyclomatic Complexity what other code metric systems exist?
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
2
votes
0 answers

Are there tools or metrics that measure the complexity of a Spring application?

I am aware of tools that use static analysis to measure the complexity of code written in a single language, e.g., Java. Application frameworks like Spring make measurement of complexity more difficult - many of the interactions are not readily…
kc2001
  • 5,008
  • 4
  • 51
  • 92
2
votes
2 answers

Code metrics for my project

I would like a program that goes in my TFS and weekly takes a snapshot of different metrics like code complexity, Lines of code, code coverage and other stuff and displays them in a graph. It would also be cool to see stuff by individual programmer,…
Xander
  • 9,069
  • 14
  • 70
  • 129
2
votes
1 answer

NDepend metrics on assemblies

Do you try to keep the Distance from main sequence low for every assembly? What about assemblies that contains only Business Objects definitions? Is it possible to keep them away from Zone of Pain? Types in such assemblies are usually used by other…
rafek
  • 5,464
  • 13
  • 58
  • 72
2
votes
6 answers

Analyzing code structure using CodeDom?

I recently wrote a post here on Stackoverflow asking for some C# libraries that calculate metrics, mainly CC...unfortunately with no success. So I'm going to write it myself. I did a search on the web of what could be the best approach, but before…
Juri
  • 32,424
  • 20
  • 102
  • 136
2
votes
3 answers

Code churn calculator (not for a version control system)

Given two project versions, I would like to calculate code churn metrics. EXAMPLE: Input: Two folders containing C and Header files of two versions of the project Output: List of number of lines added/changed/removed in each file I tried some…
Nader Alexan
  • 2,127
  • 22
  • 36
2
votes
1 answer

McCabe's Complexity Metric and Independent Paths

int maxValue = m[0][0]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if ( m[i][j] >maxValue ) { maxValue = m[i][j]; …
1
vote
0 answers

Standalone app to get, build, analyze and report metrics on TFS code

I have a scenario where I have to gather code metrics on a frequent basis and send out a report. My project uses TFS 2010. I generally need to get latest code from TFS, build it (both using .TFS Client APIs), run code analysis, code metrics and code…
Lalman
  • 946
  • 2
  • 11
  • 27
1
vote
3 answers

How to count comments?

I'm trying to count the total lines of code, and most importantly the lines of comments! I am currently using eclipse, and I have tried metrics2 for eclipse but it only gives total lines of code, which ignores whitespace and comments. Could anyone…
AlanFoster
  • 8,156
  • 5
  • 35
  • 52
1
vote
1 answer

Sonar-Runner multithreading?

I am using Sonar for code quality control. The project analysis is performed by sonar-runner. Right now, I cannot use the ant or maven tasks. Problem: The analysis (sonar-runner) Java process is using only 4 processors, even though the machine has 8…
barfuin
  • 16,865
  • 10
  • 85
  • 132
1
vote
1 answer

How to get the maintainability index?

How can I create the maintainability index with cql? Does the NDepend calculate this number? Thanks! Alejandra
Alejandra
1
vote
0 answers

Non-cyclic remark paths in HIS Metrics

I am using this metrics to prove a C code and I don't understand what the second metric means. What is non-cyclic remark paths? Can someone give me an example how to use it?
naomikim
  • 65
  • 5
1
vote
1 answer

How can I write metrics into my software that speak to investors while standing up to geek scrutiny?

Say I'm trying to explain/sell our technology to (friendly) investors and I already have metrics like: 27 custom modules (by number of Github repos we operate) 5 independently operating web stacks (by number of server deploys) 4,000 source code…
Seamus Abshere
  • 8,326
  • 4
  • 44
  • 61
1
vote
1 answer

How do I track daily code metrics on Visual Studio Code?

I am looking for any extension on visual studio code for tracking how many lines I have written by day, maybe export this information to a file. Could you know something able to do it?