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
3
votes
1 answer

Script to calculate Uncle Bob's "Agile PPP" code metrics for C#

I am reading Agile PPP for C#, and at some point Uncle Bob presents interesting metrics for design quality: These are: H (relational cohesion) = (R + 1) / N, where: R = number of internal relations inside a component; N = number of classes inside…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
3
votes
1 answer

How to get the PHPLOC results displayed in Jenkins?

I use Jenkins for PHP projects with the PHP Quality Assurance Toolchain. To get the code analysis results displayed in Jenkins one simple has to add the according post-build action(-s): The problem is currently with the PHP QA tool PHPLOC. I don't…
automatix
  • 14,018
  • 26
  • 105
  • 230
3
votes
2 answers

Visual Studio 2010 Code Metrics at Function Level

I ran the code metrics calculation on a project of mine, and am seeing results for each namespace/class in the project. I'd like to see results at the function level. Even the filter still works at the class level. Is there any way to do this? …
Shane Fulmer
  • 7,510
  • 6
  • 35
  • 43
3
votes
2 answers

Comparing test coverage metrics to identify an increase/decrease after implementing automation

Let's say I wanted to compare the levels of test coverage for projects before and after implementing an automation framework. I collected metrics for all projects in regards to test coverage. Would it just be avg. test coverage for projects before…
3
votes
1 answer

Drop wizard metrics with AspectJ throws advice has not been applied

I'm trying to set up AspectJ for Metrics in a simple java project. I have added the required dependencies in pom.xml. When i do mvn compile, I get the following warnings. It says, the advice is not applied. Where am i going wrong [INFO] Showing AJC…
simplyblue
  • 2,279
  • 8
  • 41
  • 67
3
votes
0 answers

Is it possible to export code metrics to CSV in Visual Studio 2015

Visual Studio 2015 has a Analyze->'Calculate Code Metrics' menu item which helpfully provides lines of code (LOC) and Cyclomatic complexity metrics for projects, classes and methods. It also has a handy 'Open List in Microsoft Excel' button; handy…
redcalx
  • 8,177
  • 4
  • 56
  • 105
3
votes
1 answer

What should be the value of Maintainability Index for a standard .NET project?

I am working with multiple enterprise level .NET projects. As a part of Code review tasks, we calculate Code Metrics (Maintainability Index and Cyclomatic Complexity) for these projects using Visual Studio tools. Now, for Maintainability Index, the…
Atanu Roy
  • 1,384
  • 2
  • 17
  • 29
3
votes
2 answers

Metric to measure object-orientedness

Is there a metric that can assist in determining the object-orientedness of a system or application? I've seen some pretty neat metrics in the .NET Reflector Add-ins codeplex project, but nothing like this yet. If such a metric doesn't exist, would…
Jono
  • 1,964
  • 4
  • 18
  • 35
3
votes
2 answers

oclint: oclint-json-compilation-database returns "Skipping [Path] Command line not found."

After (seemingly) successfully generating compile_commands.json with oclint-xcodebuild, oclint-json-compilation-database fails to correctly create a pmd-style report. The command looks like this: oclint-json-compilation-database -e Pods -v --…
ff10
  • 3,046
  • 1
  • 32
  • 55
3
votes
1 answer

How do I manually calculate Efferent Coupling (Ce) for a .Net class?

If I want to manually calculate the efferent coupling of a .Net class should I include types from the CLR in my calculation, or just types I have created?
David Osborne
  • 6,436
  • 1
  • 21
  • 35
3
votes
1 answer

Visual Studio Maintainability Index has hierarchy only down to main()

I'm the current owner of a legacy C++ codebase. It's got a few dozen source & header files. The project is typically developed, built, and deployed on linux. In linux, the build system is scons/gcc, and the product is a single executable. I want…
3
votes
1 answer

How do you quantify your objective-c code quality?

I am currently using OCLint, which can be integrated with XCode, but the format of the result has some problems. When the # of warning exceeds 200, it cannot be properly displayed. What I want is more sophisticated code metrics, e.g. Cyclomatic…
Ming Zhu
  • 272
  • 4
  • 13
3
votes
1 answer

Detect the impact of changes in an application

I have an assignment that consists of creating a method to detect the impact of changes in an application. Can anyone help me with some instructions? I don't know where to begin, and need someone to put me on the right track.
Amson
  • 74
  • 8
2
votes
1 answer

PHP Depend code metrics analysis

I am trying to compare two PHP projects using PHP Depend (http://pdepend.org). One is a page-based PHP application written by a group of students a year ago and the second is mine that I have worked on for the past year. The objective is to provide…
Satyam
  • 645
  • 2
  • 7
  • 20
2
votes
1 answer

using CCCC on Windows XP with Visual studio 2010

I am trying to use CCCC(C and C++ Code Counter) on a windows machine.I did not have Microsoft Visual C++ Toolkit 2003 but Visual Studio 2010 installed on my machine. So,to get around the problem of creating the Windows installer on my box,I…