File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1556
1556
<Component Id="cmpC67F14F377421F1BCD74EC5A579D43CB" Guid="*">
1557
1557
<File Id="filE9553CEC1D67AB3D4B77759239D60B18" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.IotHub.dll-Help.xml" />
1558
1558
</Component>
1559
- <Component Id="cmpD844DA64698210481D550B5CD8799D26" Guid="*">
1560
- <File Id="filA23D9B350E9B87D17B90B2181AE71E4B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.IotHub.format.ps1xml" />
1561
- </Component>
1562
1559
<Component Id="cmp31610C192ED2776279BBDA3D9905552E" Guid="*">
1563
1560
<File Id="filB571C170B96736E7EE17BBF869A203A8" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.ResourceManager.Common.dll" />
1564
1561
</Component>
5842
5839
<ComponentRef Id="cmp9DFE8C2688F7DF1A3DFF20EFA59BF3B5" />
5843
5840
<ComponentRef Id="cmpE29D513714759F365A7C0A2A7F2B5DC6" />
5844
5841
<ComponentRef Id="cmpC67F14F377421F1BCD74EC5A579D43CB" />
5845
- <ComponentRef Id="cmpD844DA64698210481D550B5CD8799D26" />
5846
5842
<ComponentRef Id="cmp31610C192ED2776279BBDA3D9905552E" />
5847
5843
<ComponentRef Id="cmpB0A6B8E083FEAEC29D41F54189DC6605" />
5848
5844
<ComponentRef Id="cmpB2620706D83DB49D3434BB39A5495055" />
Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ function Validate-MarkdownHelp
118
118
if ($content [$idx + 1 ] -notcontains " ## SYNTAX" )
119
119
{
120
120
$idx ++
121
+ if ($idx -ge $content.Length )
122
+ {
123
+ Write-Error " Could not find SYNTAX header in file $ ( $file.Name ) "
124
+ return
125
+ }
121
126
}
122
127
elseif ($content [$idx ] -contains " {{Fill in the Synopsis}}" )
123
128
{
@@ -147,6 +152,11 @@ function Validate-MarkdownHelp
147
152
if ($content [$idx + 1 ] -notcontains " ## EXAMPLES" )
148
153
{
149
154
$idx ++
155
+ if ($idx -ge $content.Length )
156
+ {
157
+ Write-Error " Could not find EXAMPLES header in file $ ( $file.Name ) "
158
+ return
159
+ }
150
160
}
151
161
elseif ($content [$idx ] -contains " {{Fill in the Description}}" )
152
162
{
@@ -167,9 +177,14 @@ function Validate-MarkdownHelp
167
177
" ## EXAMPLES"
168
178
{
169
179
# Move the index to the start of the PowerShell code
170
- while ($content [$idx ] -notcontains " `````` " )
180
+ while ($content [$idx ] -notcontains " `````` " -and $content [ $idx ] -notcontains " `````` powershell " )
171
181
{
172
182
$idx ++
183
+ if ($idx -ge $content.Length )
184
+ {
185
+ Write-Error " Could not find start of PowerShell example in file $ ( $file.Name ) "
186
+ return
187
+ }
173
188
}
174
189
175
190
# Check for the platyPS example template
You can’t perform that action at this time.
0 commit comments