Skip to content

Add -EnableExit parameter to ease CI usage #840

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

Closed
BatmanAMA opened this issue Dec 5, 2017 · 4 comments · Fixed by #842
Closed

Add -EnableExit parameter to ease CI usage #840

BatmanAMA opened this issue Dec 5, 2017 · 4 comments · Fixed by #842

Comments

@BatmanAMA
Copy link

Current Behavior

Invoke-ScriptAnalyzer always sets the exit code to 0

Proposed behavior

When the analyzer outputs problems, enable exit would also generate an exit code equal to the number of problems found.

@bergmeister
Copy link
Collaborator

@BatmanAMA The PR is close to getting merged and I think/hope we can expect a new release of PSSA coming up soon.

@BatmanAMA
Copy link
Author

@bergmeister - You're awesome! I actually opened this with the plan to circle back in january to do it. One thing off my plate and my CI is a little cleaner.

@bergmeister
Copy link
Collaborator

bergmeister commented Feb 1, 2018

@BatmanAMA You're welcome. Feel free to pick up any other issues if you feel like or make other suggestions. I personally use PSSA in CI like that using Pester in case you're interested.

@BatmanAMA
Copy link
Author

That's not a bad idea - I personally split it into a different step (I have test and analyze) but to be honest, I rarely analyze without testing and vice versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants