-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Conversation
Is this whole thing a VS feature ie. Can you get analysis from dotnet build? On Saturday, 13 August 2016, Brian Surowiec notifications@github.com
|
I just turned on CS4014 and that's giving two new warnings. One is in NancyHost.cs, the other is DiagnosticsHook.cs#L186 @jchannon the msbuild output has these warnings and errors, you can see them in the teamcity build log (search for I'm also not sure about dotnet build since I've been waiting for them to stop changing every release before I started looking into it. |
But interestingly it doesn't show an issue around the code in the PR that On Saturday, 13 August 2016, Brian Surowiec notifications@github.com
|
It looks like that code isn't being detected by these rules because of how it's invoked. Since it's in a constructor and is using |
After looking into this some more it seems the analyzers don't work with .net core. There's a number of issues about this accross the various dotnet & roslyn projects which seem to indicate it's a tooling issue and/or clr issue and should be fixed in the 1.1 release. |
So what do we want to do with this? |
@xt0rted is this still in limbo? If so then we'll push it forward to the next milestone. If not then it needs rebasing (and updating?) so we can pull it in. Trying to wrap up the two remaining issues on the |
@thecodejunkie this can wait, I need to look into why the build is failing after my rebase but I don't really have the time right now. Update: looks like the build is failing, at least partly, due to the recent AngleSharp update. #2578 should fix that. |
@thecodejunkie rebased and passing |
This is based on the discussion in #2534 and sets up code analysis with a custom ruleset that includes DotNetAnalyzers/AsyncUsageAnalyzers. All the other rules are turned off right now.
In the classic project setup you can view the code analysis rules in the project's properties and when building the errors will show in the Error List.
In the new project setup there's no code analysis settings in the project's properties, but it does allow you to detect and run the rules. You do that by right clicking on the solution/folder/project and selecting
Find Code Issues
which should bring up the Inspection Results window which is similar to the old Error List.I'm not sure if the new project setup can run these on build or in a separate step, or if we'll have to wait for the rollback to msbuild for that.
The results of this show the only issue being in NancyHost.cs#L133-L134 as per #2471