Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2011-01-20 05:25:00 +0300
committerSebastien Pouliot <sebastien@ximian.com>2011-01-24 02:53:26 +0300
commit22b94b5f05c74ffc0258d996916636dbff71b899 (patch)
tree1813bd2fccdbd513c877f3bb4ff18a5eb733a4da
parent0e25b8baf353685384a56d49f0acbf64138d164b (diff)
Ignore [CompilerGenerated] code in AvoidMethodWithUnusedGenericTypeRule
* AvoidMethodWithUnusedGenericTypeRule.cs: Ignore generated code
-rw-r--r--gendarme/rules/Gendarme.Rules.Design.Generic/AvoidMethodWithUnusedGenericTypeRule.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/gendarme/rules/Gendarme.Rules.Design.Generic/AvoidMethodWithUnusedGenericTypeRule.cs b/gendarme/rules/Gendarme.Rules.Design.Generic/AvoidMethodWithUnusedGenericTypeRule.cs
index e101f771..197a1722 100644
--- a/gendarme/rules/Gendarme.Rules.Design.Generic/AvoidMethodWithUnusedGenericTypeRule.cs
+++ b/gendarme/rules/Gendarme.Rules.Design.Generic/AvoidMethodWithUnusedGenericTypeRule.cs
@@ -31,6 +31,7 @@ using System;
using Mono.Cecil;
using Gendarme.Framework;
+using Gendarme.Framework.Rocks;
namespace Gendarme.Rules.Design.Generic {
@@ -114,7 +115,7 @@ namespace Gendarme.Rules.Design.Generic {
public RuleResult CheckMethod (MethodDefinition method)
{
// rule applies only if the method has generic type parameters
- if (!method.HasGenericParameters)
+ if (!method.HasGenericParameters || method.IsGeneratedCode ())
return RuleResult.DoesNotApply;
// look if every generic type parameter...