forked from mtusi2026/mtusi2026lab7
Prepare verified laboratory 7 implementation and evidence
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { root, run, requireThat, safeFailure } from "./runtime";
|
||||
try {
|
||||
const files: string[] = [];
|
||||
for (const dir of ["scripts", "student-tests", "infra", "config"]) {
|
||||
const glob = new Bun.Glob("**/*");
|
||||
for await (const file of glob.scan({
|
||||
cwd: root + "/" + dir,
|
||||
onlyFiles: true,
|
||||
}))
|
||||
if (/\.(ts|json|yaml)$/.test(file)) files.push(dir + "/" + file);
|
||||
}
|
||||
const mode = Bun.argv.includes("--write") ? [] : ["--check"];
|
||||
await run([process.execPath, "fmt", ...mode, ...files]);
|
||||
console.log(
|
||||
mode.length
|
||||
? "PASS_NATIVE_FORMAT_NONWRITING_CHECK"
|
||||
: "FORMATTED_OWNED_IMPLEMENTATION_FILES",
|
||||
);
|
||||
} catch (e) {
|
||||
safeFailure(e);
|
||||
}
|
||||
Reference in New Issue
Block a user