Skip to content

Commit efe1248

Browse files
authored
Merge pull request #4746 from comintern/next
Last minute fixes.
2 parents f2b6725 + 143541a commit efe1248

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ public ICodeExplorerNode SelectedItem
102102
return;
103103
}
104104

105-
_selectedItem = value;
106105
ExpandToNode(value);
106+
_selectedItem = value;
107107

108108
OnPropertyChanged();
109109

@@ -434,12 +434,12 @@ private void ExpandToNode(ICodeExplorerNode node)
434434
{
435435
while (true)
436436
{
437+
node = node.Parent;
437438
if (node == null)
438439
{
439440
return;
440441
}
441442
node.IsExpanded = true;
442-
node = node.Parent;
443443
}
444444
}
445445

Rubberduck.Resources/Inspections/InspectionNames.de.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@
337337
<value>'On Local Error'-Direktive</value>
338338
</data>
339339
<data name="IsMissingOnInappropriateArgumentInspection" xml:space="preserve">
340-
<value>Unpassende Verwendung der 'IsMissing'-Funktion</value>
340+
<value>Unpassende Verwendung der 'IsMissing'-Funktion - Parameter ist nicht vom Typ Variant</value>
341341
</data>
342342
<data name="IsMissingWithNonArgumentParameterInspection" xml:space="preserve">
343-
<value>Unpassende Verwendung der 'IsMissing'-Funktion</value>
343+
<value>Unpassende Verwendung der 'IsMissing'-Funktion - Lokale Variable kann nie fehlen</value>
344344
</data>
345345
<data name="AssignmentNotUsedInspection" xml:space="preserve">
346346
<value>Zuweisung wird nie gelesen</value>

Rubberduck.Resources/Inspections/InspectionNames.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@
337337
<value>On Local Error statement</value>
338338
</data>
339339
<data name="IsMissingOnInappropriateArgumentInspection" xml:space="preserve">
340-
<value>Inappropriate use of 'IsMissing' function</value>
340+
<value>Inappropriate use of 'IsMissing' - Parameter is not 'Variant'</value>
341341
</data>
342342
<data name="IsMissingWithNonArgumentParameterInspection" xml:space="preserve">
343-
<value>Inappropriate use of 'IsMissing' function</value>
343+
<value>Inappropriate use of 'IsMissing' - Parameter is local variable</value>
344344
</data>
345345
<data name="AssignmentNotUsedInspection" xml:space="preserve">
346346
<value>Assignment is not used</value>

RubberduckTests/Inspections/GeneralInspectionTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ public void InspectionNameStringsExist()
5252
Assert.IsFalse(inspections.Any(), string.Join(Environment.NewLine, inspections));
5353
}
5454

55+
[Test]
56+
[Category("Inspections")]
57+
public void InspectionNameStringsAreUnique()
58+
{
59+
var inspections = typeof(InspectionBase).Assembly.GetTypes()
60+
.Where(type => GetAllBaseTypes(type).Contains(typeof(InspectionBase)) && !type.IsAbstract)
61+
.Select(i => i.Name)
62+
.ToList();
63+
64+
Assert.AreEqual(inspections.Count, inspections.Distinct().Count());
65+
}
66+
5567
[Test]
5668
[Category("Inspections")]
5769
public void InspectionMetaStringsExist()

0 commit comments

Comments
 (0)