|
| 1 | +local fs = require("@std/fs") |
| 2 | +local net = require("@lute/net") |
| 3 | +local process = require("@lute/process") |
| 4 | + |
| 5 | +process.run({ "rojo", "sourcemap", "--output=sourcemap.json" }, { stdio = "inherit" }) |
| 6 | + |
| 7 | +fs.writestringtofile( |
| 8 | + "roblox.d.luau", |
| 9 | + net.request("https://luau-lsp.pages.dev/globalTypes.None.d.luau", { method = "GET" }).body |
| 10 | +) |
| 11 | + |
| 12 | +local analyze = process.run({ |
| 13 | + "luau-lsp", |
| 14 | + "analyze", |
| 15 | + "--sourcemap=sourcemap.json", |
| 16 | + "--ignore=**/generated/**", |
| 17 | + "--ignore=**/.pesde/**", |
| 18 | + -- FIXME: Not sure why luau-lsp reports errors at this specific path |
| 19 | + "--ignore=../../../../..", |
| 20 | + "--ignore=../../../../../..", |
| 21 | + "--base-luaurc=.luaurc", |
| 22 | + "--definitions=roblox.d.luau", |
| 23 | + "--flag:LuauSolverV2=true", |
| 24 | + "src", |
| 25 | +}, { stdio = "inherit" }) |
| 26 | + |
| 27 | +fs.remove("roblox.d.luau") |
| 28 | + |
| 29 | +local selene = process.run({ "selene", "src" }, { stdio = "inherit" }) |
| 30 | + |
| 31 | +local stylua = process.run({ "stylua", "--check", "src" }, { stdio = "inherit" }) |
| 32 | + |
| 33 | +if not (analyze.ok and selene.ok and stylua.ok) then |
| 34 | + process.exit(1) |
| 35 | +end |
0 commit comments