From 0cb6ec17f5eb7e90a759a716a561758c26795487 Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Fri, 21 Apr 2023 11:22:43 +0800 Subject: [PATCH] Fix the issue when checking help examples in CI pipeline (#21620) * update * update --- .ci-config.json | 2 +- .../StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci-config.json b/.ci-config.json index 6aff884ffc49..a68d381c8226 100644 --- a/.ci-config.json +++ b/.ci-config.json @@ -89,7 +89,7 @@ "phases": [ "build:module", "help:module", - "example:module" + "help-example:module" ] }, { diff --git a/tools/StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 b/tools/StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 index ef2d69283e9d..7312d01607eb 100644 --- a/tools/StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 +++ b/tools/StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 @@ -72,7 +72,7 @@ if ($PSCmdlet.ParameterSetName -eq "Markdown") { } foreach ($_ in Get-ChildItem $MarkdownPath -Recurse:$Recurse) { # Filter the .md of overview in "\help\" - if ((Get-Item -Path $_.FullName).Directory.Name -eq "help" -and $_.FullName -cmatch ".*\.md" -and $_.BaseName -cmatch "^[A-Z][a-z]+-([A-Z][a-z0-9]*)+$") { + if (((Get-Item -Path $_.FullName).Directory.Name -eq "help" -or (Get-Item -Path $_.FullName).Directory.Name -eq "docs") -and $_.FullName -cmatch ".*\.md" -and $_.BaseName -cmatch "^[A-Z][a-z]+-([A-Z][a-z0-9]*)+$") { if ((Get-Item -Path $_.FullName).Directory.Parent.Name -eq "netcoreapp3.1") { continue }