Set exit code of Invoke-ScriptAnalyzer -EnableExit to total number of diagnostics (#2054)#2055
Conversation
|
Thanks @MatejKafka! I really like this. Could I ask you to do one small refactor? I checked and |
andyleejordan
left a comment
There was a problem hiding this comment.
Ugh sorry GitHub UI see comment I just left in "Conversation" tab of PR. Thanks!
|
@andyleejordan Needed to make a few more changes in Btw, looking at the code a bit more, imo it would also make sense to move |
@bergmeister thoughts on this? I'm inclined to agree but it seems like a riskier change. Otherwise I'm good with this PR as-is but wanted to ping you before merging. |
|
@MatejKafka I chatted with @SeeminglyScience and confirmed that wouldn't break things, so I'm all for adding that small refactor. It makes sense, then I can do a final review and merge this. |
|
One more thing – currently, the number of violations reported by |
|
Updated with changes to |
|
Ah, yes, sorry. I misunderstood and that moving the report summary logic would be a change on the same order as the exit code change. Need to keep it very minimal. |
|
Not sure I follow – are you referring to changing |
|
All the extra changes on top of it. I'm good to merge just commit 04a0149. For the extra report summary changes proposed, let's do it another PR. |
|
Makes sense, I'll move the follow-up commits to separate PRs, thanks. :) |
PR Summary
Fixes #2054 by setting the exit to the total number of emitted diagnostics instead of just the last processed file from the pipeline.
PR Checklist
.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.