Skip to content

Commit aac8cb5

Browse files
committed
Control flow analysis and assignment not used inspection
1 parent 7913c27 commit aac8cb5

26 files changed

+656
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
2+
{
3+
public interface IBranchNode : INode
4+
{
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
2+
{
3+
public interface ILoopNode : INode
4+
{
5+
}
6+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Rubberduck.Parsing.Symbols;
2+
using System.Collections.Immutable;
3+
4+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
5+
{
6+
public interface INode
7+
{
8+
int SortOrder { get; set; }
9+
ImmutableList<INode> Children { get; set; }
10+
INode Parent { get; set; }
11+
12+
Declaration Declaration { get; set; }
13+
IdentifierReference Reference { get; set; }
14+
}
15+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Collections.Immutable;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class AssignmentNode : INode
8+
{
9+
public AssignmentNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Collections.Immutable;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class BlockNode : INode
8+
{
9+
public BlockNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Collections.Immutable;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class BranchNode : IBranchNode
8+
{
9+
public BranchNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Collections.Immutable;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class DeclarationNode : INode
8+
{
9+
public DeclarationNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Collections.Immutable;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class GenericNode : INode
8+
{
9+
public GenericNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Rubberduck.Parsing.Symbols;
2+
using System.Collections.Generic;
3+
using System.Collections.Immutable;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class LoopNode : ILoopNode
8+
{
9+
public LoopNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Collections.Immutable;
3+
using Rubberduck.Parsing.Symbols;
4+
5+
namespace Rubberduck.Inspections.CodePathAnalysis.Nodes
6+
{
7+
public class ReferenceNode : INode
8+
{
9+
public ReferenceNode()
10+
{
11+
Children = new List<INode>().ToImmutableList();
12+
}
13+
14+
public int SortOrder { get; set; }
15+
public ImmutableList<INode> Children { get; set; }
16+
public INode Parent { get; set; }
17+
18+
public Declaration Declaration { get; set; }
19+
public IdentifierReference Reference { get; set; }
20+
}
21+
}

0 commit comments

Comments
 (0)