Skip to content

Excise Python port: alibi is now PowerShell-only; port moved to Sutai… #22

Excise Python port: alibi is now PowerShell-only; port moved to Sutai…

Excise Python port: alibi is now PowerShell-only; port moved to Sutai… #22

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
jobs:
powershell:
name: powershell parse-check
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Parse-check every .ps1
shell: pwsh
run: |
$files = Get-ChildItem -Path alibi-engine/scanner -Recurse -Filter '*.ps1' -ErrorAction SilentlyContinue
$hadError = $false
foreach ($f in $files) {
$tokens = $null; $errors = $null
[System.Management.Automation.Language.Parser]::ParseFile($f.FullName, [ref]$tokens, [ref]$errors) | Out-Null
if ($errors.Count -gt 0) {
Write-Host ("FAIL {0}" -f $f.FullName) -ForegroundColor Red
$errors | ForEach-Object { Write-Host (" line {0}: {1}" -f $_.Extent.StartLineNumber, $_.Message) }
$hadError = $true
} else {
Write-Host ("ok {0}" -f $f.FullName)
}
}
if ($hadError) { exit 1 }