Skip to content

Commit d784748

Browse files
committed
Copy YML script to a ps1 file and run it to catch all syntax errors instead of relying on PR build to find them one at a time
1 parent 4281fe2 commit d784748

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ jobs:
2828
& git clang-format origin/master --binary "$env:CLANG_FORMAT" --style file -- cppwinrt/*.h cppwinrt/*.cpp fast_fwd/*.h fast_fwd/*.cpp prebuild/*.h prebuild/*.cpp scratch/*.h scratch/*.cpp strings/*.h strings/*.cpp test/*.h test/*.cpp vsix/*.h vsix/*.cpp
2929
3030
if ($LASTEXITCODE -ne 0) {
31-
Write-Host ::error ERROR: This branch contains changes that have not been formatted with 'clang-format'
32-
Write-Host NOTE: To resolve this issue, you can run 'clang-format' in the following ways:
33-
Write-Host * Run `build_test_all.cmd` which will run 'clang-format' on _all_ source files. This script is
34-
Write-Host simpler to run, however there's a chance it may touch additional files you never changed due to you having
35-
Write-Host a mis-matched version of 'clang-format'. This may require you to manually revert changes made by
36-
Write-Host 'clang-format' to the locations where you made no code changes.
31+
Write-Host ::error ERROR: This branch contains changes that have not been formatted with `'clang-format`'
32+
Write-Host NOTE: To resolve this issue, you can run `'clang-format`' in the following ways:
33+
Write-Host * Run ``build_test_all.cmd`` which will run `'clang-format`' on _all_ source files. This script is
34+
Write-Host simpler to run, however there`'s a chance it may touch additional files you never changed due to you having
35+
Write-Host a mis-matched version of `'clang-format`'. This may require you to manually revert changes made by
36+
Write-Host `'clang-format`' to the locations where you made no code changes.
3737
Write-Host
3838
Write-Host For more information, please see https://github.com/microsoft/cppwinrt?tab=readme-ov-file#formatting
3939
Write-Host
40-
Write-Host NOTE: As an additional note, given that different versions of 'clang-format' may have different behaviors, this
41-
Write-Host may be a false positive. If you believe that to be the case ^(e.g. none of the above resulted in modifications
42-
Write-Host to the code you have changed^), please note this in your PR.
40+
Write-Host NOTE: As an additional note, given that different versions of `'clang-format`' may have different behaviors, this
41+
Write-Host may be a false positive. If you believe that to be the case ^`(e.g. none of the above resulted in modifications
42+
Write-Host to the code you have changed^`), please note this in your PR.
4343
exit /b 1
4444
}
4545

0 commit comments

Comments
 (0)