<commit_before>package hmda.validation.engine.lar

import hmda.model.fi.lar.LoanApplicationRegister
import hmda.model.institution.Institution
import hmda.validation.context.ValidationContext
import hmda.validation.engine.lar.syntactical.LarSyntacticalEngine
import hmda.validation.engine.lar.validity.LarValidityEngine
import hmda.validation.engine.lar.quality.LarQualityEngine

import scalaz._
import Scalaz._

trait LarEngine extends LarSyntacticalEngine with LarValidityEngine with LarQualityEngine {

  def validateLar(lar: LoanApplicationRegister, ctx: ValidationContext): LarValidation = {
    (
      checkSyntactical(lar, ctx) |@|
      checkValidity(lar, ctx) |@|
      checkQuality(lar, ctx)
    )((_, _, _) => lar)

  }

  // FIXME: This is not actually used anywhere!  These should really be "macro" edits!
  def validateLars(lars: Iterable[LoanApplicationRegister]): LarsValidation = {
    checkSyntacticalCollection(lars)
  }

}<commit_msg>Replaced FIXME comment with #474<commit_after>package hmda.validation.engine.lar

import hmda.model.fi.lar.LoanApplicationRegister
import hmda.model.institution.Institution
import hmda.validation.context.ValidationContext
import hmda.validation.engine.lar.syntactical.LarSyntacticalEngine
import hmda.validation.engine.lar.validity.LarValidityEngine
import hmda.validation.engine.lar.quality.LarQualityEngine

import scalaz._
import Scalaz._

trait LarEngine extends LarSyntacticalEngine with LarValidityEngine with LarQualityEngine {

  def validateLar(lar: LoanApplicationRegister, ctx: ValidationContext): LarValidation = {
    (
      checkSyntactical(lar, ctx) |@|
      checkValidity(lar, ctx) |@|
      checkQuality(lar, ctx)
    )((_, _, _) => lar)

  }

  def validateLars(lars: Iterable[LoanApplicationRegister]): LarsValidation = {
    checkSyntacticalCollection(lars)
  }

}
{'fraction_non_alphanumeric': 0.09130434782608696, 'fraction_numerical': 0.0016304347826086956, 'mean_word_length': 5.348275862068966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5712591', 'n_tokens_mistral': 588, 'n_tokens_neox': 566, 'n_words': 105}