Permalink
Browse files

Using MSBuild.ExtensionPack.CodeQuality.FxCop so we can

use the CA ruleset on our CI server.
  • Loading branch information...
1 parent 44f106d commit d77696eb3fa233c126431fed6de3d019cec8db6a @cmendible committed Aug 6, 2013
View
1 Hexa.Core.Tests/packages.config
@@ -6,7 +6,6 @@
<package id="FluentNHibernate" version="1.3.0.733" targetFramework="net40" />
<package id="Iesi.Collections" version="3.2.0.4000" targetFramework="net40" />
<package id="Moq" version="4.0.10827" targetFramework="net40" />
- <package id="MSBuildTasks" version="1.4.0.56" targetFramework="net40" />
<package id="Newtonsoft.Json" version="4.0.8" targetFramework="net40" />
<package id="NHibernate" version="3.3.3.4000" targetFramework="net40" />
<package id="NLog" version="2.0.0.2000" targetFramework="net40" />
View
BIN libs/MSBuild.ExtensionPack/Interop.COMAdmin.dll
Binary file not shown.
View
BIN libs/MSBuild.ExtensionPack/Interop.IWshRuntimeLibrary.dll
Binary file not shown.
View
BIN libs/MSBuild.ExtensionPack/Ionic.Zip.dll
Binary file not shown.
View
BIN libs/MSBuild.ExtensionPack/MSBuild.ExtensionPack.dll
Binary file not shown.
View
23 msbuild.targets/CodeMetrics.targets
@@ -35,7 +35,7 @@
</Target>
<!-- This is needed by MSBuild to locate the FxCop task -->
- <UsingTask AssemblyFile="$(SolutionDir)\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.Tasks.dll" TaskName="MSBuild.Community.Tasks.FxCop"
+ <UsingTask AssemblyFile="$(SolutionDir)\libs\MSBuild.ExtensionPack\MSBuild.ExtensionPack.dll" TaskName="MSBuild.ExtensionPack.CodeQuality.FxCop"
Condition="'$(EnableFxCop)' == 'true'"/>
<Target Name="RunFxCop" Condition="'$(EnableFxCop)' == 'true'">
@@ -44,20 +44,23 @@
<ItemGroup>
<FilesToAnalyze Include="$(OutDir)$(AssemblyName)$(TargetExt)" />
<DependencyDirectories Include="$(SolutionDir)\packages\**\*.dll"/>
+ <CodeAnalysisDictionary Include="$(SolutionDir)\msbuild.targets\CodeAnalysisDictionary.xml"/>
</ItemGroup>
- <FxCop
- ToolPath = "$(MSBuildProgramFiles32)\Microsoft Fxcop 10.0\"
+ <MSBuild.ExtensionPack.CodeQuality.FxCop
+ TaskAction="Analyse"
SearchGac="True"
- TargetAssemblies="@(FilesToAnalyze)"
+ Files="@(FilesToAnalyze)"
DependencyDirectories="@(DependencyDirectories)"
- RuleLibraries="@(FxCopRuleAssemblies)"
- Rules="-Microsoft.Usage#CA2214;-Microsoft.Design#CA1006;-Microsoft.Design#CA1040;-Microsoft.Design#CA1031;-Microsoft.Design#CA1020"
- AnalysisReportFileName="$(OutDir)$(AssemblyName)$(TargetExt).CodeAnalysis.xml"
- CustomDictionary="$(SolutionDir)\msbuild.targets\CodeAnalysisDictionary.xml"
+ Ruleset="=$(SolutionDir)\msbuild.targets\CodeAnalysisRules.ruleset"
+ OutputFile="$(OutDir)$(AssemblyName)$(TargetExt).CodeAnalysis.xml"
+ Dictionary="@(CodeAnalysisDictionary)"
Verbose="True"
- FailOnError="False"
- />
+ IgnoreGeneratedCode="True">
+ <Output TaskParameter="AnalysisFailed" PropertyName="Result"/>
+ <Output TaskParameter="OutputText" PropertyName="Text"/>
+ </MSBuild.ExtensionPack.CodeQuality.FxCop>
+ <Message Text="CODE ANALYSIS FAILED: $(Text)" Condition="$(Result) == 'true'"/>
</Target>
<PropertyGroup Condition="'$(EnableSimian)' == 'true'">

0 comments on commit d77696e

Please sign in to comment.