有没有人知道,如果只增加FxCop数量,我将如何获得xml或html。
目前这是我的fxcop cmd,我替换{0}和{1}并动态创建批处理文件并运行。
我得到了完整的fxcop警告,虽然在cmd提示符中我可以看到它显示了fxcop警告增加的次数。
fxcopcmd.exe /import:"c:\Standard.xml" /summary "/file:{0}" /searchgac /ignoreinvalidtargets /forceoutput /successfile /ignoregeneratedcode /saveMessagesToReport:Active
/r:-"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\NamingRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\DesignRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\GlobalizationRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\InteroperabilityRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\MobilityRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\PerformanceRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\PortabilityRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\SecurityRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\UsageRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\DataflowRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\MaintainabilityRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\ReliabilityRules.dll"
/r:+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules\SecurityTransparencyRules.dll"
/ruleid:-Microsoft.Design#CA1024 /ruleid:-Microsoft.Performance#CA1822
/ruleid:-Microsoft.Usage#CA2227
/out:"{1}"
我打算将Xml与标准xml手动/ XmlDiff进行比较并找出差异 如果可靠地通过FxCop工具完成相同的操作,那么我可以使用它。
答案 0 :(得分:0)
为了让FxCop计算增量,它需要访问存储上次报告中的违规的报告或项目文件。除非{1}
为c:\Standard.xml
(或在下次运行之前复制到它),否则您当前的命令行看起来不会允许这种情况正确发生。
答案 1 :(得分:0)
我得到了解决方案,/saveMessagesToReport:Active
必须更改为/saveMessagesToReport:Absent
,这只会增加。必须尝试更多场景(相同计数但结果不同)并在此处更新。