Code analysis ruleset integrated in DotNetBuilder

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent f172343159
commit 9779d8e5b0
  1. 9
      DotNetBuilder/AllRules.ruleset
  2. 2
      DotNetBuilder/Compiler.cs
  3. 3
      DotNetBuilder/MicroBuildServer.DotNetBuilder.csproj

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="MBS - All Rules" ToolsVersion="14.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA2243" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
</Rules>
</RuleSet>

@ -91,7 +91,7 @@ namespace MicroBuildServer.DotNetBuilder
if (!string.IsNullOrEmpty(request.CodeAnalysisRuleSet))
{
globalProperty.Add("RunCodeAnalysis", "true");
globalProperty.Add("CodeAnalysisRuleSet", request.CodeAnalysisRuleSet);
globalProperty.Add("CodeAnalysisRuleSet", Path.Combine(BuilderAssemblyDirectory, "AllRules.ruleset"));
globalProperty.Add("MBSBuilderPath", BuilderAssemblyDirectory);
globalProperty.Add("CustomBeforeMicrosoftCSharpTargets", Path.Combine(BuilderAssemblyDirectory, "ImportStyleCop.targets"));
}

@ -112,6 +112,9 @@
<Compile Include="TestRequest.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="AllRules.ruleset">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="app.config">
<SubType>Designer</SubType>
</None>

Loading…
Cancel
Save