Skip to content
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

Support NuGetAuditWarningAsError to simplify treat audit warnings as errors #14012

Open
WeihanLi opened this issue Dec 20, 2024 · 3 comments
Open

Comments

@WeihanLi
Copy link

NuGet Product(s) Involved

NuGet.exe

The Elevator Pitch

When we want to treat audit warnings as errors we have to set each error code to the WarningsAsErrors list, it's not easy to know all the error codes and it's possible to introduce a new error code, is it?

Wondering if we could introduce NuGetAuditWarningAsError to simplify treat all nuget audit warnings as errors

Additional Context and Details

No response

@nkolev92
Copy link
Member

nkolev92 commented Dec 20, 2024

@WeihanLi

I don't think we're likely to introduce new error codes at this point, I think depending on NU1901-NU1904 is pretty safe.

@WeihanLi
Copy link
Author

Think it could still make the warnings as errors more simple, feel free to close if we do not think it's a need

@nkolev92
Copy link
Member

We'll discuss it during triage, but I'm not opposed to it, I just wanted to give you more confidence in your current options.

https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages#warning-codes does talk about warning code elevation.

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

No branches or pull requests

2 participants