Add UTF-8 BOM to PowerShell files with non-ASCII characters (#2195)
### ❔What, Why & How PSScriptAnalyzer CI fails with: ``` Exception getting "Line": "The property 'StartLineNumber' cannot be found on this object." ``` Two files contain non-ASCII characters (box-drawing `├│└`, em-dash `—`) without UTF-8 BOM. This triggers `PSUseBOMForUnicodeEncodedFile`, a file-level rule that emits diagnostic records with no `Line` property — crashing `ConvertTo-SARIF` when it accesses `$this.Extent.StartLineNumber`. - Added UTF-8 BOM to `Tests/CompileFromWorkspace.Test.ps1` and `e2eTests/scenarios/WorkspaceCompilation/runtest.ps1`, consistent with all other `.ps1`/`.psm1` files in the repo that contain non-ASCII content. ### ✅ Checklist - [ ] Add tests (E2E, unit tests) - [ ] Update RELEASENOTES.md - [ ] Update documentation (e.g. for new settings or scenarios) - [ ] Add telemetry Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
C
Copilot committed
f52a0cff32aa7948ed39a06be222845fc6125c05
Parent: 189c881
Committed by GitHub <noreply@github.com>
on 4/7/2026, 9:08:25 AM