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

MSBuild.SonarQube.Runner.Tool not analyzing .cs files

I am trying to use Sonarqube for code analysis with team city integrated using cake build. For some reason Sonarqube does not analyze .cs files.(currently analyzes js/css/xml) Is it a problem with the agent being used for the build? Some settings to…
1
vote
2 answers

Afferent coupling in SONAR

I want to find in a given Java project, the classes with the highest afferent coupling. I know that the metric is available in SONAR when you drill down to a class from the dashboard, or when you drill down package by package in the components…
1
vote
2 answers

Calculating LCOM3?

Are there any opensource/free libraries that I can use to calculate the LCOM3 or LCOM4 Class Cohesion metric? I want to write a tool that reads in java files and calculate this metric.
TERACytE
  • 7,553
  • 13
  • 75
  • 111
1
vote
2 answers

GitHub diff: count characters instead of lines

I ran a search and didn't come up with anything; so, decided to see what the community has to offer on this score. When you commit to GitHub it performs a diff. The diff tells you how many lines were added and how many lines were removed. From a…
Josh Bruce
  • 1,002
  • 13
  • 24
1
vote
2 answers

CK metrics from C# project with Ndepend

I have project for school. Now I need to make from it report of all metrics CK (Chidamber Kemerer metrics). The report has to be like table of all those metrics. Question is how to make it from Ndepend this report which it generates it is not what I…
szkra
  • 1,423
  • 2
  • 14
  • 21
1
vote
1 answer

Calculate solution code metrics with MSBuild 2015

Is it possible to calculate the same code metrics as you get running "Analyze -> Calculate Code Metrics -> On Solution" from MsBuild compilation? Ideally we would like to get the results on an Excel file (like when you execute "Export to Excel"…
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
1
vote
0 answers

What's the difference using Lizard or OCLint to populate SonarQube Objective-C Complexity measures?

Using SonarQube 6.2 with Backelite Objective-C scanner plugin for an iOS project. The Complexity page under the Measures section only displays if I have the scanner script generate and upload the Lizard complexity report. It will not appear simply…
stonedauwg
  • 1,328
  • 1
  • 14
  • 35
1
vote
1 answer

In what kind of situations should I not care about the Maintainability Index in Visual Studio's Code Metrics?

I just today stumbled upon the Code Metrics thing, after having used Visual Studio practically every day for... practically my whole life. I think it's been there since around VS2008, but I haven't cared to play with it. Most of my projects in my…
Rei Miyasaka
  • 7,007
  • 6
  • 42
  • 69
1
vote
3 answers

How to update this class/method to improve Code Metrics

This was my Initial Method public String GetAllDocuments(string url,int pager =0) { if (SessionInfo.IsAdmin) { ReportHandler dal = new ReportHandler(); var documents = dal.FetchDocumentsList(SessionInfo.ClientID, pager); …
Kgn-web
  • 7,047
  • 24
  • 95
  • 161
1
vote
0 answers

Code Metrics feature is missing in VS2015 Enterprise Preview 4

The Code Metrics feature is missing in VS2015 Enterprise Preview 4 It's no longer under the Analyze menu of Visual Studio. Where can I find this feature?
Scott Nimrod
  • 11,206
  • 11
  • 54
  • 118
1
vote
1 answer

An error ocurred while calculating Code Metrics in VS2008

I have Office 2007 (and Excel 2007) installed in my Windows XP sp3, and I use VSTS 2008 Team Suite. I execute option Code Metrics about a csproj in my solution, and I get the error: An error ocurred while calculating Code Metrics How can I debug…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
1
vote
1 answer

Drop wizard AspectJ metrics does not report metrics via JConsole MBeans

I have tried to follow the instructions to get drop wizard AspectJ metrics working, see https://github.com/astefanutti/metrics-aspectj however when I follow these simple instructions and view the metrics through JConsole mbeans there are no metrics…
pootle5
  • 21
  • 3
1
vote
3 answers

visual studio code analysis/metrics tools

I just downloaded a trial version of NDepend. What I'm looking for is a tool that helps in standardization of code. Not only in style of braces, spaces, naming conventions, etc, but also in cohesion & complexity. Is anybody using it that can tell me…
1
vote
1 answer

Refactoring - code samples before and after

I'm writing master thesis about evaluation of source code metrics with a use of refactoring patterns. I would like to examine metrics before and after set of refactorings and check how they change. But now I'm looking for something bigger than…
Mateusz D.
  • 19
  • 2
1
vote
1 answer

Metrics by filter

With SonarQube 5.4, I try to group metrics informations by filter and display them in an aggregated dashboard. Let me explain: I have a very big project, not well structured (everything is under a single source folder). Refactoring it is NOT an…
spi
  • 626
  • 4
  • 19