-
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (30 loc) · 839 Bytes
/
Copy pathvalidate.yml
File metadata and controls
33 lines (30 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Validate PowerShell and XAML
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Parse PowerShell
shell: pwsh
run: |
$errors = @()
Get-ChildItem -Recurse -Include *.ps1,*.psm1 | ForEach-Object {
$tokens = $null
$parseErrors = $null
[System.Management.Automation.Language.Parser]::ParseFile($_.FullName, [ref]$tokens, [ref]$parseErrors) > $null
$errors += $parseErrors
}
if ($errors.Count -gt 0) {
$errors | Format-List
exit 1
}
- name: Validate XAML control bindings
shell: pwsh
run: ./tests/Validate-XamlBindings.ps1