File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11@ {
2- Severity = @ {
3- PSAvoidUsingWriteHost = ' Warning'
4- PSUseDeclaredVarsMoreThanAssignments = ' Warning'
5- PSUseCorrectCasing = ' Warning'
6- PSProvideCommentHelp = ' Information'
2+ Rules = @ {
3+ PSAvoidUsingWriteHost = @ {
4+ Severity = ' Warning'
5+ }
6+ PSUseDeclaredVarsMoreThanAssignments = @ {
7+ Severity = ' Warning'
8+ }
9+ PSUseCorrectCasing = @ {
10+ Severity = ' Warning'
11+ }
12+ PSProvideCommentHelp = @ {
13+ Severity = ' Information'
14+ }
715 }
816}
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -40,11 +40,22 @@ function New-AnalyzerSettings {
4040 # Default analyzer configuration
4141 $content = @'
4242@{
43- Severity = @{
44- PSAvoidUsingWriteHost = 'Warning'
45- PSProvideCommentHelp = 'Information'
43+ Rules = @{
44+ PSAvoidUsingWriteHost = @{
45+ Severity = 'Warning'
46+ }
47+ PSUseDeclaredVarsMoreThanAssignments = @{
48+ Severity = 'Warning'
49+ }
50+ PSUseCorrectCasing = @{
51+ Severity = 'Warning'
52+ }
53+ PSProvideCommentHelp = @{
54+ Severity = 'Information'
55+ }
4656 }
4757}
58+
4859'@
4960
5061 # Write the settings file
Original file line number Diff line number Diff line change @@ -85,5 +85,5 @@ function New-ModuleTemplate {
8585 Initialize-GitRepository - BasePath $base
8686 }
8787
88- Write-Host " Module '$Name ' created at $base "
88+ Write-Information " Module '$Name ' created at $base "
8989}
Original file line number Diff line number Diff line change 11Import-Module PlatyPS
2+ Import-Module " $PSScriptRoot /../NewModuleTemplate.psd1" - Force
3+
24
35Update-MarkdownHelp `
46 - Module " $PSScriptRoot /../NewModuleTemplate.psd1" `
Original file line number Diff line number Diff line change 44 [switch ]$SkipDocs
55)
66
7- Write-Host " Building NewModuleTemplate..."
7+ Write-Information " Building NewModuleTemplate..."
88
99if (-not $SkipAnalyzer ) {
10- Write-Host " Running PSScriptAnalyzer..."
10+ Write-Information " Running PSScriptAnalyzer..."
1111 Invoke-ScriptAnalyzer - Path $PSScriptRoot - Settings " $PSScriptRoot \Analyzer\PSScriptAnalyzerSettings.psd1"
1212}
1313
1414if (-not $SkipTests ) {
15- Write-Host " Running Pester tests..."
15+ Write-Information " Running Pester tests..."
1616 Invoke-Pester - Path " $PSScriptRoot \Tests" - EnableExit
1717}
1818
1919if (-not $SkipDocs ) {
20- Write-Host " Updating PlatyPS docs..."
20+ Write-Information " Updating PlatyPS docs..."
2121 Import-Module PlatyPS - ErrorAction Stop
2222 New-MarkdownHelp - Module " $PSScriptRoot \NewModuleTemplate.psd1" - OutputFolder " $PSScriptRoot \Docs" - Force
2323}
2424
25- Write-Host " Build complete."
25+ Write-Information " Build complete."
Original file line number Diff line number Diff line change 77
88$modulePath = Split-Path - Parent $PSScriptRoot
99
10- Write-Host " Publishing NewModuleTemplate from $modulePath to $Repository ..."
10+ Write-Information " Publishing NewModuleTemplate from $modulePath to $Repository ..."
1111
1212Publish-Module - Path $modulePath - Repository $Repository - NuGetApiKey $ApiKey
1313
14- Write-Host " Publish complete."
14+ Write-Information " Publish complete."
You can’t perform that action at this time.
0 commit comments