package com.correx.core.validation.semantic

import com.correx.core.validation.model.ValidationContext
import com.correx.core.validation.model.ValidationSection
import com.correx.core.validation.pipeline.Validator

class SemanticValidator(
    private val rules: List<SemanticRule>
) : Validator {

    override suspend fun validate(context: ValidationContext): ValidationSection {

        val issues = rules.flatMap { it.validate(context) }

        return ValidationSection(
            name = "semantic",
            issues = issues
        )
    }
}
