Discussion:
Contracts from the command line
(too old to reply)
Stefan Ram
2016-08-03 08:09:57 UTC
Permalink
I have written a computer program!

public class Program
{ public static void Main()
{ System.Diagnostics.Contracts.Contract.Requires( false ); }}

I believe this should emit a diagnostics when
inspected with the proper tools.

I tried to run this from the command line using the
Microsoft (R) Visual C# Compiler version 1.0.0.50618:

csc /debug Program.cs

, but there were no diagnostics for the breech of contract!

Is there any way to start the code analysis from the command
line (without Visual Studio)?
Arne Vajhøj
2016-08-04 01:12:11 UTC
Permalink
Post by Stefan Ram
I have written a computer program!
public class Program
{ public static void Main()
{ System.Diagnostics.Contracts.Contract.Requires( false ); }}
I believe this should emit a diagnostics when
inspected with the proper tools.
I tried to run this from the command line using the
csc /debug Program.cs
, but there were no diagnostics for the breech of contract!
Is there any way to start the code analysis from the command
line (without Visual Studio)?
cccheck

(but good luck figuring out the command line options)

Arne

Continue reading on narkive:
Loading...