ShiboSoftwareDev/linux-gameboy-advance
A multilayer PCB carrier board routing the MCU, USB‑C, battery/AA power selector and TPS63020 regulator, LCD/SD interfaces, UART/I²C/SPI service headers, controls, audio/status LEDs, and backlight with reviewed traces and vias.
- Version
- 1.0.125
- License
- unset
- Stars
- 0
scripts/check-schematic-style.mjs
import { spawnSync } from "node:child_process"
import { fileURLToPath } from "node:url"
const projectDirectory = fileURLToPath(new URL("../", import.meta.url))
const result = spawnSync("tsci", ["check", "schematic-placement", "index.circuit.tsx"], {
cwd: projectDirectory,
encoding: "utf8",
maxBuffer: 16 * 1024 * 1024,
})
if (result.error) throw result.error
if (result.status !== 0) {
process.stdout.write(result.stdout)
process.stderr.write(result.stderr)
throw new Error(`schematic-placement check exited ${result.status}`)
}
const report = `${result.stdout}\n${result.stderr}`
if (/<SchematicPlacementIssues>/.test(report)) {
process.stdout.write(report)
throw new Error("schematic style analysis found placement issues")
}
console.log("[schematic] 0 placement/style issues")