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

Treat specific warnings as errors #4388

Closed
bitbonk opened this issue May 21, 2019 · 3 comments
Closed

Treat specific warnings as errors #4388

bitbonk opened this issue May 21, 2019 · 3 comments
Labels

Comments

@bitbonk
Copy link

bitbonk commented May 21, 2019

Please add an option to the csproj file that allows me to define only specific warnings to be treated as errors.

My use case is that I would like to transform a larger code base to be nullable aware. Unfortunately this code base has a lot of other warnings when the solution is built. Those are uncritical and for now.

The solution should not compile as long as there are warning related to nullable types left.

I suspect that in the months after C# 8 hits the street, a lot code bases will be made nullable aware and a lot of people will be in a similar situation as I am now.

@bitbonk
Copy link
Author

bitbonk commented May 21, 2019

related (just the inverse is requested here): #3062

@rainersigwald
Copy link
Member

This is possible as of #1928. Set the property MSBuildWarningsAsErrors to a semicolon-delimited list of error/warning codes.

@rainersigwald
Copy link
Member

Duplicate of #1886

@rainersigwald rainersigwald marked this as a duplicate of #1886 May 21, 2019
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants