I\'m looking for the warning number for incomplete pattern matches. Anyone know what it is?
More fully, I want to make FSC.EXE return incomplete pattern matches
use --warnaserror+:25
To know which one it was I simply produced myself the warning using let f (Some x) = x
which gaves me warning FS0025: Incomplete pattern matches on this expression. For e
xample, the value 'None' may indicate a case not covered by the pattern(s).
In a .Net Standard F# project you can also achieve this by adding an element to your fsproj file like so:
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<WarningsAsErrors>FS0025</WarningsAsErrors>
</PropertyGroup>