diff --git a/scripts/check-code-health.mjs b/scripts/check-code-health.mjs index 6516d2f..45f55b6 100644 --- a/scripts/check-code-health.mjs +++ b/scripts/check-code-health.mjs @@ -101,7 +101,7 @@ function checkFormat() { const observed = { files: report.summary.errors }; log(`TypeScript format debt: ${observed.files} files.`); // Ratcheted legacy debt: https://github.com/Significant-Hobbies/motion/issues/26 - failRegressions("TypeScript format", observed, { files: 19 }); + failRegressions("TypeScript format", observed, { files: 0 }); } function checkCoverage() { @@ -168,9 +168,9 @@ function checkComplexity() { ); // Ratcheted legacy debt: https://github.com/Significant-Hobbies/motion/issues/26 failRegressions("Complexity", observed, { - violations: 6, + violations: 3, maxCcn: 22, - maxLength: 189, + maxLength: 180, maxParams: 7, }); } @@ -208,9 +208,9 @@ function checkDuplication() { ); // Ratcheted legacy debt: https://github.com/Significant-Hobbies/motion/issues/26 failRegressions("Duplication", observed, { - clones: 7, - duplicatedLines: 102, - percentage: 0.8814379536812997, + clones: 5, + duplicatedLines: 65, + percentage: 0.5543237250554324, }); } diff --git a/scripts/check-landing.mjs b/scripts/check-landing.mjs index 1fac9a6..9135e47 100644 --- a/scripts/check-landing.mjs +++ b/scripts/check-landing.mjs @@ -37,22 +37,24 @@ const [ ai, sourceLogo, publicLogo, -] = - await Promise.all([ - readFile(path.join(landing, "index.html"), "utf8"), - readFile(path.join(landing, "changelog.html"), "utf8"), - readFile(path.join(landing, "privacy.html"), "utf8"), - readFile(path.join(landing, "styles.css"), "utf8"), - readFile(path.join(landing, "llms.txt"), "utf8"), - readFile(path.join(landing, "index.md"), "utf8"), - readFile(path.join(landing, "_redirects"), "utf8"), - readFile(path.join(landing, "sitemap.xml"), "utf8"), - readFile(path.join(landing, "api/ai.json"), "utf8").then(JSON.parse), - readFile(path.join(root, "web/public/motion-logo.png")), - readFile(path.join(landing, "assets/motion-logo.png")), - ]); +] = await Promise.all([ + readFile(path.join(landing, "index.html"), "utf8"), + readFile(path.join(landing, "changelog.html"), "utf8"), + readFile(path.join(landing, "privacy.html"), "utf8"), + readFile(path.join(landing, "styles.css"), "utf8"), + readFile(path.join(landing, "llms.txt"), "utf8"), + readFile(path.join(landing, "index.md"), "utf8"), + readFile(path.join(landing, "_redirects"), "utf8"), + readFile(path.join(landing, "sitemap.xml"), "utf8"), + readFile(path.join(landing, "api/ai.json"), "utf8").then(JSON.parse), + readFile(path.join(root, "web/public/motion-logo.png")), + readFile(path.join(landing, "assets/motion-logo.png")), +]); -assert.match(html, /Changelog — Motion<\/title>/); assert.equal((changelog.match(/)/g) ?? []).length, 1); -assert.equal((changelog.match(/