Use the WarningsAsErrors-Property of MSBuild
See original GitHub issueDescription
The WarningsAsErrors
-Property is currently ignored by Fable. @nojaf asked about that on Gitter yesterday. He wanted to make the compilation fail on incomplete pattern matches.
Repro code
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--
Warning FS0025: Incomplete pattern matches on this expression.
-->
<WarningsAsErrors>FS0025</WarningsAsErrors>
</PropertyGroup>
</Project>
Expected and actual results
Fable should fail on a project with this setting, just as dotnet build
does. But we currently generate a warning instead of an error.
Related information
- Fable version (
dotnet fable --version
): 1.3.16
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
C# Compiler Options to report errors and warnings
Use TreatWarningsAsErrors to treat all warnings as errors. ... For other elements that affect warnings, see the Common MSBuild properties.
Read more >Common MSBuild Project Properties
Specifies a list of warning codes to suppress by treating them as low-importance messages. Separate multiple warnings by semicolons. Note that ...
Read more >WarningsAsErrors as a property #1907 - dotnet/msbuild
Been looking to add /warnaserror to Roslyn and one suggestion was to just set it globally using the MSBuild property <WarningsAsErrors> .
Read more >MSBuild: How do i treat warnings as errors when building a ...
Im using FAKE 4.64.11. I want all warnings to be treated as errors, and not just specific warnings. Hope someone can help.
Read more >Configuration of WarningsAsErrors for .NET build - Guides
Hello everyone! Using SonarScanner for MSBuild as a part of your .NET build pipeline may change your failing build to unexpected successful ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
See #1402.
See #1591.