trustwallet-assets/dangerfile.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

11 lines
516 B
TypeScript

import { fail, warn, markdown } from "danger";
import { sanityCheckAll } from "./script/action/update-all";
sanityCheckAll().then(([errors, warnings]) => {
errors.forEach(err => fail(err));
warnings.forEach(err => warn(err));
if (errors.length > 0 || warnings.length > 0 {
markdown("Please fix the errors/warnings above. Files can be replaced/renamed in this pull request (using command-line, or GitHub Desktop). Alternatively, you may close this pull request and open a new one.");
}
});