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
11
votes
7 answers

Visual Studio Code Metrics and the Maintainability index of switch case

As a person who loves to follow the best practices, If i run code metrics (right click on project name in solution explorer and select "Calculate Code Metrics" - Visual Studio 2010) on: public static string GetFormFactor(int number) { …
pee2002
  • 177
  • 3
  • 10
11
votes
1 answer

In GitHub's graphing metrics, what are 'additions'?

Are they lines of code added, or are they something else?
cmac
  • 906
  • 10
  • 19
10
votes
3 answers

Eclipse Metrics Plugin

I'm searching for a Eclipse plugin which measures my activity on projects on a daily basis. I'd like to have a statistic showing me how many LOCs, tests, classes etc. were added. Additionally I'd like it to work without a server. I'm working with…
schlingel
  • 8,560
  • 7
  • 34
  • 62
10
votes
2 answers

What does "Depth of Inheritance" mean for methods?

I have just installed the Visual Studio Power Tool for code analysis and the viewer for the results. Great tools, by the way! When I click "Analyze Solution" I get the results: Maintainability Cyclomatic Complexity Depth of Inheritance Class…
Peter K.
  • 8,028
  • 4
  • 48
  • 73
10
votes
1 answer

How does "Assignment Branch Condition size for index is too high" work?

Rubocop is always report the error: app/controllers/account_controller.rb:5:3: C: Assignment Branch Condition size for index is too high. [30.95/24] if params[:role] @users = @search.result.where(:role => params[:role]) elsif params[:q] &&…
pangpang
  • 8,581
  • 11
  • 60
  • 96
10
votes
1 answer

G++ Compilation Statistics

I was wondering if there is any way to gather statistics from GCC/G++ compilation process. Metrics like the number of lines compiled in the entire process, total time spent compiling, number of errors/warnings, number/size of compiled objects and so…
Filipe Felisbino
  • 2,712
  • 25
  • 26
9
votes
4 answers

What does Visual Studio Code Analysis Lines of Code do with HTML, CSS and Javascript?

I know that Lines of Code (LoC) is a dubious if not false code metric and there are lots of posts to this effect. However ... I still have to provide a LoC count for a web site in a report. I was using the Visual Studio 2010 Code Analysis Code…
Scott Wylie
  • 4,725
  • 2
  • 36
  • 48
9
votes
2 answers

visual studio 2017 could not identify platform on calculating code metrics with dotnet core solutions

I'm receiving error on code analysis with visual studio 2017 on dotnet code projects. I have to say that in other projects everything is ok. I searched but nothing special to solve this error. the exact error is: Message: An error occurred while…
Mehdi
  • 1,731
  • 1
  • 18
  • 33
9
votes
1 answer

LCOM4 interrogation about way to calculate

Recently, I encountered a sementic issue in the way of calculating the LCOM4, a metric used to find how the methods and the properties of a class are cohersive. Introduction LCOM4 is "the 4th method of calculating the Lack in Cohesion Of Methods",…
niconoe
  • 1,191
  • 1
  • 11
  • 25
9
votes
1 answer

What is the difference between block coverage and branch coverage?

Is block coverage the same as branch coverage, similar to it or completely different? The top Google link explaining branch coverage: http://www.tutorialspoint.com/software_testing_dictionary/branch_testing.htm
S V
  • 570
  • 8
  • 21
9
votes
3 answers

Code metrics of php - Notepad++

In particular, I am interested to know how many lines of codes there are, but this spans across many files. I have been using notepad++ to author the code and for each file it does display line numbers but of course I have empty returns to make the…
Harry
  • 91
  • 1
  • 2
9
votes
3 answers

Lines of code and other metrics in F#

How to get some nice statistics about my F# code? I could imagine things like number of lines of my code number of files number of characters? number of functions, classes, modules etc
Oldrich Svec
  • 4,191
  • 2
  • 28
  • 54
8
votes
2 answers

Usual values on Code Metrics (C#, Visual Studio) for production projects

There are some questions on Code Metrics here, especially this one on goal values. What I'm looking for though is what's "usual" on real life production projects. Maybe it's just me, but no project I ever get put on ever has these things in mind so…
8
votes
4 answers

Can we measure complexity of web site?

I am familiar with using cyclomatic complexity to measure software. However, in terms of web site, do we have a kind of metrics to measure complexity of website?
Boong
  • 149
  • 1
  • 8
8
votes
3 answers

Is there any automated metrics collector for my Java project?

I'm trying to collect software code metrics in my Java project on every cycle of continuous integration. I'm interested mostly in size-related metrics like number of classes, number of methods, function points, lines of code, etc. I would like to…
yegor256
  • 102,010
  • 123
  • 446
  • 597
1 2
3
18 19