Commits

Nerzhul500 committed 3415142

Code clean up

  • Participants
  • Parent commits 01e0c6e
  • Branches resharper7

Comments (0)

Files changed (1)

File ReSpeller/Analyzers/IdentifierTypoAnalyzer.cs

 
     protected override void Run(IIdentifier element, ElementProblemAnalyzerData analyzerData, IHighlightingConsumer consumer)
     {
-      var containingNode = element.GetContainingNode<INamespaceDeclaration>();
-      IDeclaration declaration = null;
-      
+      IDeclaration declaration;
       if (element.Language.Is<VBLanguage>() && element.Parent is IQualifiedNamespaceName)
       {
-        //var namespaceName = element.Parent.Parent as INamespaceDeclaration;
-        //namespaceName.
-        
         declaration = element.Parent.Parent as IDeclaration; // handle VB namespace
       }
       else
       {
         declaration = element.Parent as IDeclaration;        
       }
-      var treeNode = element as ITreeNode; 
       if (declaration is IAccessorDeclaration)
         return; // property getter or setter -> ignore
 
       if (declaration == null) 
         return;
 
+      var treeNode = element as ITreeNode;
       var namespaceDeclaration = declaration as INamespaceDeclaration;
       bool isNamespace = namespaceDeclaration != null;