Set exit code of Invoke-ScriptAnalyzer -EnableExit to total number of diagnostics (#2054) - #2055
Conversation
40022c7 to
b5d4932
Compare
|
Thanks Matěj Kafka (@MatejKafka)! I really like this. Could I ask you to do one small refactor? I checked and |
Andy Jordan (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!
b5d4932 to
76bcd6b
Compare
|
Andy Jordan (@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 |
76bcd6b to
04a0149
Compare
Christoph Bergmeister (@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. |
|
Matěj Kafka (@MatejKafka) I chatted with Patrick Meinecke (@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. :) |
5833d08 to
04a0149
Compare
Andy Jordan (andyleejordan)
left a comment
There was a problem hiding this comment.
Fantastic, thank you!
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.