feat: fail on consistency issues

wip-related-pages
sebastien.arod@gmail.com 2024-06-06 15:19:30 +02:00
parent 5bbfd14abf
commit 7f58f45814
2 changed files with 2 additions and 13 deletions

View File

@ -46,19 +46,6 @@ function checkFamilyDataConsistency(family: Famille) {
issueType: "startResistsant > endResistant ",
});
}
} else {
if (family.Integration !== null) {
consistencyIssues.push({
familyId: family.Titre,
issueType: family.Statut + " with startResistant",
});
}
if (family.Sortie !== null) {
consistencyIssues.push({
familyId: family.Titre,
issueType: family.Statut + " with endResistant",
});
}
}
consistencyIssues.push(
...family.Evenements.filter((e) => !isValidEvenementFamille(e.Type)).map(

View File

@ -25,6 +25,8 @@ import { computeELStats } from "./statistiques/computeELStats";
if (consistencyIssues.length > 0) {
console.log("Found consistency issues:");
console.log(consistencyIssues);
console.log("Exiting.");
process.exit(1);
}
const currentDate = new Date(Date.now());