Haskell Code Metric Tools

Is there a tool for measuring code indicators such as LOC (line of code), number of functions, and average function size for Haskell programs?

+6
source share
3 answers

Ohcount , the tool used by ohloh , at least knows how to tell Haskell comment lines from Haskell code lines, as you can see, for example, in the statistics for GHC .

+2
source

In addition to the mentioned HLint for code style checking, there are not as many mature tools as in other language ecosystems. I would point out the following development tools:

  • homplexity : this project "aims to assess the complexity and quality of Haskell code by measuring the relative length of declarations, their depth and the -to-comment ratio code."
  • argon : it computes cyclic complexity.
+1
source

When Joost Visser ( http://www.cs.ru.nl/J.Visser/ ) was a member of the PURe research group ( http://wiki.di.uminho.pt/twiki/bin/view/Research/PURe/WebHome ) at Universidade do Minho, the group released a number of libraries for obtaining indicators and documented work in scientific papers.

I do not think that every code did it in Hackage, but the SVN server can still be active. I believe that they have some code for retrieving Haskell metrics, I'm not sure if this has ever been a significant focus - the code for retrieving metrics from grammars (SdfMetz) was written in Haskell. Haskell tends to be rather briefly idiomatic, which is quite contrary to the explanatory value of the metrics.

0
source

Source: https://habr.com/ru/post/955377/


All Articles