Skip to content

Commit

Permalink
inspection fix (rubberduck-vba#1696)
Browse files Browse the repository at this point in the history
* added AsTypeName to the context-sensitive commandbar

* clear built-in references at every resolution; fixed issue with null parse trees, given built-in modules get a module state instance.

* fixed OverflowException in GetTypeName; built-in parameters now have return type info :)

* returning built-in members now have return type info as well

* removed hard-coded defaults in ClassModuleDeclaration

* added IsBadReadPtr check in COM declarations collector

* Implemented CanExecute in Project Explorer rename command

* cleaned up FormDesignerRefactorRename command

* fixed IOExceptions in QualifiedModuleName

* use filename, not buildfilename

* GetDisplayName being the part in parens, should be null when not applicable; made it private

* renamed namespace Rubberduck.UI.CodeInspections to Rubberduck.UI.Inspections for consistency with Rubberduck.Inspections namespace

* changed background color of bottom panel in CodeExplorer and InspectionResults toolwindows

* fixed broken keybinding "Esc" -> "Escape"

* added copy/export button to SearchView (todo: implement ExecuteCopyResultsCommand)

* Revert "added copy/export button to SearchView (todo: implement ExecuteCopyResultsCommand)"

This reverts commit e9946b7.

* assert ProjectId isn't null

* fixes rubberduck-vba#1664

* some French translations

* fixed possible NRE's in QualifiedModuleName

* fixes rubberduck-vba#1671

* changed wording of fr resources for settings dialog (left pane items)

* fixes rubberduck-vba#1672

* more French translations

* fix RuntimeBinderException with optional object parameters (resolver bug)

* fixed AsTypeName of optional parameters with a default value

* fixed "resolving" state in the status bar

* fixed FunctionReturnValueNotUsed firing on Sub procedures
  • Loading branch information
retailcoder committed Jun 4, 2016
1 parent e1a3e8a commit 8428eb4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ public override IEnumerable<InspectionResultBase> GetInspectionResults()
var nonInterfaceFunctions = functions.Except(interfaceMembers.Union(interfaceImplementationMembers));
var nonInterfaceIssues = GetNonInterfaceIssues(nonInterfaceFunctions);
return interfaceMemberIssues.Union(nonInterfaceIssues);
//// Temporarily disabled until fix for lack of context because of new resolver is found...
//return new List<InspectionResultBase>();
}

private IEnumerable<FunctionReturnValueNotUsedInspectionResult> GetInterfaceMemberIssues(IEnumerable<Declaration> interfaceMembers)
{
return from interfaceMember in interfaceMembers
let implementationMembers =
UserDeclarations.FindInterfaceImplementationMembers(interfaceMember.IdentifierName).ToList()
where
where interfaceMember.DeclarationType == DeclarationType.Function &&
!IsReturnValueUsed(interfaceMember) &&
implementationMembers.All(member => !IsReturnValueUsed(member))
let implementationMemberIssues =
Expand All @@ -58,7 +56,7 @@ private IEnumerable<FunctionReturnValueNotUsedInspectionResult> GetInterfaceMemb

private IEnumerable<FunctionReturnValueNotUsedInspectionResult> GetNonInterfaceIssues(IEnumerable<Declaration> nonInterfaceFunctions)
{
var returnValueNotUsedFunctions = nonInterfaceFunctions.Where(function => !IsReturnValueUsed(function));
var returnValueNotUsedFunctions = nonInterfaceFunctions.Where(function => function.DeclarationType == DeclarationType.Function && !IsReturnValueUsed(function));
var nonInterfaceIssues = returnValueNotUsedFunctions
.Select(function =>
new FunctionReturnValueNotUsedInspectionResult(
Expand Down

0 comments on commit 8428eb4

Please sign in to comment.