aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/validity/PreGenerationChecker.kt
blob: 52e790461711a4a6e85c6a7c58a8bffdd95a4826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package org.jetbrains.dokka.validity

fun interface PreGenerationChecker : () -> PreGenerationCheckerOutput {

    override fun invoke(): PreGenerationCheckerOutput
}

data class PreGenerationCheckerOutput(val result: Boolean, val messages: List<String>) {

    operator fun plus(pair: Pair<Boolean, List<String>>) =
        Pair(result && pair.first, messages + pair.second)
}