Open tigattack opened 3 years ago
I have a few suggestions for improvements. These are not tested, but should work 😀
Errors Errors could be directly sent back to Actions by changing entrypoint.ps1 L35 to:
foreach ($i in $errors) { Write-Output "::error file=$($i.ScriptName),line=$($i.Line),col=$($i.Column)::$($i.RuleName) - $($i.Message)" }
Warnings Warnings could be directly sent back to Actions by changing entrypoint.ps1 L38 to:
foreach ($i in $warnings) { echo "::warning file=$($i.ScriptName),line=$($i.Line),col=$($i.Column)::$($i.RuleName) - $($i.Message)" }
PSSA ParseError PSSA also outputs "ParseErrors". These currently seem to be ignored by this Action, but could be reported with other errors like by changing entrypoint.ps1 L27 to:
ParseError
$errors = $issues.Where({($_.Severity -eq 'Error') -or ($_.Severity -eq 'ParseError')})
Reference: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message
Nice idea ! i will try...
Thanks! You can see an improved example of this method in a script here and an example of varied results here.
I have a few suggestions for improvements. These are not tested, but should work 😀
Errors
Errors could be directly sent back to Actions by changing entrypoint.ps1 L35 to:
Warnings
Warnings could be directly sent back to Actions by changing entrypoint.ps1 L38 to:
PSSA
ParseError
PSSA also outputs "ParseErrors". These currently seem to be ignored by this Action, but could be reported with other errors like by changing entrypoint.ps1 L27 to:
Reference: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message