F # Suppress warnings

Sometimes when compiling F # I get annoying pattern matching and indentation warnings. Is there a way to turn off alerts? I am pretty OCD over warnings.

+5
source share
2 answers

If you forget, you can enter

let rec x = lazy(x.Value)

and get a warning

This and other recursive references to the defined object will be checked for reliable initialization at run time using delayed. This is because you define one or more recursive objects, not recursive functions. This warning can be suppressed with the help of "#nowarn" 40 "or '--nowarn: 40'.

, --nowarn - #nowarn . ( Visual Studio , , VS, , ). , VS , "" " " " " ( ) , VS UI.

(, , #nowarn , --nowarn .)

+7

: (F #)

--nowarn:<int-list>:

, . . .

# . . /nowarn ( #).

+2

All Articles