diff --git a/RetailCoder.VBE/Inspections/InspectionNames.Designer.cs b/RetailCoder.VBE/Inspections/InspectionNames.Designer.cs
index 1d86cd5650..9e94b3130c 100644
--- a/RetailCoder.VBE/Inspections/InspectionNames.Designer.cs
+++ b/RetailCoder.VBE/Inspections/InspectionNames.Designer.cs
@@ -60,6 +60,24 @@ internal class InspectionNames {
}
}
+ ///
+ /// Looks up a localized string similar to Use of obsolete type hint in {0} '{1}'.
+ ///
+ internal static string _ObsoleteTypeHint_ {
+ get {
+ return ResourceManager.GetString("_ObsoleteTypeHint_", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} '{1}' is implicitly Variant.
+ ///
+ internal static string _TypeNotDeclared_ {
+ get {
+ return ResourceManager.GetString("_TypeNotDeclared_", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to ByVal parameter '{0}' is assigned.
///
@@ -177,15 +195,6 @@ internal class InspectionNames {
}
}
- ///
- /// Looks up a localized string similar to Use of obsolete type hints in identifier '{0}'.
- ///
- internal static string ObsoleteTypeHint_ {
- get {
- return ResourceManager.GetString("ObsoleteTypeHint_", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Potentially confusing implicit array lower bound.
///
@@ -266,14 +275,5 @@ internal class InspectionNames {
return ResourceManager.GetString("VariableNotUsed_", resourceCulture);
}
}
-
- ///
- /// Looks up a localized string similar to Variable '{0}' is implicitly Variant.
- ///
- internal static string VariableTypeNotDeclared_ {
- get {
- return ResourceManager.GetString("VariableTypeNotDeclared_", resourceCulture);
- }
- }
}
}
diff --git a/RetailCoder.VBE/Inspections/InspectionNames.resx b/RetailCoder.VBE/Inspections/InspectionNames.resx
index 60a4b9c361..ed6d1ace06 100644
--- a/RetailCoder.VBE/Inspections/InspectionNames.resx
+++ b/RetailCoder.VBE/Inspections/InspectionNames.resx
@@ -156,9 +156,6 @@
Use of obsolete Let statement
-
- Use of obsolete type hints in identifier '{0}'
-
Potentially confusing implicit array lower bound
@@ -186,7 +183,10 @@
Variable '{0}' is never used
-
- Variable '{0}' is implicitly Variant
+
+ Use of obsolete type hint in {0} '{1}'
+
+
+ {0} '{1}' is implicitly Variant
\ No newline at end of file
diff --git a/RetailCoder.VBE/Inspections/ObsoleteTypeHintInspection.cs b/RetailCoder.VBE/Inspections/ObsoleteTypeHintInspection.cs
index d9b707842f..da81fbeb1b 100644
--- a/RetailCoder.VBE/Inspections/ObsoleteTypeHintInspection.cs
+++ b/RetailCoder.VBE/Inspections/ObsoleteTypeHintInspection.cs
@@ -11,7 +11,7 @@ public ObsoleteTypeHintInspection()
Severity = CodeInspectionSeverity.Hint;
}
- public string Name { get { return InspectionNames.ObsoleteTypeHint_; } }
+ public string Name { get { return InspectionNames._ObsoleteTypeHint_; } }
public CodeInspectionType InspectionType { get { return CodeInspectionType.LanguageOpportunities; } }
public CodeInspectionSeverity Severity { get; set; }
@@ -19,11 +19,11 @@ public IEnumerable GetInspectionResults(VBProjectParse
{
var declarations = from item in parseResult.Declarations.Items
where item.HasTypeHint()
- select new ObsoleteTypeHintInspectionResult(string.Format(Name, item.IdentifierName), Severity, new QualifiedContext(item.QualifiedName, item.Context));
+ select new ObsoleteTypeHintInspectionResult(string.Format(Name, item.DeclarationType, item.IdentifierName), Severity, new QualifiedContext(item.QualifiedName, item.Context), item);
var references = from item in parseResult.Declarations.Items.SelectMany(d => d.References)
where item.HasTypeHint()
- select new ObsoleteTypeHintInspectionResult(string.Format(Name, item.IdentifierName), Severity, new QualifiedContext(item.QualifiedModuleName, item.Context));
+ select new ObsoleteTypeHintInspectionResult(string.Format(Name, "usage of " + item.Declaration.DeclarationType.ToString().ToLower(), item.IdentifierName), Severity, new QualifiedContext(item.QualifiedModuleName, item.Context), item.Declaration);
return declarations.Union(references);
}
diff --git a/RetailCoder.VBE/Inspections/VariableTypeNotDeclaredInspection.cs b/RetailCoder.VBE/Inspections/VariableTypeNotDeclaredInspection.cs
index c0d600ffab..f0b50b64f0 100644
--- a/RetailCoder.VBE/Inspections/VariableTypeNotDeclaredInspection.cs
+++ b/RetailCoder.VBE/Inspections/VariableTypeNotDeclaredInspection.cs
@@ -13,7 +13,7 @@ public VariableTypeNotDeclaredInspection()
Severity = CodeInspectionSeverity.Suggestion;
}
- public string Name { get { return InspectionNames.VariableTypeNotDeclared_; } }
+ public string Name { get { return InspectionNames._TypeNotDeclared_; } }
public CodeInspectionType InspectionType { get { return CodeInspectionType.LanguageOpportunities; } }
public CodeInspectionSeverity Severity { get; set; }
@@ -23,7 +23,7 @@ public IEnumerable GetInspectionResults(VBProjectParse
where (item.DeclarationType == DeclarationType.Variable
|| item.DeclarationType == DeclarationType.Constant)
&& !item.IsTypeSpecified()
- select new VariableTypeNotDeclaredInspectionResult(string.Format(Name, item.IdentifierName), Severity, item.Context, item.QualifiedName.QualifiedModuleName);
+ select new VariableTypeNotDeclaredInspectionResult(string.Format(Name, item.DeclarationType, item.IdentifierName), Severity, item.Context, item.QualifiedName.QualifiedModuleName);
return issues;
}