try to make less com autoreports

This commit is contained in:
Thibault Duplessis 2016-12-07 00:59:04 +01:00
parent ae39e8f048
commit 27c83f9ec4

View file

@ -47,7 +47,7 @@ case class TextReport(textType: TextType, ratios: List[Double]) {
def minRatios = textType.rotation / 15
def nbBad = ratios.count(_ > TextReport.unacceptableRatio)
def tolerableNb = (ratios.size / 10) max 3
def tolerableNb = (ratios.size / 10) atLeast 4
def unacceptable = (ratios.size >= minRatios) && (nbBad > tolerableNb)
}