Skip to content
Snippets Groups Projects
Verified Commit ae305719 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

update check script

parent a198f8b9
No related branches found
No related tags found
1 merge request!137check Nushell files in the CI
let files = [ let files = ^git lf | lines | where { ($in | path parse).extension == "nu" }
[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 { for f in $files {
let path = $env.FILE_PWD | path dirname | path join $f.name let path = $env.FILE_PWD | path dirname | path join $f
if $f.ignore {
print $"ignore ($f.name): ($f.reason)"
continue
}
try { try {
if $f.is_module { nu-check $path --debug
nu-check $path --debug --as-module
} else {
nu-check $path --debug
}
} catch { |e| } catch { |e|
let err = $e.debug let err = $e.debug
| ansi strip | ansi strip
| parse '{foo}msg: "Found : {msg}", span: {bar}' | parse --regex '(.*)msg: "Found : (?<msg>.*)", span: (?<span>.*)'
| into record | into record
| get msg
error make --unspanned { error make --unspanned {
msg: ([ msg: ([
$"($e.msg):", $"($e.msg):",
$" file: ($f.name)", $" file: ($f)",
$" err: ($err)", $" err: ($err.msg)",
] | str join "\n") ] | str join "\n")
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment