Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Threshold = Threshold {}
- type Coverage = Double
- type ThresholdEvaluationResult = (Threshold, Coverage, Bool)
- extractCoverage :: String -> ByteString -> Coverage
- evaluate :: String -> Threshold -> ThresholdEvaluationResult
- reportThreshold :: ThresholdEvaluationResult -> String
- evaluateAndReport :: String -> [Threshold] -> (String, Bool)
Documentation
Data structure for a single threshold configuration.
type ThresholdEvaluationResult = (Threshold, Coverage, Bool) Source #
The result of evaluation. The _3 indicates whether the coverage passes the threshold or not.
:: String | The input string |
-> ByteString | The regex to extract the coverage. The regex should contain `(\d+)` capture otherwise the coverage is always be 0. |
-> Coverage | The extracted coverage |
Extract the coverage from input string using a regex string
evaluate :: String -> Threshold -> ThresholdEvaluationResult Source #
Evaluate the given string against the given threshold, producing an evaluation result
reportThreshold :: ThresholdEvaluationResult -> String Source #
Produce a human-friendly output of the evaluation result