Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Metric Tools for Haskell

Tags:

haskell

Is there any tool for measuring the code metrics like LOC(line of code), number of functions and average size of functions for Haskell programs?

like image 249
Amin Avatar asked Oct 07 '13 01:10

Amin


2 Answers

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

like image 105
Joachim Breitner Avatar answered Oct 26 '22 07:10

Joachim Breitner


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

  • homplexity: this project "aims to assess complexity and quality of Haskell code by measuring relative length of declarations, their depth, and code-to-comment ratio".
  • argon: it computes cyclomatic complexity.
like image 44
tomtau Avatar answered Oct 26 '22 09:10

tomtau