Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Warnings and messages from static contract checking don't appear in the VS2015 error list #137

@jbcutting

Description

@jbcutting

I've been testing the last two releases in VS2015 RC. I've noticed that while warnings and messages from the static analysis are appearing in the Output window, they do not show up in the Error List window. The messages do still appear in the Error List in VS2013, so this seems to be specific to VS2015.

This is easy to repro. Just create a new console app and add the class below. Turn on static contract checking in the project properties, then build. In the output window, you'll see the following warning, but it won't show up in VS2015's error list (it will if you do the same thing in 2013).

Projects\ConsoleApplication2\Program.cs(20,4): warning : CodeContracts: Missing precondition in an externally visible method. Consider adding Contract.Requires(list != null); for parameter validation

public class Foo
{
    public void DoStuff(List<int> list)
    {
        Console.WriteLine(list.Count);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions