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
1
vote
1 answer

Receive feedback from SonarQube in regards to design and architecture

I am analyzing a code base consisting of mainly Java which is quite large (~1 million lines of code) using SonarQube, Jenkins and Bitbucket. More to the point, one of the main tasks of this analysis is to investigate how the architecture and design…
Tomas Melin
  • 381
  • 1
  • 5
  • 18
1
vote
2 answers

Code Metrics - Static classes and methods count

I am curious to know how many static methods and static classes we have in our Visual Studio 2013 solution. We have lots of projects in there... Is there anything built in to Visual Studio that can do this? I cant see anything in the Code Metrics…
Andez
  • 5,588
  • 20
  • 75
  • 116
1
vote
1 answer

Where is the extension/extensibility point for vs2010 code metrics?

I'd like to extend the 2010 static code analysis metrics (mostly fix it so the rollup is max instead of sum). Where is the extensibility point? Is it an MEF component somewhere?
Maslow
  • 18,464
  • 20
  • 106
  • 193
1
vote
3 answers

Supporting Code Metrics with Case Studies

I'm principally interested in case studies on code metrics, relating code readability to defect reduction, that justify taking seriously cyclomatic complexity or some similar metric. Wikipedia has this example: A number of studies have…
1
vote
1 answer

Get List of functions (with metrics) in My Solution

I have a large assembly (written in VB.NET). Is there a simple way (or tool) that will list all the functions with perhaps the size of each function (in respect to lines of code)? I have downloaded nDepend but could not see that facility within it.
1
vote
1 answer

XSLT Transform for XML Generated by metric.exe

I'm trying to transform the following XML generated by metric.exe for assemblies in my solution. and i am not an expert in XSLT and struggling to arrive at the format indicated at the bottom of the question. please help. The XML
Ahsan
  • 2,488
  • 2
  • 22
  • 44
1
vote
1 answer

Metric Shader for VS 2010

Has anyone found a Metric Shader type plugin for VS 2010? I was using a really good one in VS 2008 that is a plugin for Dev Express DXCore: Metric Shader But it doesn't work in VS 2010. I found this to be a tremendously handy tool while refactoring…
John
  • 1,094
  • 2
  • 11
  • 20
1
vote
2 answers

WinForms MenuStrip Isolation to improve Code Maintainability

In Windows Forms, C#, .NET 3.5, VS2008... What's a good way to isolate the code for a MenuStrip (or any complex control group), and it's child menu items, from the rest of my form? For example, when I have a MenuStrip with a number of menus and each…
Adam Kane
  • 3,996
  • 7
  • 44
  • 53
1
vote
1 answer

Storing code metrics

I'd like to write a pre-commit hook that tells you if you've improved/worsened some code metric of a project (i.e. average function length). The hook would have to know what the previous average function length was and I don't know where to store…
adrianton3
  • 2,258
  • 3
  • 20
  • 33
1
vote
1 answer

Aggregation of code metrics over multiple files

I am currently trying to compare the TodoMVC Examples of Angular, Ember, Backbone and Knockout with the help of code metrics. After some research, I found jsmeter.info and jscomplexity.org which both cover the metrics i would like to compare. (Lines…
areiterer
  • 33
  • 1
  • 7
1
vote
0 answers

Retrieve sonarqube 4.4 metrics to excel file

Im trying to use the extract issues excel file from http://docs.sonarqube.org/display/SONAR/Reporting to get some sonar metrics from sonarqube 4.4. The file retrieves metrics using this web service…
1
vote
1 answer

NDepend: What is "Resilience to Change"

Whilst evaluating NDepend I attached a NDepend project to all the Visual Studio projects that comprise our company's software suite. Particularly striking is the result of the Abstractness vs Instability graph. Almost all of the projects are crammed…
David Brower
  • 2,888
  • 2
  • 25
  • 31
1
vote
1 answer

Manual Measures / Metrics in SonarQube

I'm on a project working with SonarQube and the given analysis. Can anyone tell me if I can add an own metric which SonarQube uses to analyse my code? For example (I know this one already exists "Comments Balance"): Tharmar's Metric 00 = "Commented…
MarcelHodan
  • 580
  • 1
  • 7
  • 27
1
vote
1 answer

What is exactly is the average hierarchy metric, and how do I reduce the score?

I've been using PHPDepend to validate the quality of the code I'm writing. The one metric where I'm not in the low/average column is the average hierarchy height metric. The definition on pdepend.org is The Average Hierarchy Height metric is a…
Alan Hollis
  • 1,292
  • 3
  • 14
  • 29
1
vote
1 answer

Log command for majority contribution per file with code metrics

Is there a way to run a Git log command with a majority contributor (author)? I want to use that along with a code metric tool to be able to essentially show the quality of code produced per contributor. File Author Cyclomatic Complexity …
jdev4ls
  • 99
  • 1
  • 6