Skip to content

Commit 5c3b509

Browse files
author
Quoc Truong
committed
Merge branch 'dscresource-quoc' of https://github.com/PowerShell/ScriptAnalyzer into dscresource-quoc
Conflicts: Engine/Helper.cs Rules/ReturnCorrectTypesForDSCFunctions.cs
2 parents 6b46bb7 + 01a9d25 commit 5c3b509

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Engine/Helper.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,11 @@ public int Compare(Tuple<int, int> t1, Tuple<int, int> t2)
624624
/// </summary>
625625
public class FindPipelineOutput : ICustomAstVisitor
626626
{
627+
<<<<<<< HEAD
627628
List<Tuple<string, StatementAst>> outputTypes;
629+
=======
630+
List<string> outputTypes;
631+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
628632

629633
IEnumerable<TypeDefinitionAst> classes;
630634

@@ -665,7 +669,11 @@ static FindPipelineOutput()
665669
/// <param name="ast"></param>
666670
public FindPipelineOutput(FunctionDefinitionAst ast, IEnumerable<TypeDefinitionAst> classes)
667671
{
672+
<<<<<<< HEAD
668673
outputTypes = new List<Tuple<string, StatementAst>>();
674+
=======
675+
outputTypes = new List<string>();
676+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
669677
Helper.Instance.InitializeVariableAnalysis(ast);
670678
this.classes = classes;
671679
myFunction = ast;
@@ -677,12 +685,24 @@ public FindPipelineOutput(FunctionDefinitionAst ast, IEnumerable<TypeDefinitionA
677685
}
678686

679687
/// <summary>
688+
<<<<<<< HEAD
680689
/// Get list of outputTypes from functiondefinitionast funcast
681690
/// </summary>
682691
/// <returns></returns>
683692
public static List<Tuple<string, StatementAst>> OutputTypes(FunctionDefinitionAst funcAst, IEnumerable<TypeDefinitionAst> classes)
684693
{
685694
return (new FindPipelineOutput(funcAst, classes)).outputTypes;
695+
=======
696+
/// Get list of outputTypes
697+
/// </summary>
698+
/// <returns></returns>
699+
public List<string> OutputTypes
700+
{
701+
get
702+
{
703+
return outputTypes;
704+
}
705+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
686706
}
687707

688708
/// <summary>
@@ -807,12 +827,20 @@ public object VisitNamedBlock(NamedBlockAst namedBlockAst)
807827
{
808828
if (namedBlockAst != null)
809829
{
830+
<<<<<<< HEAD
810831
foreach (StatementAst block in namedBlockAst.Statements)
832+
=======
833+
foreach (var block in namedBlockAst.Statements)
834+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
811835
{
812836
object type = block.Visit(this);
813837
if (type != null && type is string && !String.IsNullOrWhiteSpace(type as string))
814838
{
839+
<<<<<<< HEAD
815840
outputTypes.Add(Tuple.Create(type as string, block));
841+
=======
842+
outputTypes.Add(type as string);
843+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
816844
}
817845
}
818846
}
@@ -829,12 +857,20 @@ public object VisitStatementBlock(StatementBlockAst statementBlockAst)
829857
{
830858
if (statementBlockAst != null)
831859
{
860+
<<<<<<< HEAD
832861
foreach (StatementAst block in statementBlockAst.Statements)
862+
=======
863+
foreach (var block in statementBlockAst.Statements)
864+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
833865
{
834866
object type = block.Visit(this);
835867
if (type != null && type is string && !String.IsNullOrWhiteSpace(type as string))
836868
{
869+
<<<<<<< HEAD
837870
outputTypes.Add(Tuple.Create(type as string, block));
871+
=======
872+
outputTypes.Add(type as string);
873+
>>>>>>> 01a9d251e1344f53c7a881fccacc5123ce02827a
838874
}
839875
}
840876
}

0 commit comments

Comments
 (0)