trustwallet-assets/script/main/check.ts
Adam R b5384bb9e6
[internal] Infra for errors and warnings. (#3590)
* Infra for errors and warnings.

* Most allowlist/denylist consistency errors are warnings only.

* Adapt danger to errors+wranings.

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
2020-08-24 17:06:21 +02:00

32 lines
711 B
TypeScript

import { sanityCheckAll, consistencyCheckAll } from "../action/update-all";
export async function main() {
var returnCode: number = 0;
try {
const [errors1, warnings1] = await sanityCheckAll();
// warnings ignored
if (errors1.length > 0) {
returnCode = errors1.length;
}
} catch(err) {
console.error(err);
returnCode = 1;
}
try {
const [errors1, warnings1] = await consistencyCheckAll();
// warnings ignored
if (errors1.length > 0) {
returnCode = errors1.length;
}
} catch(err) {
console.error(err);
returnCode = 1;
}
process.exit(returnCode);
}
main();