Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using MSBuild.ExtensionPack.CodeQuality.FxCop so we can

use the CA ruleset on our CI server.
  • Loading branch information...
commit d77696eb3fa233c126431fed6de3d019cec8db6a 1 parent 44f106d
Carlos Mendible authored
1  Hexa.Core.Tests/packages.config
View
@@ -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" />
BIN  libs/MSBuild.ExtensionPack/Interop.COMAdmin.dll
View
Binary file not shown
BIN  libs/MSBuild.ExtensionPack/Interop.IWshRuntimeLibrary.dll
View
Binary file not shown
BIN  libs/MSBuild.ExtensionPack/Ionic.Zip.dll
View
Binary file not shown
BIN  libs/MSBuild.ExtensionPack/MSBuild.ExtensionPack.dll
View
Binary file not shown
23 msbuild.targets/CodeMetrics.targets
View
@@ -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'">
Please sign in to comment.
Something went wrong with that request. Please try again.