From 84819f5cae4c9d71a32cfce645ab72920d55fecf Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 5 Sep 2022 11:03:41 +0100 Subject: [PATCH] Add sanity check for clocks calling loadWidgets before setUI --- bin/sanitycheck.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index cf66a52eb..13b000228 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -225,6 +225,13 @@ apps.forEach((app,appIdx) => { console.log("====================================================="); ERROR(`App ${app.id}'s ${file.name} is a JS file but isn't valid JS`, {file:appDirRelative+file.url}); } + // clock app checks + if (app.type=="clock") { + var a = fileContents.indexOf("Bangle.loadWidgets()"); + var b = fileContents.indexOf("Bangle.setUI("); + if (a>=0 && b>=0 && a