Skip to content
Snippets Groups Projects

check Nushell files in the CI

Merged STEVAN Antoine requested to merge check-nushell-files into main
2 files
+ 50
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 49
0
let files = [
[name, is_module, ignore, reason];
[bins/inbreeding, true, false, null],
[.nushell, true, false, null],
[tests/cli.nu, false, false, null],
[tests/binary.nu, false, false, null],
[tests/color.nu, false, false, null],
[examples/cli.nu, false, false, null],
[komodo.nu, false, false, null],
[benchmarks/.nushell/commit/run.nu, false, false, null],
[benchmarks/.nushell/fec/run.nu, false, true, "fails for some reason..."],
[benchmarks/.nushell/recoding/run.nu, false, true, "fails for some reason..."],
[benchmarks/.nushell/setup/run.nu, false, false, null],
[benchmarks/.nushell/commit/plot.nu, false, false, null],
[benchmarks/.nushell/fec/plot.nu, false, false, null],
[benchmarks/.nushell/recoding/plot.nu, false, false, null],
[benchmarks/.nushell/setup/plot.nu, false, false, null],
]
for f in $files {
let path = $env.FILE_PWD | path dirname | path join $f.name
if $f.ignore {
print $"ignore ($f.name): ($f.reason)"
continue
}
try {
if $f.is_module {
nu-check $path --debug --as-module
} else {
nu-check $path --debug
}
} catch { |e|
let err = $e.debug
| ansi strip
| parse '{foo}msg: "Found : {msg}", span: {bar}'
| into record
| get msg
error make --unspanned {
msg: ([
$"($e.msg):",
$" file: ($f.name)",
$" err: ($err)",
] | str join "\n")
}
}
}
Loading