-
Notifications
You must be signed in to change notification settings - Fork 389
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
Switch to elevate warning to errors #1534
Comments
msbuild already has this ability via the csproj |
@TylerLeonhardt fyi the linter will be able to set a fail level (info, warning, error) based on the diagnostic record output so it won't be explicitly needed for the linter but still a nice-to-have. |
The |
Closing due to inactivity |
I've thought about this some more, and I think it's at least worth continuing to track. My thinking here:
|
@rjmholt For your last issue above - I 100% agree that rule severity should be configurable. Looks like #1515 is already tracking this. I might be misunderstanding, but it looks like OP just wants to essentially do:
It doesn't really seem like the type of thing that needs it's own param, IMO. And in situations where you are using -EnableExit instead of parsing the report, it would make sense to just only include the rules that you explicitly want the build to fail for. |
Summary of the new feature
As a user, I want a single switch to elevate warnings to errors so that my repos can have error-less, warning-less code. In CI scenarios, like @JustinGrote's Super-Duper-Linter I need the task to fail when there are only warnings.
Proposed technical implementation details (optional)
@rjmholt mentioned the
-NoExit
param but I'm not sure if that will exit on warnings as well...What is the latest version of PSScriptAnalyzer at the point of writing
1.19
The text was updated successfully, but these errors were encountered: