-
Notifications
You must be signed in to change notification settings - Fork 393
Set exit code of Invoke-ScriptAnalyzer -EnableExit
to total number of diagnostics (#2054)
#2055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks @MatejKafka! I really like this. Could I ask you to do one small refactor? I checked and
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.