如何插入代码质量度量 - FAKE F#MAKE

时间:2017-03-23 06:02:20

标签: f# msbuild f#-interactive f#-data f#-fake

我正在尝试将现有的MSBuild文件迁移到FAKE。 我试图理解一段代码,但无法找到它是如何使用的,以及如何在FAKE中实现这一点。开发这个MSBuild文件的开发人员已经离开了公司6-8个月。所以,现在我是尝试将现有MSBuild文件迁移到FAKE。

这是我的MSBuild代码,我需要在FAKE中实现

<!-- Code Quality -->
    <BuildFrameworkPath>$(BuildToolsDir)\BuildFramework</BuildFrameworkPath>
    <QualityMetricsMaxComplexityBreaking>10</QualityMetricsMaxComplexityBreaking>   <!-- BREAKS 10 -->
    <QualityMetricsMaxComplexityWarning>9</QualityMetricsMaxComplexityWarning>
    <QualityMetricsLineCoverageBreaking>50</QualityMetricsLineCoverageBreaking><!-- BREAKS 70 -->
    <QualityMetricsLineCoverageWarning>65</QualityMetricsLineCoverageWarning>
    <QualityMetricsSymbolCoverage>70</QualityMetricsSymbolCoverage><!-- 70 -->
    <QualityMetricsBranchCoverage>70</QualityMetricsBranchCoverage><!-- 70 -->
    <QualityMetricsMaxCouplingBreaking>85</QualityMetricsMaxCouplingBreaking> <!-- 40 -->
    <QualityMetricsMaxCouplingWarning>75</QualityMetricsMaxCouplingWarning>
    <QualityMetricsMinMaintainabilityBreaking>35</QualityMetricsMinMaintainabilityBreaking>  <!-- BREAKS 35-->
    <QualityMetricsMinMaintainabilityWarning>30</QualityMetricsMinMaintainabilityWarning>
    <QualityMetricsCouplingExcludeFiles>DependencyInjectionConfiguration</QualityMetricsCouplingExcludeFiles>

    <QualityNDependProjectFilePath>$(BuildRoot)NDepend.ndproj</QualityNDependProjectFilePath>
    <QualityNDependInDirs>$(BuildDir)</QualityNDependInDirs>

    <QualityJsLintScriptsToAnalyse Condition="$(QualityJsLintScriptsToAnalyse) == '' Or $(QualityJsLintScriptsToAnalyse) == '*Undefined*'">$(BuildWebSiteDir)\Scripts\App\*.js</QualityJsLintScriptsToAnalyse>

    <QualityFxCopAssembliesToAnalyse>$(BuildDir)\$(ProjectName)*.dll</QualityFxCopAssembliesToAnalyse>
    <QualityFxCopBreakingRulesProject>$(BuildRoot)Rules.Breaking.fxcop</QualityFxCopBreakingRulesProject>
    <QualityFxCopRulesProject>$(BuildRoot)Rules.fxcop</QualityFxCopRulesProject>

    <QualitySourceMonitorSourceDir>$(BuildSolutionDir)\</QualitySourceMonitorSourceDir>    <!-- be sure to end directory with a "/" -->

是否可以在FAKE中添加质量指标。我试图找出如何在FAKE中做到这一点,但找不到任何东西。

如果有人可以帮助我理解现有的MSBuild代码或在FAKE中实现类似的代码,那将非常有帮助。

1 个答案:

答案 0 :(得分:0)

我首先下载可执行文件以从命令提示符运行,并尝试在ProcessHelper的帮助下集成到Fake构建脚本中。

从您的msbuild代码看,您似乎需要下一位: