Skip to content

Commit 4ccc536

Browse files
author
Robin Stolpe
committed
update
1 parent 899f422 commit 4ccc536

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

RSModuleBuilder.ps1

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,25 +151,25 @@ $ResultPSDPSM = foreach ($file in $CheckPSA) {
151151

152152
# Import the module and save the Get-Help files to the $HelpPath for the module, files get saved in .md format
153153
Write-Verbose "Importing $($ModuleName) to the session..."
154-
#Import-Module -Name $($ModuleFolderPath) -MinimumVersion $Version -Force
154+
Import-Module -Name $($ModuleFolderPath) -MinimumVersion $Version -Force
155155

156156
Write-Verbose "Writing $($ModuleName) functions to help files in $($HelpPath)..."
157-
#$mCommands = Get-Command -Module $ModuleName
158-
#foreach ($m in $mCommands) {
159-
# if ($null -ne $m) {
160-
# Write-Verbose "Creating help file of function $($m.Name)..."
161-
# Get-Help -name $m.Name -Full | Out-File -Encoding UTF8BOM -FilePath $(Join-Path -Path $HelpPath -ChildPath "$($m.Name).md")
162-
# }
163-
#}
157+
$mCommands = Get-Command -Module $ModuleName
158+
foreach ($m in $mCommands) {
159+
if ($null -ne $m) {
160+
Write-Verbose "Creating help file of function $($m.Name)..."
161+
Get-Help -name $m.Name -Full | Out-File -Encoding UTF8BOM -FilePath $(Join-Path -Path $HelpPath -ChildPath "$($m.Name).md")
162+
}
163+
}
164164

165-
Write-Output "`n== Summery of PSScriptAnalyzer =="
166-
$ResultPS1
167-
$ResultPSDPSM
165+
#Write-Output "`n== Summery of PSScriptAnalyzer =="
166+
#$ResultPS1
167+
#$ResultPSDPSM
168168

169-
if ($ResultPS1.Severity -contains "Warning" -or $ResultPSM.Severity -contains "Warning") {
170-
Write-Error "PSAnalyzer severity did contain Warning, please fix this and run the RSModuleBuilder again. You can se the results from PSScriptAnalyzer below."
171-
Break
172-
}
169+
#if ($ResultPS1.Severity -contains "Warning" -or $ResultPSM.Severity -contains "Warning") {
170+
# Write-Error "PSAnalyzer severity did contain Warning, please fix this and run the RSModuleBuilder again. You can se the results from PSScriptAnalyzer below."
171+
# Break
172+
#}
173173

174174
# Add so it check if it has any other flags in the analyzer then just inform about it.
175175

0 commit comments

Comments
 (0)