Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Commit

Permalink
Merged PR 939: Updated ADO warning/error mark up in validatedocs.ps1
Browse files Browse the repository at this point in the history
Related work items: #1018
  • Loading branch information
macborow committed Oct 7, 2021
1 parent b823f8c commit 9a9ea48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/scripts/validatedocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ function CheckDocLinks {
$AllowedUrlsFound += ($AllowedUrls | Where-Object { $CurrentLine -match $_ })
if ($AllowedUrlsFound.Length -gt 0)
{
Write-Host -ForegroundColor Yellow "##[warning] An non-relative doc link(s) found in $FileName at line $LineNumber should be reviewed ($AllowedUrlsFound)"
Write-Host -ForegroundColor Yellow "##vso[task.logissue type=warning;sourcepath=$FileName;linenumber=$LineNumber;] An non-relative doc link(s) found in $FileName at line $LineNumber should be reviewed ($AllowedUrlsFound)"
Write-Host -ForegroundColor Yellow "This URL was temporarily allowed as an exception but it should be removed when no longer needed."
Write-Host -ForegroundColor Yellow "Avoid doc links containing https://microsoft.github.io/MixedReality-UXTools-Unreal "
Write-Host -ForegroundColor Yellow "and use relative links instead."
$AllowedUrlsFound | ForEach-Object { $CurrentLine = $CurrentLine -replace $_,"" }
}
if ($CurrentLine -match "https://microsoft.github.io/MixedReality-UXTools-Unreal") {
Write-Host -ForegroundColor Red "##[error] An non-relative doc link was found in $FileName at line $LineNumber "
Write-Host -ForegroundColor Red "##vso[task.logissue type=error;sourcepath=$FileName;linenumber=$LineNumber;] An non-relative doc link was found in $FileName at line $LineNumber "
Write-Host -ForegroundColor Red "Avoid doc links containing https://microsoft.github.io/MixedReality-UXTools-Unreal "
Write-Host -ForegroundColor Red "and use relative links instead."
$true;
Expand Down

0 comments on commit 9a9ea48

Please sign in to comment.