fxcopのカスタムルールを開発しようとしています。
私はこのコードを持っています:
namespace TestCustomRuleFxCop
{
public class DoTheRightThingRule : BaseIntrospectionRule
{
public DoTheRightThingRule()
: base("DoTheRightThing", "TestCustomRuleFxCop.Rules",
typeof(DoTheRightThingRule).Assembly)
{
}
public override ProblemCollection Check(Member member)
{
return null; // todo
}
}
}
私はこのxmlを持っています(Rules.xmlという名前で、ビルドアクションを埋め込みリソースに設定します)
<?xml version="1.0" encoding="utf-8" ?>
<Rules FriendlyName="My rules">
<Rule TypeName="DoTheRightThingRule" Category="MyCategory" CheckId="MyId">
<Name>My rule name</Name>
<Description>My description</Description>
<Resolution>Add Resolution</Resolution>
<Email></Email>
<MessageLevel Certainty="100">Warning</MessageLevel>
<FixCategories>Breaking</FixCategories>
</Rule>
</Rules>
コンパイルしてfxcopを実行し、このdllを使用してルールを追加します。
「マイルール」フォルダは表示されますが、ルールはありません...
私は何が欠けていますか?
よろしくお願いします。