From b89437e1beafe356433c063c2f10f1ef71dbc590 Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Sun, 9 Aug 2026 23:41:38 -0400 Subject: [PATCH 1/5] Check for widget ids starting with 'wid' --- bin/sanitycheck.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index d997ee2ff31..28c6d0519df 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -250,6 +250,7 @@ apps.forEach((app,appIdx) => { } if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile}); if (!app.icon) ERROR(`App ${app.id} has no icon`, {file:metadataFile}); + if (app.type == "widget" && !app.id.hasPrefix("wid") ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); if (!fs.existsSync(appDir+app.icon)) ERROR(`App ${app.id} icon doesn't exist`, {file:metadataFile}); if (app.screenshots) { if (!Array.isArray(app.screenshots)) ERROR(`App ${app.id} screenshots is not an array`, {file:metadataFile}); From b3adbd767bd208bdd335cd9439483ff1c4908324 Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Sun, 9 Aug 2026 23:43:41 -0400 Subject: [PATCH 2/5] Add clockInfo id check --- bin/sanitycheck.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 28c6d0519df..8a8bd7ef0df 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -251,6 +251,7 @@ apps.forEach((app,appIdx) => { if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile}); if (!app.icon) ERROR(`App ${app.id} has no icon`, {file:metadataFile}); if (app.type == "widget" && !app.id.hasPrefix("wid") ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); + if (app.type == "clkinfo" && !app.id.hasPrefix("clkinfo") ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); if (!fs.existsSync(appDir+app.icon)) ERROR(`App ${app.id} icon doesn't exist`, {file:metadataFile}); if (app.screenshots) { if (!Array.isArray(app.screenshots)) ERROR(`App ${app.id} screenshots is not an array`, {file:metadataFile}); From 22fff7e26817d9739b5026e830677446b643269e Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Sun, 9 Aug 2026 23:44:59 -0400 Subject: [PATCH 3/5] Fixed syntax error --- bin/sanitycheck.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 8a8bd7ef0df..fc9f8168a5a 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -250,8 +250,8 @@ apps.forEach((app,appIdx) => { } if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile}); if (!app.icon) ERROR(`App ${app.id} has no icon`, {file:metadataFile}); - if (app.type == "widget" && !app.id.hasPrefix("wid") ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); - if (app.type == "clkinfo" && !app.id.hasPrefix("clkinfo") ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); + if (app.type == "widget" && !app.id.hasPrefix("wid")) ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); + if (app.type == "clkinfo" && !app.id.hasPrefix("clkinfo")) ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); if (!fs.existsSync(appDir+app.icon)) ERROR(`App ${app.id} icon doesn't exist`, {file:metadataFile}); if (app.screenshots) { if (!Array.isArray(app.screenshots)) ERROR(`App ${app.id} screenshots is not an array`, {file:metadataFile}); From 50623c859fc07d19d1f5e3f3cd762e6a8941d9ab Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Sun, 9 Aug 2026 23:45:57 -0400 Subject: [PATCH 4/5] Fix method name from hasPrefix to startsWith --- bin/sanitycheck.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index fc9f8168a5a..157f412575e 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -250,8 +250,8 @@ apps.forEach((app,appIdx) => { } if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile}); if (!app.icon) ERROR(`App ${app.id} has no icon`, {file:metadataFile}); - if (app.type == "widget" && !app.id.hasPrefix("wid")) ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); - if (app.type == "clkinfo" && !app.id.hasPrefix("clkinfo")) ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); + if (app.type == "widget" && !app.id.startsWith("wid")) ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); + if (app.type == "clkinfo" && !app.id.startsWith("clkinfo")) ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); if (!fs.existsSync(appDir+app.icon)) ERROR(`App ${app.id} icon doesn't exist`, {file:metadataFile}); if (app.screenshots) { if (!Array.isArray(app.screenshots)) ERROR(`App ${app.id} screenshots is not an array`, {file:metadataFile}); From 968dad3433316f52665de11591a69e25a367adc3 Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Mon, 10 Aug 2026 00:11:18 -0400 Subject: [PATCH 5/5] Add ID naming exceptions for widget and clkinfo apps --- bin/sanitycheck.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 157f412575e..2a578ac7366 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -183,6 +183,7 @@ const INTERNAL_FILES_IN_APP_TYPE = { // list of app types and files they SHOULD 'textinput' : ['textinput'], // notify? }; +const ID_NAMING_EXCEPTIONS = ["1button", "airqualityci", "banglebridge", "chimer", "f3bluemoon", "gbridge", "gpsautotime", "gpstimeserver", "grandfatherclock", "hralarm", "hwid_a_battery_widget", "lightswitch", "openseizure", "rndmclk", "sleeplogalarm", "worldclkinfo"]; function globToRegex(pattern) { const ESCAPE = '.*+-?^${}()|[]\\'; @@ -250,8 +251,8 @@ apps.forEach((app,appIdx) => { } if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile}); if (!app.icon) ERROR(`App ${app.id} has no icon`, {file:metadataFile}); - if (app.type == "widget" && !app.id.startsWith("wid")) ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); - if (app.type == "clkinfo" && !app.id.startsWith("clkinfo")) ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); + if (app.type == "widget" && !app.id.startsWith("wid") && !ID_NAMING_EXCEPTIONS.includes(app.id)) ERROR(`Widget app ${app.id} id does not start with 'wid'`, {file:metadataFile}); + if (app.type == "clkinfo" && !app.id.startsWith("clkinfo") && !ID_NAMING_EXCEPTIONS.includes(app.id)) ERROR(`ClockInfo app ${app.id} id does not start with 'clkinfo'`, {file:metadataFile}); if (!fs.existsSync(appDir+app.icon)) ERROR(`App ${app.id} icon doesn't exist`, {file:metadataFile}); if (app.screenshots) { if (!Array.isArray(app.screenshots)) ERROR(`App ${app.id} screenshots is not an array`, {file:metadataFile});