Gendarme Report
Produced on 05.07.2009 12:11:09 UTC.
Gendarme found 85 potential defects using 187 rules.
List of assemblies analyzed
[show]
- D:\Build\Projects\NetReflector\SCM\Build\NetReflector.dll: 77 defects
- D:\Build\Projects\NetReflector\SCM\Build\NetReflectorDocumenterTask.dll: 2 defects
List of rules used
[show]
Problem:All parameter values passed to this type constructors should be visible through read-only properties.
Solution:Add the missing properties getters to this type.
4 defect(s) found:
Target: Exortech.NetReflector.ReflectorPropertyAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Location: factoryType
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorPropertyAttribute.cs(≈22)
Details: Add 'FactoryType' property to the attribute class.
Go to AttributeArgumentsShouldHaveAccessorsRule description
Target: Exortech.NetReflector.ReflectorArrayAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Location: name
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorArrayAttribute.cs(≈7)
Details: Add 'Name' property to the attribute class.
Go to AttributeArgumentsShouldHaveAccessorsRule description
Target: Exortech.NetReflector.ReflectorCollectionAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Location: name
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorCollectionAttribute.cs(≈7)
Details: Add 'Name' property to the attribute class.
Go to AttributeArgumentsShouldHaveAccessorsRule description
Target: Exortech.NetReflector.ReflectorHashAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Location: name
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorHashAttribute.cs(≈10)
Details: Add 'Name' property to the attribute class.
Go to AttributeArgumentsShouldHaveAccessorsRule description
Problem:There are potentially dangerous calls into your code.
Solution:You should remove or replace the call to the dangerous method.
1 defect(s) found:
Target: System.Void Exortech.NetReflector.NetReflectorTypeTable::Add(System.String)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs(≈81)
Details: You are calling to System.Reflection.Assembly System.Reflection.Assembly::LoadFrom(System.String), which is a potentially problematic method
Go to AvoidCallingProblematicMethodsRule description
Problem:The methods in this class lacks cohesion (higher score is better). This leads to code harder to understand and maintain.
Solution:You can apply the Extract Class or Extract Subclass refactoring.
6 defect(s) found:
Target: Exortech.NetReflector.ReflectorPropertyAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorPropertyAttribute.cs(≈12)
Details: Type cohesiveness : 14%
Go to AvoidLackOfCohesionOfMethodsRule description
Target: Exortech.NetReflector.ReflectorTypeAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorTypeAttribute.cs(≈12)
Details: Type cohesiveness : 33%
Go to AvoidLackOfCohesionOfMethodsRule description
Target: Exortech.NetReflector.Generators.XsdGenerator
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdGenerator.cs(≈13)
Details: Type cohesiveness : 27%
Go to AvoidLackOfCohesionOfMethodsRule description
Target: Exortech.NetReflector.Generators.XsdGenerator/ReferencedType
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Details: Type cohesiveness : 20%
Go to AvoidLackOfCohesionOfMethodsRule description
Target: Exortech.NetReflector.NetReflectorTypeTable
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs(≈14)
Details: Type cohesiveness : 38%
Go to AvoidLackOfCohesionOfMethodsRule description
Target: Exortech.NetReflector.XmlTypeSerialiser
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs(≈15)
Details: Type cohesiveness : 28%
Go to AvoidLackOfCohesionOfMethodsRule description
Problem:This type name is prefixed with the last component of its enclosing namespace. This usually makes an API more verbose and less autocompletion-friendly than necessary.
Solution:Rename type without the prefix or replace it with a more meaningful term in the context of the namespace.
5 defect(s) found:
Target: Exortech.NetReflector.NetReflectorWriter
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈11)
Details: Consider renaming type to 'Writer'.
Go to AvoidRedundancyInTypeNameRule description
Target: Exortech.NetReflector.NetReflectorReader
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈40)
Details: Consider renaming type to 'Reader'.
Go to AvoidRedundancyInTypeNameRule description
Target: Exortech.NetReflector.NetReflectorConverterException
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorConverterException.cs(≈16)
Details: Consider renaming type to 'ConverterException'.
Go to AvoidRedundancyInTypeNameRule description
Target: Exortech.NetReflector.NetReflectorItemRequiredException
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorItemRequiredException.cs(≈16)
Details: Consider renaming type to 'ItemRequiredException'.
Go to AvoidRedundancyInTypeNameRule description
Target: Exortech.NetReflector.NetReflectorTypeTable
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs(≈14)
Details: Consider renaming type to 'TypeTable'.
Go to AvoidRedundancyInTypeNameRule description
Problem:The method seems to repeat the same cast operation multiple times.
Solution:Change the logic to ensure the (somewhat expensive) cast is done once.
2 defect(s) found:
Target: System.Xml.Schema.XmlSchema Exortech.NetReflector.Generators.XsdGenerator::Generate(System.Boolean)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdGenerator.cs(36,52)
Details: 'CS$5$0001' is casted 2 times for type 'System.IDisposable'.
Go to AvoidRepetitiveCastsRule description
Target: System.Void Exortech.NetReflector.XmlTypeSerialiser::ReadMembers(System.Xml.XmlNode,System.Object,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs(96,45)
Details: 'CS$5$0000' is casted 2 times for type 'System.IDisposable'.
Go to AvoidRepetitiveCastsRule description
Problem:This method has a parameter whose type is more specialized than necessary. It can be harder to reuse and/or extend the method in derived types.
Solution:Replace parameter type with the least specialized type necessary, or make use of the specifics of the actual parameter type.
5 defect(s) found:
Target: Exortech.NetReflector.ReflectorPropertyAttribute Exortech.NetReflector.ReflectorPropertyAttribute::GetAttribute(System.Reflection.MemberInfo)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorPropertyAttribute.cs(≈67)
Details: Parameter 'member' could be of type 'System.Reflection.ICustomAttributeProvider'.
Go to AvoidUnnecessarySpecializationRule description
Target: Exortech.NetReflector.ReflectorTypeAttribute modopt(System.EventArgs) Exortech.NetReflector.ReflectorTypeAttribute::GetAttribute(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorTypeAttribute.cs(≈57)
Details: Parameter 'type' could be of type 'System.Reflection.ICustomAttributeProvider'.
Go to AvoidUnnecessarySpecializationRule description
Target: System.Void Exortech.NetReflector.Generators.XmlDocumentationGenerator::WriteIfNotNull(System.Xml.XmlWriter,System.String,System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈65)
Details: Parameter 'type' could be of type 'System.Reflection.MemberInfo'.
Go to AvoidUnnecessarySpecializationRule description
Target: System.Void Exortech.NetReflector.Generators.XsdGenerator::AddDocumentation(System.String,System.Xml.Schema.XmlSchemaElement)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdGenerator.cs(≈164)
Details: Parameter 'item' could be of type 'System.Xml.Schema.XmlSchemaAnnotated'.
Go to AvoidUnnecessarySpecializationRule description
Target: System.Void Exortech.NetReflector.NetReflector::CheckNull(System.Object,System.String,System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈193)
Details: Parameter 'expected' could be of type 'System.Reflection.MemberInfo'.
Go to AvoidUnnecessarySpecializationRule description
Problem:This method needlessly calls some method(s) on a string instance. This may produce some performance penalities.
Solution:Remove the unneeded call(s) on the string instance.
1 defect(s) found:
Target: System.Xml.XmlQualifiedName Exortech.NetReflector.Generators.XsdTypes::ConvertToSchemaTypeName(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdTypes.cs(≈37)
Details: There is no need to call ToString() on a System.String instance.
Go to AvoidUnneededCallsOnStringRule description
Problem:Due performance issues, concrete attributes should be sealed.
Solution:Unless you plan to inherit from this attribute you should consider to seal it's type.
2 defect(s) found:
Target: Exortech.NetReflector.ReflectionPreprocessorAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Go to AvoidUnsealedConcreteAttributesRule description
Target: Exortech.NetReflector.ReflectorPropertyAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorPropertyAttribute.cs(≈12)
Go to AvoidUnsealedConcreteAttributesRule description
Problem:Due to performance issues, types which are not visible outside of the assembly and which have no inherited types within the assembly should be sealed.
Solution:You should seal this type, unless you plan to inherit from this type in the near-future.
3 defect(s) found:
Target: Exortech.NetReflector.Generators.XsdGenerator/ReferencedType
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Total
Go to AvoidUnsealedUninheritedInternalTypeRule description
Target: Exortech.NetReflector.Util.ReflectorMember/ReflectorProperty
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Total
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorMember.cs(≈48)
Go to AvoidUnsealedUninheritedInternalTypeRule description
Target: Exortech.NetReflector.Util.ReflectorMember/ReflectorField
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Total
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorMember.cs(≈91)
Go to AvoidUnsealedUninheritedInternalTypeRule description
Problem:A visible method does not check its parameter(s) for null values.
Solution:Since the caller is unknown you should always verify all of your parameters to protect yourself.
32 defect(s) found:
Target: System.Xml.XmlNode Exortech.NetReflector.ReflectionPreprocessorAttribute::Invoke(System.Object,System.Xml.XmlNode)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: parent
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectionPreprocessorAttribute.cs(≈23)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: Exortech.NetReflector.ReflectorPropertyAttribute Exortech.NetReflector.ReflectorPropertyAttribute::GetAttribute(System.Reflection.MemberInfo)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: member
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorPropertyAttribute.cs(≈67)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.ReflectorTypeAttribute::Write(System.Xml.XmlWriter,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: target
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorTypeAttribute.cs(≈47)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: Exortech.NetReflector.ReflectorTypeAttribute modopt(Exortech.NetReflector.ReflectorHashAttribute) Exortech.NetReflector.ReflectorTypeAttribute::GetAttribute(System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: target
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorTypeAttribute.cs(≈52)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: Exortech.NetReflector.ReflectorTypeAttribute modopt(System.EventArgs) Exortech.NetReflector.ReflectorTypeAttribute::GetAttribute(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: type
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\attributes\ReflectorTypeAttribute.cs(≈57)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.Generators.XmlDocumentationGenerator::Write(System.Xml.XmlWriter)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈32)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.Generators.XmlDocumentationGenerator::WriteIfNotNull(System.Xml.XmlWriter,System.String,System.String)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈60)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.Generators.XmlDocumentationGenerator::WriteIfNotNull(System.Xml.XmlWriter,System.String,System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈65)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.Generators.XmlMemberDocumentationGenerator::Write(System.Xml.XmlWriter,Exortech.NetReflector.IXmlTypeSerialiser)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈73)
Severity: High
Confidence: Normal
Location: typeSerialiser
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈73)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.NetReflector::CheckNull(System.Object,System.String,System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: expected
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈193)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.NetReflectorTypeTable::Add(System.AppDomain)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: appDomain
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs(≈71)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: Exortech.NetReflector.IXmlMemberSerialiser Exortech.NetReflector.DefaultSerialiserFactory::Create(Exortech.NetReflector.Util.ReflectorMember,Exortech.NetReflector.ReflectorPropertyAttribute)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: member
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\DefaultSerialiserFactory.cs(≈8)
Severity: High
Confidence: Normal
Location: attribute
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\DefaultSerialiserFactory.cs(≈8)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.XmlMemberSerialiser::Write(System.Xml.XmlWriter,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs(≈35)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.XmlMemberSerialiser::WriteValue(System.Xml.XmlWriter,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs(≈56)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Object Exortech.NetReflector.XmlMemberSerialiser::Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: childNode
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs(≈123)
Severity: Medium
Confidence: Normal
Location: table
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs(≈123)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Object Exortech.NetReflector.XmlMemberSerialiser::ReadValue(System.Xml.XmlNode,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: node
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs(≈171)
Severity: Medium
Confidence: Normal
Location: table
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlMemberSerialiser.cs(≈171)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.XmlCollectionSerialiser::WriteValue(System.Xml.XmlWriter,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlCollectionSerialiser.cs(≈15)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Object Exortech.NetReflector.XmlCollectionSerialiser::Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: node
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlCollectionSerialiser.cs(≈36)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Object Exortech.NetReflector.XmlArraySerialiser::Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: instanceType
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlArraySerialiser.cs(≈16)
Severity: Medium
Confidence: Normal
Location: node
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlArraySerialiser.cs(≈16)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.XmlDictionarySerialiser::WriteValue(System.Xml.XmlWriter,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlDictionarySerialiser.cs(≈18)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Object Exortech.NetReflector.XmlDictionarySerialiser::Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: Normal
Location: node
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlDictionarySerialiser.cs(≈47)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.XmlTypeSerialiser::Write(System.Xml.XmlWriter,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs(≈67)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Void Exortech.NetReflector.XmlTypeSerialiser::ReadMembers(System.Xml.XmlNode,System.Object,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: node
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlTypeSerialiser.cs(≈90)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Object Exortech.NetReflector.Util.DefaultInstantiator::Instantiate(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: type
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\DefaultInstantiator.cs(≈8)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Boolean Exortech.NetReflector.Util.ReflectionUtil::IsCommonType(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: t
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectionUtil.cs(≈10)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: Exortech.NetReflector.Util.ReflectorMember Exortech.NetReflector.Util.ReflectorMember::Create(System.Reflection.MemberInfo)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: memberInfo
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorMember.cs(≈30)
Go to CheckParametersNullityInVisibleMethodsRule description
Target: System.Xml.XmlNode Exortech.NetReflector.Util.XmlUtil::GetChildNode(System.Xml.XmlNode,System.String)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: node
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\XmlUtil.cs(≈7)
Go to CheckParametersNullityInVisibleMethodsRule description
Problem:This type contains only static fields and methods and should be static.
Solution:Change this type into a static type to gain clarity and better error reporting.
4 defect(s) found:
Target: Exortech.NetReflector.NetReflector
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Go to ConsiderUsingStaticTypeRule description
Target: Exortech.NetReflector.Util.ReflectionUtil
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectionUtil.cs(≈7)
Go to ConsiderUsingStaticTypeRule description
Target: Exortech.NetReflector.Util.StringUtil
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\StringUtil.cs(≈9)
Go to ConsiderUsingStaticTypeRule description
Target: Exortech.NetReflector.Util.XmlUtil
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Go to ConsiderUsingStaticTypeRule description
Problem:The delegate which handles the event haven't the correct signature.
Solution:You should correct the signature, return type, parameter types or parameter names.
2 defect(s) found:
Target: Exortech.NetReflector.NetReflectorTypeTable
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Location: Exortech.NetReflector.InvalidNodeEventHandler
Details: The delegate should have 2 parameters
Severity: Medium
Confidence: High
Location: Exortech.NetReflector.InvalidNodeEventHandler
Details: The first parameter should have an object, not Exortech.NetReflector.InvalidNodeEventArgs
Go to DeclareEventHandlersCorrectlyRule description
Problem:The method catch a non-specific exception. This will likely hide the original problem to the callers.
Solution:You can rethrow the original exception, to avoid destroying the stacktrace, or you can handle more specific exceptions.
2 defect(s) found:
Target: System.Object Exortech.NetReflector.Util.DefaultInstantiator::Instantiate(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\DefaultInstantiator.cs(≈14)
Go to DoNotSwallowErrorsCatchingNonSpecificExceptionsRule description
Target: System.Object Exortech.NetReflector.Util.ReflectorTypeConverter::Convert(System.Type,System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\ReflectorTypeConverter.cs(≈20)
Go to DoNotSwallowErrorsCatchingNonSpecificExceptionsRule description
Problem:A method throws an exception it should not.
Solution:Change the code so that it does not throw, throw a correct exception, or trap exceptions.
1 defect(s) found:
Target: System.String Exortech.NetReflector.Generators.XsdTypes::get_Item(System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XsdTypes.cs(≈30)
Details: Indexed getters should only throw System.InvalidOperationException, System.NotSupportedException, System.ArgumentException, System.Collections.Generic.KeyNotFoundException or a subclass.
Go to DoNotThrowInUnexpectedLocationRule description
Problem:This disposable local is not guaranteed to be disposed of before the method returns.
Solution:Use a 'using' statement or surround the local's usage with a try/finally block.
2 defect(s) found:
Target: System.Void Exortech.NetReflector.Generators.XmlDocumentationGenerator::WriteIndented(System.IO.TextWriter)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Generators\XmlDocumentationGenerator.cs(≈27)
Details: Local 'xmlWriter' of type 'XmlTextWriter' is not disposed of (at least not locally).
Go to EnsureLocalDisposalRule description
Target: System.String Exortech.NetReflector.NetReflector::Write(System.Object)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈108)
Details: Local 'buffer' of type 'StringWriter' is not disposed of (at least not locally).
Go to EnsureLocalDisposalRule description
Problem:This type implements non-generic IEnumerable interface but does not implement IEnumerable<T> interface that will make your collection type-safe.
Solution:Implement one of generic collection interfaces such as IEnumerable<T>, ICollection<T> or IList<T>.
2 defect(s) found:
Target: Exortech.NetReflector.NetReflectorTypeTable
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs(≈14)
Go to ImplementGenericCollectionInterfacesRule description
Target: Exortech.NetReflector.Util.XmlElementList
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\XmlElementList.cs(≈8)
Go to ImplementGenericCollectionInterfacesRule description
Problem:This method throws ArgumentException (or derived) exceptions without specifying an existing parameter name. This can hide useful information to developers.
Solution:Fix the exception parameters to use the correct parameter name (or make sure the parameters are in the right order).
1 defect(s) found:
Target: System.Void Exortech.NetReflector.NetReflector::CheckNull(System.Object,System.String,System.Type)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈197)
Go to InstantiateArgumentExceptionCorrectlyRule description
Problem:This assembly is not decorated with the [CLSCompliant] attribute.
Solution:Add this attribute to ease the use (or non-use) of your assembly by CLS consumers.
1 defect(s) found:
Target: NetReflectorDocumenterTask, Version=1.0.9.55, Culture=neutral, PublicKeyToken=null
Assembly: NetReflectorDocumenterTask, Version=1.0.9.55, Culture=neutral, PublicKeyToken=null
Severity: High
Confidence: Total
Go to MarkAssemblyWithCLSCompliantRule description
Problem:This assembly is not decorated with the [ComVisible] attribute.
Solution:Add this attribute to ease the use (or non-use) of your assembly by COM consumers.
1 defect(s) found:
Target: NetReflectorDocumenterTask, Version=1.0.9.55, Culture=neutral, PublicKeyToken=null
Assembly: NetReflectorDocumenterTask, Version=1.0.9.55, Culture=neutral, PublicKeyToken=null
Severity: Medium
Confidence: Total
Go to MarkAssemblyWithComVisibleRule description
Problem:This method overrides (or implement) an existing method but does not use the same parameter names as the original.
Solution:Keep parameter names consistent when overriding a class or implementing an interface.
3 defect(s) found:
Target: Exortech.NetReflector.IXmlMemberSerialiser Exortech.NetReflector.DefaultSerialiserFactory::Create(Exortech.NetReflector.Util.ReflectorMember,Exortech.NetReflector.ReflectorPropertyAttribute)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\DefaultSerialiserFactory.cs(≈8)
Details: The name of parameter #1 (member) does not match the name of the parameter in the overriden method (memberInfo).
Go to ParameterNamesShouldMatchOverriddenMethodRule description
Target: System.Object Exortech.NetReflector.XmlCollectionSerialiser::Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlCollectionSerialiser.cs(≈36)
Details: The name of parameter #1 (node) does not match the name of the parameter in the overriden method (childNode).
Go to ParameterNamesShouldMatchOverriddenMethodRule description
Target: System.Object Exortech.NetReflector.XmlDictionarySerialiser::Read(System.Xml.XmlNode,System.Type,Exortech.NetReflector.NetReflectorTypeTable)
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlDictionarySerialiser.cs(≈47)
Details: The name of parameter #1 (node) does not match the name of the parameter in the overriden method (childNode).
Go to ParameterNamesShouldMatchOverriddenMethodRule description
Problem:Static readonly fields were found where a literal (const) field could be used.
Solution:Replace the static readonly fields with const(ant) fields.
1 defect(s) found:
Target: Exortech.NetReflector.XmlCollectionSerialiser
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: Normal
Location: System.String Exortech.NetReflector.XmlCollectionSerialiser::elementName
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\Serialisers\XmlCollectionSerialiser.cs(≈11)
Go to PreferLiteralOverInitOnlyFieldsRule description
Problem:This type contains disposable field(s) but doesn't implement IDisposable.
Solution:Implement IDisposable and free the disposable field(s) in its Dispose method.
1 defect(s) found:
Target: Exortech.NetReflector.NetReflectorWriter
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: High
Confidence: High
Location: System.Xml.XmlWriter Exortech.NetReflector.NetReflectorWriter::writer
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflector.cs(≈11)
Details: Field implement IDisposable. Type should implement a Dispose() method
Go to TypesWithDisposableFieldsShouldBeDisposableRule description
Problem:This type does not end with the correct suffix. That usually happens when you define a custom attribute or exception and forget appending suffixes like 'Attribute' or 'Exception' to the type name.
Solution:Rename the type and append the correct suffix.
3 defect(s) found:
Target: Exortech.NetReflector.IReflectorAttribute
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Details: 'IReflectorAttribute' should only be used for types that inherits or implements System.Attribute.
Go to UseCorrectSuffixRule description
Target: Exortech.NetReflector.NetReflectorTypeTable
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\NetReflectorTypeTable.cs(≈14)
Details: The type name does not end with 'Collection' suffix. Append it to the type name.
Go to UseCorrectSuffixRule description
Target: Exortech.NetReflector.Util.XmlElementList
Assembly: NetReflector, Version=1.0.9.55, Culture=neutral, PublicKeyToken=2f4dd8b32acbcd8e
Severity: Medium
Confidence: High
Source: d:\Build\Projects\NetReflector\SCM\src\NetReflector\util\XmlElementList.cs(≈8)
Details: The type name does not end with 'Collection' suffix. Append it to the type name.
Go to UseCorrectSuffixRule description