Skip to content

Commit 2ed12ac

Browse files
committed
all tests pass
1 parent f3ed0e1 commit 2ed12ac

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

RetailCoder.VBE/Inspections/HostSpecificExpressionInspection.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
using System.Linq;
33
using Rubberduck.Inspections.Abstract;
44
using Rubberduck.Inspections.Resources;
5+
using Rubberduck.Inspections.Results;
6+
using Rubberduck.Parsing.Symbols;
57
using Rubberduck.Parsing.VBA;
68

79
namespace Rubberduck.Inspections
@@ -19,7 +21,8 @@ public HostSpecificExpressionInspection(RubberduckParserState state)
1921

2022
public override IEnumerable<InspectionResultBase> GetInspectionResults()
2123
{
22-
return Enumerable.Empty<InspectionResultBase>();
24+
return Declarations.Where(item => item.DeclarationType == DeclarationType.BracketedExpression)
25+
.Select(item => new HostSpecificExpressionInspectionResult(this, item)).ToList();
2326
}
2427
}
2528
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Rubberduck.Inspections.Abstract;
2+
using Rubberduck.Inspections.Resources;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.Results
6+
{
7+
public class HostSpecificExpressionInspectionResult : InspectionResultBase
8+
{
9+
public HostSpecificExpressionInspectionResult(IInspection inspection, Declaration target)
10+
: base(inspection, target)
11+
{
12+
}
13+
14+
public override string Description
15+
{
16+
get
17+
{
18+
return string.Format(InspectionsUI.HostSpecificExpressionInspectionResultFormat, Target.IdentifierName);
19+
}
20+
}
21+
}
22+
}

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@
376376
<DependentUpon>InspectionsUI.resx</DependentUpon>
377377
</Compile>
378378
<Compile Include="Inspections\Results\AggregateInspectionResult.cs" />
379+
<Compile Include="Inspections\Results\HostSpecificExpressionInspectionResult.cs" />
379380
<Compile Include="Inspections\Results\ImplicitDefaultMemberAssignmentInspectionResult.cs" />
380381
<Compile Include="Inspections\QuickFixes\IntroduceLocalVariableQuickFix.cs" />
381382
<Compile Include="Inspections\QuickFixes\OptionExplicitQuickFix.cs" />

0 commit comments

Comments
 (0)