2012-05-10 16 views
0

FxCop Integration VS Extensionを使用したコード解析に、FxCopをVS 2010 Professionalと統合するプロセスが進行中です。 FxCopで設定されているすべてのデフォルトルールセットでは、ベストプラクティスを厳密に違反しているとは限りませんが、ほとんどのケースではなく実行できる点が多数報告されています。基本的にFxCopのすべてのルールのサブセットである規則のリストはありますか?人々は一般に、必要と思われるWebベースのプロジェクトのコード分析を行うために使用しています。私たちは軽く探知しましたが、個人的な選択に基づいて特定のルールを無視することについての議論は、ウェブ全体に広がっています。プロジェクト。ASP.NET WebアプリケーションのFxCopルールリストサブセット

答えて

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

私はルールのより詳細なフィルタリングを探していました。たとえば、Microsoft.DesignルールセットのルールCA1014「CLSCompliantAttributeを使用してアセンブリをマークする」は無視できます。私は実際にはデフォルトのFxCopルールセットのそれぞれから無視できるルールのリストを探していました。これは、開発コミュニティが一般的に使用しているルールのリストになるはずです。 – koder

0

いいえ、そのような獣はありません。たとえあったとしても、リストを作成した人の判断が実際に自分の状況に合っていることをどうやって確認できますか?

ルールは200程度しかありません。なぜあなたが重要であると考えるのかを理解するのに1時間か2時間座ってみませんか?あなたはショートカットを取って、現在あなたに違反を与えているものだけを見ることができます。それは恐らくスクリーニングの努力を1時間半1/2以下にするでしょう。

関連する問題