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

Implement /NoWarn functionality #1366

Merged
merged 1 commit into from
Nov 29, 2016
Merged

Implement /NoWarn functionality #1366

merged 1 commit into from
Nov 29, 2016

Conversation

jeffkl
Copy link
Contributor

@jeffkl jeffkl commented Nov 21, 2016

You cannot suppress all warnings, if you specify empty /warnasmessage or /nowarn, you get an error message.
Warnings are mutated into just a message.
Ignore the first commit which is the implementation of /WarnAsError

Closes #68
Closes #47
Closes #910

So this:

MyProject.proj(3,18): warning MSB4130: The condition "true or true and true" may have been evaluated incorrectly 
in an earlier version of MSBuild. Please verify that the order of the AND and OR clauses is written as intended. To 
avoid this warning, add parentheses to make the evaluation order explicit.

Becomes this in with Verbosity=Detailed

MyProject.proj(3,18): message MSB4130: The condition "true or true and true" may have been evaluated incorrectly
in an earlier version of MSBuild. Please verify that the order of the AND and OR clauses is written as intended. To
avoid this warning, add parentheses to make the evaluation order explicit.

Here is the help message for review:

  /warnasmessage[:code[;code2]]
                     List of warning codes to treats as low importance
                     messages.  Use a semicolon or a comma to separate
                     multiple warning codes.
                     (Short form: /nowarn[:c;[c2]])

                     Example:
                       /warnasmessage:MSB3026

Warnings are logged as low importance messages instead.  This way they can still be seen with more verbosity but are essentially suppressed.

Closes dotnet#68
@jeffkl
Copy link
Contributor Author

jeffkl commented Nov 29, 2016

@dotnet-bot test this please

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

Successfully merging this pull request may close these issues.

3 participants