-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for prototype comments in separate job (#59862)
- Loading branch information
1 parent
15bf05a
commit ea11177
Showing
3 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<# | ||
Checks that TODO and PROTOTYPE comments are not present. | ||
#> | ||
|
||
# Verify no PROTOTYPE marker left in main | ||
Set-StrictMode -version 2.0 | ||
$ErrorActionPreference="Stop" | ||
if ($env:SYSTEM_PULLREQUEST_TARGETBRANCH -eq "main") { | ||
Write-Host "Checking no PROTOTYPE markers in source" | ||
$prototypes = Get-ChildItem -Path src, eng, scripts -Exclude *.dll,*.exe,*.pdb,*.xlf,todo-check.ps1 -Recurse | Select-String -Pattern 'PROTOTYPE' -CaseSensitive -SimpleMatch | ||
if ($prototypes) { | ||
Write-Host "Found PROTOTYPE markers in source:" | ||
Write-Host $prototypes | ||
throw "PROTOTYPE markers disallowed in compiler source" | ||
} | ||
} | ||
|
||
# Verify no TODO2 marker left | ||
$prototypes = Get-ChildItem -Path src, eng, scripts -Exclude *.dll,*.exe,*.pdb,*.xlf,todo-check.ps1 -Recurse | Select-String -Pattern 'TODO2' -CaseSensitive -SimpleMatch | ||
if ($prototypes) { | ||
Write-Host "Found TODO2 markers in source:" | ||
Write-Host $prototypes | ||
throw "TODO2 markers disallowed in compiler source" | ||
} | ||
|