Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2535 from xt0rted/code-analysis
Browse files Browse the repository at this point in the history
Setup code analysis
  • Loading branch information
thecodejunkie authored Nov 1, 2016
2 parents 877fa86 + c930b8c commit 10318e6
Show file tree
Hide file tree
Showing 58 changed files with 648 additions and 72 deletions.
421 changes: 421 additions & 0 deletions Nancy.ruleset

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\Nancy.Authentication.Basic.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
Expand Down Expand Up @@ -124,6 +124,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Authentication.Basic.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Authentication.Basic/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "A basic HTTP authentication provider for Nancy.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -15,7 +15,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\Nancy.Authentication.Forms.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
Expand Down Expand Up @@ -121,6 +121,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Authentication.Forms.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Authentication.Forms/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "A forms authentication provider for Nancy.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -15,7 +15,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\Nancy.Authentication.Stateless.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
Expand Down Expand Up @@ -108,6 +108,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Authentication.Stateless.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Authentication.Stateless/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "A stateless authentication provider for Nancy.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -15,7 +15,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
7 changes: 7 additions & 0 deletions src/Nancy.Embedded.MSBuild/Nancy.Embedded.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Nancy.Embedded.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -55,6 +56,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Embedded.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Embedded/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "Helpers for serving embedded static content with Nancy.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -15,7 +15,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Nancy.Encryption.MachineKey.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -85,6 +86,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Encryption.MachineKey.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Encryption.MachineKey/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "System.Web MachineKey encrypton and HMAC providers for Nancy.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -15,7 +15,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
8 changes: 7 additions & 1 deletion src/Nancy.Hosting.Aspnet.MSBuild/Nancy.Hosting.Aspnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\Nancy.Hosting.Aspnet.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
Expand Down Expand Up @@ -135,6 +135,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Hosting.Aspnet.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Hosting.Aspnet/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "Enables hosting Nancy on ASP.NET.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -15,7 +15,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
8 changes: 7 additions & 1 deletion src/Nancy.Hosting.Self.MSBuild/Nancy.Hosting.Self.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\Nancy.Hosting.Self.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
Expand Down Expand Up @@ -138,6 +138,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Hosting.Self.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
5 changes: 3 additions & 2 deletions src/Nancy.Hosting.Self/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"version": "2.0.0-barneyrubble",
"description": "Enables hosting Nancy in any application.",
"authors": [ "Andreas Håkansson, Steven Robbins and contributors" ],
Expand All @@ -16,7 +16,8 @@
},

"dependencies": {
"Nancy": { "target": "project" }
"AsyncUsageAnalyzers": "1.0.0-alpha003",
"Nancy": { "target": "project" }
},

"frameworks": {
Expand Down
27 changes: 17 additions & 10 deletions src/Nancy.MSBuild/Nancy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Debug\Nancy.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -356,15 +357,15 @@
<Compile Include="..\Nancy\Helpers\ExceptionExtensions.cs">
<Link>Helpers\ExceptionExtensions.cs</Link>
</Compile>
<Compile Include="..\Nancy\HttpLink.cs">
<Link>HttpLink.cs</Link>
</Compile>
<Compile Include="..\Nancy\HttpLinkBuilder.cs">
<Link>HttpLinkBuilder.cs</Link>
</Compile>
<Compile Include="..\Nancy\HttpLinkRelation.cs">
<Link>HttpLinkRelation.cs</Link>
</Compile>
<Compile Include="..\Nancy\HttpLink.cs">
<Link>HttpLink.cs</Link>
</Compile>
<Compile Include="..\Nancy\HttpLinkBuilder.cs">
<Link>HttpLinkBuilder.cs</Link>
</Compile>
<Compile Include="..\Nancy\HttpLinkRelation.cs">
<Link>HttpLinkRelation.cs</Link>
</Compile>
<Compile Include="..\Nancy\IAssemblyCatalog.cs">
<Link>IAssemblyCatalog.cs</Link>
</Compile>
Expand Down Expand Up @@ -1534,6 +1535,12 @@
<Link>Diagnostics\Views\login.sshtml</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Nancy.Metadata.Modules.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>..\..\Nancy.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -96,6 +97,12 @@
<Name>Nancy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\AsyncUsageAnalyzers.1.0.0-alpha003\analyzers\dotnet\AsyncUsageAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 4 additions & 0 deletions src/Nancy.Metadata.Modules.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AsyncUsageAnalyzers" version="1.0.0-alpha003" targetFramework="net45" developmentDependency="true" />
</packages>
Loading

0 comments on commit 10318e6

Please sign in to comment.