warnaserror not failing the build with exit 1 if only errors present were warnings
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
When there are no errors in a build, but only warnings that have been promoted to error with **WarnAsError** then the build will not fail with an exit of 1.
```
$ dotnet build --no-incremental /WarnAsError
...
Build FAILED.
....cs(28,1): error SA1507: Code must not contain multiple blank lines in a row [....csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.55
Exit code => 0
```
Given that there are errors in the build, would expect an exit code of 1
Note that if there are genuine errors in the build, the build will fail correctly with the correct exit code
OS: Linux Ubuntu 18.04
dotnet version: 2.2.3-preview
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.