homplexity-0.4.8.1: Haskell code quality tool
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.Homplexity.Assessment

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

data HFlag_moduleLinesWarning Source #

Instances

Instances details
Flag HFlag_moduleLinesWarning Source # 
Instance details

Defined in Language.Haskell.Homplexity.Assessment

Function definition checks

Number of lines of code within function body

Decision depth of function definition

Cyclomatic complexity of function definition

data HFlag_functionCCWarning Source #

Instances

Instances details
Flag HFlag_functionCCWarning Source # 
Instance details

Defined in Language.Haskell.Homplexity.Assessment

Methods

getFlagData :: HFlag_functionCCWarning -> FlagData

data HFlag_functionCCCritical Source #

Instances

Instances details
Flag HFlag_functionCCCritical Source # 
Instance details

Defined in Language.Haskell.Homplexity.Assessment

Type signature complexity

Type constructor depth in each type signature

Number of function arguments mentioned in each type signature

data HFlag_numFunArgsWarning Source #

Instances

Instances details
Flag HFlag_numFunArgsWarning Source # 
Instance details

Defined in Language.Haskell.Homplexity.Assessment

Methods

getFlagData :: HFlag_numFunArgsWarning -> FlagData

data HFlag_numFunArgsCritical Source #

Instances

Instances details
Flag HFlag_numFunArgsCritical Source # 
Instance details

Defined in Language.Haskell.Homplexity.Assessment

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.