File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -530,6 +530,8 @@ foreach ($url in $urls) {
530530
531531LogGroupStart " Link checking details"
532532
533+ $originalcheckLinkGuidance = $checkLinkGuidance
534+
533535while ($pageUrisToCheck.Count -ne 0 )
534536{
535537 $pageUri = $pageUrisToCheck.Dequeue ();
@@ -538,6 +540,11 @@ while ($pageUrisToCheck.Count -ne 0)
538540 if ($checkedPages.ContainsKey ($pageUri )) { continue }
539541 $checkedPages [$pageUri ] = $true ;
540542
543+ # copilot instructions require the use of relative links which is against our general guidance
544+ # but we mainly care about those guidelines for docs publishing and not copilot instructions
545+ # so we can disable the guidelines while validating copilot instruction files.
546+ if ($pageUri -match " instructions.md$" ) { $checkLinkGuidance = $false }
547+
541548 [string []] $linkUris = GetLinks $pageUri
542549 Write-Host " Checking $ ( $linkUris.Count ) links found on page $pageUri " ;
543550 $badLinksPerPage = @ ();
@@ -561,6 +568,8 @@ while ($pageUrisToCheck.Count -ne 0)
561568 } catch {
562569 Write-Host " Exception encountered while processing pageUri $pageUri : $ ( $_.Exception ) "
563570 throw
571+ } finally {
572+ $checkLinkGuidance = $originalcheckLinkGuidance
564573 }
565574}
566575
You can’t perform that action at this time.
0 commit comments