Update issue templates (#57)
* Update issue templates * debug PSScriptAnalyzer
This commit is contained in:
parent
c45490aefe
commit
c31ee791bb
12
.github/ISSUE_TEMPLATE/default.md
vendored
Normal file
12
.github/ISSUE_TEMPLATE/default.md
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
name: Default
|
||||||
|
about: Use this template if nothing seems to work.
|
||||||
|
title: ":question: "
|
||||||
|
labels: question
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### :grey_question: Simply ask your question here: :grey_question:
|
||||||
|
|
||||||
|
<!-- Take your time an think about your problem.... -->
|
@ -96,8 +96,27 @@ function Invoke-Linter {
|
|||||||
Recurse = $true
|
Recurse = $true
|
||||||
Settings = './tools/PSScriptAnalyzerSettings.psd1'
|
Settings = './tools/PSScriptAnalyzerSettings.psd1'
|
||||||
ReportSummary = $true
|
ReportSummary = $true
|
||||||
|
ErrorAction = 'Stop'
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
$AnalyzerResults = Invoke-ScriptAnalyzer @AnalyzerSettings
|
||||||
|
if ( $AnalyzerResults ) {
|
||||||
|
$AnalyzerResults | Sort-Object -Property @(
|
||||||
|
"ScriptName",
|
||||||
|
"Line"
|
||||||
|
) | Format-Table @(
|
||||||
|
"Severity",
|
||||||
|
"ScriptName",
|
||||||
|
"Line",
|
||||||
|
"RuleName",
|
||||||
|
"Message"
|
||||||
|
) -AutoSize | Out-String | Write-Verbose -Verbose
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error -Message 'PSScriptAnalyzer failer'
|
||||||
|
Write-Error -Message $_.Exception.Message -ErrorAction 'Stop'
|
||||||
}
|
}
|
||||||
Invoke-ScriptAnalyzer @AnalyzerSettings
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user