homplexity-0.4.6.0: Haskell code quality tool

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Homplexity.Assessment

Contents

Description

Main module parsing inputs, and running analysis.

Synopsis

Showing metric measurements

measureAll :: Metric m c => Assessment m -> (a -> [c]) -> Proxy m -> Proxy c -> a -> Log Source #

measureTopOccurs :: (Data from, Metric m c) => Assessment m -> Proxy m -> Proxy c -> from -> Log Source #

measureAllOccurs :: (Data from, Metric m c) => Assessment m -> Proxy m -> Proxy c -> from -> Log Source #

Measure all occurences of a given CodeFragment with a given Metric, then use Assessment on them and give a list of Log messages.

Arguments come in the following order: 1. Assessment for the value of the Metric. 2. Metric given as Proxy type. 3. CodeFragment given as Proxy type. 4. Program containing CodeFragments.

type Assessment m = m -> (Severity, String) Source #

Type of functions that convert a Metric into a log message.

warnOfMeasure :: (CodeFragment c, Metric m c) => Assessment m -> Proxy m -> Proxy c -> c -> Log Source #

Assessments of severity for used Metrics.

Module definition checks

Function definition checks

Number of lines of code within function body

Decision depth of function definition

Cyclomatic complexity of function definition

Type signature complexity

Type constructor depth in each type signature

Number of function arguments mentioned in each type signature

Data type complexity

Record fields count

Type class complexity

Method count of type class

Associated type count of type class

Computing and assessing Metrics for all CodeFragment.

metrics :: [Program -> Log] Source #

Compute all metrics, and assign severity depending on configured thresholds.