Intresa in Static Analysis for D ?

Basile B. via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 15 08:28:30 PST 2016


On Tuesday, 15 November 2016 at 14:45:29 UTC, Stefan Koch wrote:
> Hi Guys,
>
> I was wondering how much interest in static analysis exists in 
> this community .
> DMD already has rudimentary support for these kinds of things.

cyclic complexity
NPath complexity
Halstead complexity

3 nice fields of static analysis.

I'm currently working on Halstead 
(https://github.com/BBasile/Coedit/blob/master/dastworx/src/halstead.d)

The Halstead metric (1977) is often considered as ratio of the 
number of line code, while it's actually not at all. The Halstead 
is based on the operations and the operations arguments. You can 
have small functions using a lot of operands that will be bug 
prone. You can have huge functions with very few operands used 
and that are not bug prone. The Halstead metric can detect them. 
It can tell you: "take care of this function".

;]


More information about the Digitalmars-d mailing list