我們正在使用FxCop Integration VS Extension將FxCop與VS 2010 Professional進行集成,以便進行代碼分析。我們已經看到,使用在FxCop中配置的所有默認規則集,我們得到了大量的報告點,這些點可以很好地滿足但不一定嚴格違反最佳實踐,或者在大多數情況下可以不做。是否有任何規則列表,實質上是FxCop中所有規則的一個子集,人們通常使用這些規則爲基於Web的項目進行代碼分析,這些項目可以被認爲是必須具備的。我們輕鬆搜索,但無法獲得單數(關於忽略基於個人選擇的特定規則的討論遍佈整個Web)資源,其中列出了社區通常遵循的基於web的asp.net/C#項目。ASP.NET Web應用程序的FxCop規則列表子集
0
A
回答
0
其實我正在使用這個使用TeamCity集成,但規則應該是相同的。嘗試下面一次:
<?xml version="1.0" encoding="utf-8"?>
<FxCopProject Version="1.36" Name="testApplication">
<ProjectOptions>
<SharedProject>True</SharedProject>
<Stylesheet Apply="False">\tools\fxcop\Xml\FxCopReport.xsl</Stylesheet>
<SaveMessages>
<Project Status="Excluded" NewOnly="False" />
<Report Status="Active" NewOnly="False" />
</SaveMessages>
<ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" />
<EnableMultithreadedLoad>True</EnableMultithreadedLoad>
<EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis>
<SourceLookup>True</SourceLookup>
<AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold>
<RuleExceptionsThreshold>1</RuleExceptionsThreshold>
<Spelling Locale="en-GB" />
<OverrideRuleVisibilities>False</OverrideRuleVisibilities>
<CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" />
<SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache>
<DeadlockDetectionTimeout>120</DeadlockDetectionTimeout>
<IgnoreGeneratedCode>False</IgnoreGeneratedCode>
</ProjectOptions>
<Targets>
<Target Name="$(ProjectDir)/../../solution/PrecompiledWeb/application/bin/App_Code.dll" Analyze="True" AnalyzeAllChildren="True" />
</Targets>
<Rules>
<RuleFiles>
<RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" />
<RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" />
</RuleFiles>
<Groups />
<Settings />
</Rules>
<FxCopReport Version="1.36" />
</FxCopProject>
0
不,沒有這樣的野獸。即使有,你如何確定創建名單的人確實適合你的情況?
只有200左右的規則。爲什麼不坐下一兩個小時來弄清楚哪些是你認爲重要的?你甚至可以採取快捷方式,只看當前給你的違規行爲。這可能會使篩選工作降至不到1/2小時。
相關問題
- 1. FxCOp 10.0中的規則集較少?
- 2. Asp.Net web.config忽略子應用程序的規則
- 3. 在Visual Studio 2008中配置FxCop來運行規則的子集
- 4. 如何將規則集文件轉換爲FXCop規則dll?
- 5. FxCop:用於檢查程序集信息值的自定義規則
- 6. 檢查NotImplementedExceptions的FxCop規則
- 7. ASP.NET Core Web應用程序的Web.config設置作爲ASP.NET Core Web應用程序中的子應用程序?
- 8. 規劃Web應用程序
- 9. 樣式表規則應用程序
- 10. Asp.net Web應用程序silverlight頁面中的程序集引用
- 11. 自定義FxCop規則檢查MVC應用程序中的屬性
- 12. ASP.NET MVC Web應用程序VS ASP.NET Web應用程序
- 13. FxCop規則爲字符串==?
- 14. FxCop,從相關程序集中編寫調用者列表
- 15. SimpleSAMLphp與asp.net web表單應用程序的集成
- 16. Asp.net的web應用程序
- 17. 引用程序集複製的規則
- 18. ASP.NET:多個程序集版本,相同的Web應用程序
- 19. 在asp.net 2.0 web應用程序中使用.net 3.5程序集
- 20. asp.net mvc 2 web應用程序裏面的Web應用程序?
- 21. 適用於asp.net-mvc應用程序的良好規則引擎
- 22. fxcop自定義規則不起作用
- 23. ASP.NET web應用程序
- 24. web應用程序asp.net
- 25. ASP.NET Web應用程序
- 26. asp.net web應用程序
- 27. 如何考慮作爲基於規則的web應用程序
- 28. 語義Web應用程序中的模糊規則
- 29. 基本Web應用程序的「智能」重寫規則
- 30. Web應用程序中的動態業務規則
我一直在尋找更深入的規則過濾。例如,Microsoft.Design規則集中的規則CA1014「使用CLSCompliantAttribute標記程序集」可以忽略。實際上,我正在尋找一組可以忽略的規則列表,這些列表可能會導致開發社區通常使用的規則列表被默認的每個FxCop規則集所忽略。 – koder