Merge pull request #100 from microsoft/powershell-fewer-pipelines-in-db

PS: Remove spurious `Pipeline`s in the DB
This commit is contained in:
Mathias Vorreiter Pedersen
2024-09-23 13:24:17 +01:00
committed by GitHub
77 changed files with 6706 additions and 277 deletions

View File

@@ -80,7 +80,7 @@ case "${lang}" in
java)
scheme_file="${lang}/ql/lib/config/semmlecode.dbscheme"
;;
csharp | cpp | javascript | python)
csharp | cpp | javascript | python | powershell)
scheme_file="${lang}/ql/lib/semmlecode.${lang}.dbscheme"
;;
go | ruby | swift)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Remove Pipelines with one element.
compatibility: partial

View File

@@ -19,7 +19,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var subExpression = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.SubExpression);
trapFile.array_expression(this, subExpression);
trapFile.array_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -23,7 +23,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var entity = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Elements[index]);
trapFile.array_literal_element(this, index, entity);
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -19,7 +19,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var right = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Right);
trapFile.assignment_statement(this, Fragment.Operator, left, right);
trapFile.assignment_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -28,7 +28,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.attribute_positional_argument(this, i,
EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.PositionalArguments[i]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.attributed_expression(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Attribute),
EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Child));
trapFile.attributed_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -18,7 +18,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var right = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Right);
trapFile.binary_expression(this, Fragment.Operator, left, right);
trapFile.binary_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -16,7 +16,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.block_statement(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Body), TokenEntity.Create(PowerShellContext, Fragment.Kind));
trapFile.block_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -22,7 +22,7 @@ namespace Semmle.Extraction.PowerShell.Entities
}
trapFile.break_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.catch_clause_catch_type(this, index, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.CatchTypes[index]));
}
trapFile.catch_clause_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -31,7 +31,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var entity = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Redirections[index]);
trapFile.command_redirection(this, index, entity);
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -23,7 +23,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.command_expression_redirection(this, index, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Redirections[index]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.command_parameter_argument(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext,Fragment.Argument));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.configuration_definition(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Body), Fragment.ConfigurationType, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.InstanceName));
trapFile.configuration_definition_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -22,7 +22,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.constant_expression_value(this,
StringLiteralEntity.Create(PowerShellContext, ReportingLocation, strVal));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
trapFile.constant_expression_location(this, TrapSuitableLocation);
}

View File

@@ -22,7 +22,7 @@ namespace Semmle.Extraction.PowerShell.Entities
}
trapFile.continue_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var type = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Type);
trapFile.convert_expression(this, attribute, child, type, Fragment.StaticType.Name);
trapFile.convert_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -25,7 +25,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.data_statement_commands_allowed(this, i, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.CommandsAllowed[i]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -27,7 +27,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.do_until_statement_condition(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Condition));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -27,7 +27,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.do_while_statement_condition(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Condition));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.dynamic_keyword_statement_command_elements(this, index, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.CommandElements[index]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -24,7 +24,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.error_expression_nested_ast(this, index, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.NestedAst[index]));
}
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -39,7 +39,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.error_statement_bodies(this, index, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Bodies[index]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
trapFile.error_statement_location(this, TrapSuitableLocation);
}

View File

@@ -20,7 +20,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.exit_statement_pipeline(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Pipeline));
}
trapFile.exit_statement(this);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
trapFile.exit_statement_location(this, TrapSuitableLocation);
}

View File

@@ -25,7 +25,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.expandable_string_expression_nested_expression(this, index,
EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.NestedExpressions[index]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.file_redirection(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Location),
Fragment.Append, Fragment.FromStream);
trapFile.file_redirection_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -24,7 +24,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.label(this, Fragment.Label);
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -37,7 +37,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.for_statement_iterator(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Iterator));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.function_definition_parameter(this, i, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parameters[i]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -29,7 +29,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.function_member_return_type(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.ReturnType));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.hash_table_key_value_pairs(this, index++, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, pair.Item1), EntityConstructor.ConstructAppropriateEntity(PowerShellContext, pair.Item2));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -27,7 +27,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.if_statement_else(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.ElseClause));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -19,7 +19,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var target = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Target);
trapFile.index_expression(this, index, target, Fragment.NullConditional);
trapFile.index_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -27,7 +27,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.invoke_member_expression_argument(this, index, entity);
}
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -20,7 +20,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var member = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Member);
trapFile.member_expression(this, expression, member, Fragment.NullConditional, Fragment.Static);
trapFile.member_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.merging_redirection(this, Fragment.FromStream, Fragment.ToStream);
trapFile.merging_redirection_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -18,7 +18,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.named_attribute_argument(this, Fragment.ArgumentName,
EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Argument));
trapFile.named_attribute_argument_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -25,7 +25,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.named_block_trap(this, index, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Traps[index]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -18,7 +18,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.not_implemented(this, type.FullName ?? type.Name);
trapFile.not_implemented_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -28,7 +28,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.param_block_parameter(this, i,
EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parameters[i]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -29,7 +29,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var entity = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.DefaultValue);
trapFile.parameter_default_value(this, entity);
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.paren_expression(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Pipeline));
trapFile.paren_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.pipeline_chain(this, Fragment.Background, Fragment.Operator, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.LhsPipelineChain), EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.RhsPipeline));
trapFile.pipeline_chain_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -15,6 +15,11 @@ namespace Semmle.Extraction.PowerShell.Entities
public PipelineAst Fragment => Symbol.Item1;
public override void Populate(TextWriter trapFile)
{
// If there is just one element we don't want to include it in the database.
if (Fragment.PipelineElements.Count == 1)
{
return;
}
trapFile.pipeline(this, Fragment.PipelineElements.Count);
trapFile.pipeline_location(this, TrapSuitableLocation);
for (var index = 0; index < Fragment.PipelineElements.Count; index++)
@@ -22,13 +27,17 @@ namespace Semmle.Extraction.PowerShell.Entities
var subEntity = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.PipelineElements[index]);
trapFile.pipeline_component(this, index, subEntity);
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;
public override void WriteId(EscapingTextWriter trapFile)
{
if(Fragment.PipelineElements.Count == 1)
{
return;
}
trapFile.WriteSubId(TrapSuitableLocation);
trapFile.Write(";pipeline");
}

View File

@@ -29,7 +29,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.property_member_initial_value(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.InitialValue));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.return_statement_pipeline(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Pipeline));
}
trapFile.return_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -91,7 +91,7 @@ namespace Semmle.Extraction.PowerShell.Entities
if (Fragment.Parent is not null)
{
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
}

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.script_block_expression(this, ScriptBlockEntity.Create(PowerShellContext, Fragment.ScriptBlock));
trapFile.script_block_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -33,7 +33,7 @@ namespace Semmle.Extraction.PowerShell.Entities
}
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.string_constant_expression(this, StringLiteralEntity.Create(PowerShellContext, ReportingLocation, Fragment.Value));
trapFile.string_constant_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -19,7 +19,7 @@ namespace Semmle.Extraction.PowerShell.Entities
var subExpression = EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.SubExpression);
trapFile.sub_expression(this, subExpression);
trapFile.sub_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -29,7 +29,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.label(this, Fragment.Label);
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -22,7 +22,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.ternary_expression(this, condition, ifFalse, ifTrue);
trapFile.ternary_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.throw_statement_pipeline(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Pipeline));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -24,7 +24,7 @@ namespace Semmle.Extraction.PowerShell.Entities
}
trapFile.trap_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -24,7 +24,7 @@ namespace Semmle.Extraction.PowerShell.Entities
trapFile.try_statement_finally(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Finally));
}
trapFile.try_statement_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.type_constraint(this, Fragment.TypeName.Name ?? string.Empty, Fragment.TypeName.FullName ?? string.Empty);
trapFile.type_constraint_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -30,7 +30,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.type_definition_base_type(this, index, TypeConstraintEntity.Create(PowerShellContext, Fragment.BaseTypes[index]));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -17,7 +17,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.type_expression(this, Fragment.TypeName.Name, Fragment.TypeName.FullName);
trapFile.type_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -16,7 +16,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.unary_expression(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Child), Fragment.TokenKind, Fragment.StaticType.Name);
trapFile.unary_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -16,7 +16,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.using_expression(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.SubExpression));
trapFile.using_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -28,7 +28,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.using_statement_module_specification(this, HashtableEntity.Create(PowerShellContext, Fragment.ModuleSpecification));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -21,7 +21,7 @@ namespace Semmle.Extraction.PowerShell.Entities
Fragment.VariablePath.IsUnscopedVariable, Fragment.VariablePath.IsVariable,
Fragment.VariablePath.IsDriveQualified);
trapFile.variable_expression_location(this, TrapSuitableLocation);
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -27,7 +27,7 @@ namespace Semmle.Extraction.PowerShell.Entities
{
trapFile.while_statement_condition(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Condition));
}
trapFile.parent(this, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, Fragment.Parent));
trapFile.parent(PowerShellContext, this, Fragment.Parent);
}
public override bool NeedsPopulation => true;

View File

@@ -6,6 +6,18 @@ namespace Semmle.Extraction.PowerShell;
public static class EntityConstructor
{
private static Entity CreatePipelineEntity(PowerShellContext powerShellContext, PipelineAst pipelineAst)
{
if (pipelineAst.PipelineElements.Count == 1)
{
return ConstructAppropriateEntity(powerShellContext, pipelineAst.PipelineElements[0]);
}
else
{
return PipelineEntity.Create(powerShellContext, pipelineAst);
}
}
public static Entity ConstructAppropriateEntity(PowerShellContext powerShellContext, Ast ast)
{
return ast switch
@@ -24,7 +36,7 @@ public static class EntityConstructor
MemberExpressionAst memberExpressionAst => MemberExpressionEntity.Create(powerShellContext, memberExpressionAst),
NamedBlockAst namedBlockAst => NamedBlockEntity.Create(powerShellContext, namedBlockAst),
ParenExpressionAst parenExpressionAst => ParenExpressionEntity.Create(powerShellContext, parenExpressionAst),
PipelineAst pipelineAst => PipelineEntity.Create(powerShellContext, pipelineAst),
PipelineAst pipelineAst => CreatePipelineEntity(powerShellContext, pipelineAst),
ScriptBlockAst scriptBlockAst => ScriptBlockEntity.Create(powerShellContext, scriptBlockAst),
StatementBlockAst statementBlockAst => StatementBlockEntity.Create(powerShellContext, statementBlockAst),
StringConstantExpressionAst stringConstantExpressionAst => StringConstantExpressionEntity.Create(powerShellContext, stringConstantExpressionAst),

View File

@@ -411,9 +411,17 @@ namespace Semmle.Extraction.PowerShell
trapFile.WriteTuple("command_parameter_location", commandParameterEntity, location);
}
internal static void parent(this TextWriter trapFile, Entity parent, Entity child)
internal static void parent(this TextWriter trapFile, PowerShellContext PowerShellContext, Entity child, Ast parent)
{
trapFile.WriteTuple("parent", parent, child);
switch(parent)
{
case PipelineAst pipelineAst when pipelineAst.PipelineElements.Count == 1:
trapFile.parent(PowerShellContext, child, parent.Parent);
break;
default:
trapFile.WriteTuple("parent", child, EntityConstructor.ConstructAppropriateEntity(PowerShellContext, parent));
break;
}
}
internal static void binary_expression(this TextWriter trapFile, BinaryExpressionEntity binaryExpressionEntity, TokenKind operation, Entity left, Entity right)
{

View File

@@ -7,7 +7,7 @@ class ThrowStmt extends @throw_statement, Stmt {
if this.hasPipeline() then result = "throw ..." else result = "throw"
}
Pipeline getPipeline() { throw_statement_pipeline(this, result) }
PipelineBase getPipeline() { throw_statement_pipeline(this, result) }
predicate hasPipeline() { exists(this.getPipeline()) }
}

View File

@@ -82,7 +82,7 @@ parent(
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.commandbaseast?view=powershellsdk-7.3.0
@command_base = @command | @command_expression;
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.chainableast?view=powershellsdk-7.3.0
@chainable = @pipeline | @pipeline_chain;
@chainable = @command_base | @pipeline | @pipeline_chain;
//https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.pipelinebaseast?view=powershellsdk-7.3.0
@pipeline_base = @chainable | @error_statement | @assignment_statement;
// https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.statementast?view=powershellsdk-7.3.0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Remove Pipelines with one element.
compatibility: partial

View File

@@ -1,38 +1,24 @@
| ExitStatement.ps1:1:1:1:8 | exit ... |
| ExitStatement.ps1:1:6:1:8 | -1 |
| ExitStatement.ps1:1:6:1:8 | -1 |
| IfStatement.ps1:1:1:1:7 | ...=... |
| IfStatement.ps1:1:6:1:7 | 4 |
| IfStatement.ps1:3:1:8:2 | if (...) {...} else {...} |
| IfStatement.ps1:3:5:3:13 | ... -ge ... |
| IfStatement.ps1:3:5:3:13 | ... -ge ... |
| IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
| IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
| IfStatement.ps1:7:2:7:21 | $x is less than 3 |
| IfStatement.ps1:7:2:7:21 | $x is less than 3 |
| TrapStatement.ps1:1:1:4:2 | TrapTest |
| TrapStatement.ps1:2:5:2:26 | TrapStatement at: TrapStatement.ps1:2:5:2:26 |
| TrapStatement.ps1:2:11:2:25 | Error found. |
| TrapStatement.ps1:2:11:2:25 | Error found. |
| TrapStatement.ps1:3:5:3:19 | nonsenseString |
| TrapStatement.ps1:3:5:3:19 | nonsenseString |
| TrapStatement.ps1:6:1:6:9 | TrapTest |
| TrapStatement.ps1:6:1:6:9 | TrapTest |
| Try.ps1:1:1:13:2 | try {...} |
| Try.ps1:2:4:2:95 | ...=... |
| Try.ps1:2:17:2:95 | New-Object |
| Try.ps1:2:17:2:95 | New-Object |
| Try.ps1:2:69:2:94 | ...,... |
| Try.ps1:2:69:2:94 | ...,... |
| Try.ps1:3:5:3:21 | throw ... |
| Try.ps1:3:11:3:21 | Exception |
| Try.ps1:3:11:3:21 | Exception |
| Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. |
| Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. |
| Try.ps1:9:5:9:52 | An error occurred that could not be resolved. |
| Try.ps1:9:5:9:52 | An error occurred that could not be resolved. |
| Try.ps1:12:5:12:37 | The finally block is executed. |
| Try.ps1:12:5:12:37 | The finally block is executed. |
| UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | Get-Number |
| UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number |
| UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number |

View File

@@ -26,7 +26,6 @@
| Arrays/Arrays.ps1:5:1:5:37 | ...=... | Arrays/Arrays.ps1:1:1:15:15 | {...} |
| Arrays/Arrays.ps1:5:11:5:21 | New-Object | Arrays/Arrays.ps1:5:11:5:37 | New-Object |
| Arrays/Arrays.ps1:5:11:5:37 | New-Object | Arrays/Arrays.ps1:5:1:5:37 | ...=... |
| Arrays/Arrays.ps1:5:11:5:37 | New-Object | Arrays/Arrays.ps1:5:11:5:37 | New-Object |
| Arrays/Arrays.ps1:5:22:5:33 | object[,] | Arrays/Arrays.ps1:5:11:5:37 | New-Object |
| Arrays/Arrays.ps1:5:34:5:35 | 2 | Arrays/Arrays.ps1:5:34:5:37 | ...,... |
| Arrays/Arrays.ps1:5:34:5:37 | ...,... | Arrays/Arrays.ps1:5:11:5:37 | New-Object |
@@ -69,7 +68,6 @@
| Arrays/Arrays.ps1:11:11:11:25 | @(...) | Arrays/Arrays.ps1:11:11:11:25 | @(...) |
| Arrays/Arrays.ps1:11:13:11:16 | a | Arrays/Arrays.ps1:11:13:11:24 | ...,... |
| Arrays/Arrays.ps1:11:13:11:24 | ...,... | Arrays/Arrays.ps1:11:13:11:24 | ...,... |
| Arrays/Arrays.ps1:11:13:11:24 | ...,... | Arrays/Arrays.ps1:11:13:11:24 | ...,... |
| Arrays/Arrays.ps1:11:13:11:24 | ...,... | Arrays/Arrays.ps1:11:13:11:24 | {...} |
| Arrays/Arrays.ps1:11:13:11:24 | {...} | Arrays/Arrays.ps1:11:11:11:25 | @(...) |
| Arrays/Arrays.ps1:11:17:11:20 | b | Arrays/Arrays.ps1:11:13:11:24 | ...,... |
@@ -77,7 +75,6 @@
| Arrays/Arrays.ps1:12:1:12:8 | array3 | Arrays/Arrays.ps1:12:1:12:14 | count |
| Arrays/Arrays.ps1:12:1:12:14 | count | Arrays/Arrays.ps1:1:1:15:15 | {...} |
| Arrays/Arrays.ps1:12:1:12:14 | count | Arrays/Arrays.ps1:12:1:12:14 | count |
| Arrays/Arrays.ps1:12:1:12:14 | count | Arrays/Arrays.ps1:12:1:12:14 | count |
| Arrays/Arrays.ps1:12:9:12:14 | count | Arrays/Arrays.ps1:12:1:12:14 | count |
| Arrays/Arrays.ps1:14:1:14:8 | array4 | Arrays/Arrays.ps1:14:1:14:44 | ...=... |
| Arrays/Arrays.ps1:14:1:14:44 | ...=... | Arrays/Arrays.ps1:1:1:15:15 | {...} |
@@ -88,7 +85,6 @@
| Arrays/Arrays.ps1:15:1:15:8 | array4 | Arrays/Arrays.ps1:15:1:15:15 | call to Add |
| Arrays/Arrays.ps1:15:1:15:15 | call to Add | Arrays/Arrays.ps1:1:1:15:15 | {...} |
| Arrays/Arrays.ps1:15:1:15:15 | call to Add | Arrays/Arrays.ps1:15:1:15:15 | call to Add |
| Arrays/Arrays.ps1:15:1:15:15 | call to Add | Arrays/Arrays.ps1:15:1:15:15 | call to Add |
| Arrays/Arrays.ps1:15:9:15:12 | Add | Arrays/Arrays.ps1:15:1:15:15 | call to Add |
| Arrays/Arrays.ps1:15:13:15:14 | 1 | Arrays/Arrays.ps1:15:1:15:15 | call to Add |
| Blocks/ParamBlock.ps1:1:1:1:18 | CmdletBinding | Blocks/ParamBlock.ps1:2:1:5:2 | param(...) |
@@ -104,25 +100,20 @@
| Dynamic/DynamicExecution.ps1:1:8:1:17 | cmd.exe | Dynamic/DynamicExecution.ps1:1:8:1:17 | cmd.exe |
| Dynamic/DynamicExecution.ps1:2:1:2:18 | Invoke-Expression | Dynamic/DynamicExecution.ps1:2:1:2:23 | Invoke-Expression |
| Dynamic/DynamicExecution.ps1:2:1:2:23 | Invoke-Expression | Dynamic/DynamicExecution.ps1:1:1:5:8 | {...} |
| Dynamic/DynamicExecution.ps1:2:1:2:23 | Invoke-Expression | Dynamic/DynamicExecution.ps1:2:1:2:23 | Invoke-Expression |
| Dynamic/DynamicExecution.ps1:2:19:2:23 | foo | Dynamic/DynamicExecution.ps1:2:1:2:23 | Invoke-Expression |
| Dynamic/DynamicExecution.ps1:3:1:3:14 | scriptblock | Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create |
| Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create | Dynamic/DynamicExecution.ps1:1:1:5:8 | {...} |
| Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create | Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create |
| Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create | Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create |
| Dynamic/DynamicExecution.ps1:3:16:3:22 | Create | Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create |
| Dynamic/DynamicExecution.ps1:3:23:3:27 | foo | Dynamic/DynamicExecution.ps1:3:1:3:28 | call to Create |
| Dynamic/DynamicExecution.ps1:4:1:4:32 | | Dynamic/DynamicExecution.ps1:1:1:5:8 | {...} |
| Dynamic/DynamicExecution.ps1:4:1:4:32 | | Dynamic/DynamicExecution.ps1:4:1:4:32 | |
| Dynamic/DynamicExecution.ps1:4:3:4:32 | (...) | Dynamic/DynamicExecution.ps1:4:1:4:32 | |
| Dynamic/DynamicExecution.ps1:4:4:4:17 | scriptblock | Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create |
| Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create | Dynamic/DynamicExecution.ps1:4:3:4:32 | (...) |
| Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create | Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create |
| Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create | Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create |
| Dynamic/DynamicExecution.ps1:4:19:4:25 | Create | Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create |
| Dynamic/DynamicExecution.ps1:4:26:4:30 | foo | Dynamic/DynamicExecution.ps1:4:4:4:31 | call to Create |
| Dynamic/DynamicExecution.ps1:5:1:5:8 | | Dynamic/DynamicExecution.ps1:1:1:5:8 | {...} |
| Dynamic/DynamicExecution.ps1:5:1:5:8 | | Dynamic/DynamicExecution.ps1:5:1:5:8 | |
| Dynamic/DynamicExecution.ps1:5:2:5:8 | $foo | Dynamic/DynamicExecution.ps1:5:1:5:8 | |
| Dynamic/DynamicExecution.ps1:5:3:5:7 | foo | Dynamic/DynamicExecution.ps1:5:2:5:8 | $foo |
| Dynamic/DynamicExecutionWithFunc.ps1:1:1:11:2 | ExecuteAThing | Dynamic/DynamicExecutionWithFunc.ps1:1:1:11:2 | {...} |
@@ -139,33 +130,26 @@
| Dynamic/DynamicExecutionWithFunc.ps1:5:24:5:34 | userInput | Dynamic/DynamicExecutionWithFunc.ps1:5:12:5:34 | ...+... |
| Dynamic/DynamicExecutionWithFunc.ps1:6:5:6:22 | Invoke-Expression | Dynamic/DynamicExecutionWithFunc.ps1:6:5:6:27 | Invoke-Expression |
| Dynamic/DynamicExecutionWithFunc.ps1:6:5:6:27 | Invoke-Expression | Dynamic/DynamicExecutionWithFunc.ps1:2:5:10:30 | {...} |
| Dynamic/DynamicExecutionWithFunc.ps1:6:5:6:27 | Invoke-Expression | Dynamic/DynamicExecutionWithFunc.ps1:6:5:6:27 | Invoke-Expression |
| Dynamic/DynamicExecutionWithFunc.ps1:6:23:6:27 | foo | Dynamic/DynamicExecutionWithFunc.ps1:6:5:6:27 | Invoke-Expression |
| Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:18 | scriptblock | Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create | Dynamic/DynamicExecutionWithFunc.ps1:2:5:10:30 | {...} |
| Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create | Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create | Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:7:20:7:26 | Create | Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:7:27:7:31 | foo | Dynamic/DynamicExecutionWithFunc.ps1:7:5:7:32 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:8:5:8:36 | | Dynamic/DynamicExecutionWithFunc.ps1:2:5:10:30 | {...} |
| Dynamic/DynamicExecutionWithFunc.ps1:8:5:8:36 | | Dynamic/DynamicExecutionWithFunc.ps1:8:5:8:36 | |
| Dynamic/DynamicExecutionWithFunc.ps1:8:7:8:36 | (...) | Dynamic/DynamicExecutionWithFunc.ps1:8:5:8:36 | |
| Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:21 | scriptblock | Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create | Dynamic/DynamicExecutionWithFunc.ps1:8:7:8:36 | (...) |
| Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create | Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create | Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:8:23:8:29 | Create | Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:8:30:8:34 | foo | Dynamic/DynamicExecutionWithFunc.ps1:8:8:8:35 | call to Create |
| Dynamic/DynamicExecutionWithFunc.ps1:9:5:9:12 | | Dynamic/DynamicExecutionWithFunc.ps1:2:5:10:30 | {...} |
| Dynamic/DynamicExecutionWithFunc.ps1:9:5:9:12 | | Dynamic/DynamicExecutionWithFunc.ps1:9:5:9:12 | |
| Dynamic/DynamicExecutionWithFunc.ps1:9:6:9:12 | $foo | Dynamic/DynamicExecutionWithFunc.ps1:9:5:9:12 | |
| Dynamic/DynamicExecutionWithFunc.ps1:9:7:9:11 | foo | Dynamic/DynamicExecutionWithFunc.ps1:9:6:9:12 | $foo |
| Dynamic/DynamicExecutionWithFunc.ps1:10:5:10:30 | cmd.exe | Dynamic/DynamicExecutionWithFunc.ps1:2:5:10:30 | {...} |
| Dynamic/DynamicExecutionWithFunc.ps1:10:5:10:30 | cmd.exe | Dynamic/DynamicExecutionWithFunc.ps1:10:5:10:30 | cmd.exe |
| Dynamic/DynamicExecutionWithFunc.ps1:10:7:10:16 | cmd.exe | Dynamic/DynamicExecutionWithFunc.ps1:10:5:10:30 | cmd.exe |
| Dynamic/DynamicExecutionWithFunc.ps1:10:17:10:30 | @(...) | Dynamic/DynamicExecutionWithFunc.ps1:10:5:10:30 | cmd.exe |
| Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | userInput | Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | userInput |
| Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | userInput | Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | userInput |
| Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | userInput | Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | {...} |
| Dynamic/DynamicExecutionWithFunc.ps1:10:19:10:29 | {...} | Dynamic/DynamicExecutionWithFunc.ps1:10:17:10:30 | @(...) |
| Expressions/BinaryExpression.ps1:1:1:1:6 | val1 | Expressions/BinaryExpression.ps1:1:1:1:10 | ...=... |
@@ -185,42 +169,35 @@
| Expressions/BinaryExpression.ps1:3:19:3:24 | val2 | Expressions/BinaryExpression.ps1:3:11:3:24 | ...+... |
| Expressions/BinaryExpression.ps1:4:1:4:8 | result | Expressions/BinaryExpression.ps1:1:1:4:8 | {...} |
| Expressions/BinaryExpression.ps1:4:1:4:8 | result | Expressions/BinaryExpression.ps1:4:1:4:8 | result |
| Expressions/BinaryExpression.ps1:4:1:4:8 | result | Expressions/BinaryExpression.ps1:4:1:4:8 | result |
| Expressions/ConvertWithSecureString.ps1:1:1:1:11 | UserInput | Expressions/ConvertWithSecureString.ps1:1:1:1:55 | ...=... |
| Expressions/ConvertWithSecureString.ps1:1:1:1:55 | ...=... | Expressions/ConvertWithSecureString.ps1:1:1:2:80 | {...} |
| Expressions/ConvertWithSecureString.ps1:1:1:2:80 | {...} | Expressions/ConvertWithSecureString.ps1:1:1:2:80 | ConvertWithSecureString.ps1 |
| Expressions/ConvertWithSecureString.ps1:1:14:1:23 | Read-Host | Expressions/ConvertWithSecureString.ps1:1:14:1:55 | Read-Host |
| Expressions/ConvertWithSecureString.ps1:1:14:1:55 | Read-Host | Expressions/ConvertWithSecureString.ps1:1:1:1:55 | ...=... |
| Expressions/ConvertWithSecureString.ps1:1:14:1:55 | Read-Host | Expressions/ConvertWithSecureString.ps1:1:14:1:55 | Read-Host |
| Expressions/ConvertWithSecureString.ps1:1:24:1:55 | Please enter your secure code | Expressions/ConvertWithSecureString.ps1:1:14:1:55 | Read-Host |
| Expressions/ConvertWithSecureString.ps1:2:1:2:16 | EncryptedInput | Expressions/ConvertWithSecureString.ps1:2:1:2:80 | ...=... |
| Expressions/ConvertWithSecureString.ps1:2:1:2:80 | ...=... | Expressions/ConvertWithSecureString.ps1:1:1:2:80 | {...} |
| Expressions/ConvertWithSecureString.ps1:2:19:2:41 | ConvertTo-SecureString | Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString |
| Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString | Expressions/ConvertWithSecureString.ps1:2:1:2:80 | ...=... |
| Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString | Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString |
| Expressions/ConvertWithSecureString.ps1:2:42:2:49 | String | Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString |
| Expressions/ConvertWithSecureString.ps1:2:50:2:60 | UserInput | Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString |
| Expressions/ConvertWithSecureString.ps1:2:61:2:73 | AsPlainText | Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString |
| Expressions/ConvertWithSecureString.ps1:2:74:2:80 | Force | Expressions/ConvertWithSecureString.ps1:2:19:2:80 | ConvertTo-SecureString |
| Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name | Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name |
| Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name | Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name |
| Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name | Expressions/ExpandableString.ps1:1:1:1:40 | {...} |
| Expressions/ExpandableString.ps1:1:1:1:40 | {...} | Expressions/ExpandableString.ps1:1:1:1:40 | ExpandableString.ps1 |
| Expressions/ExpandableString.ps1:1:8:1:13 | name | Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name |
| Expressions/ExpandableString.ps1:1:21:1:39 | $(...) | Expressions/ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name |
| Expressions/ExpandableString.ps1:1:23:1:33 | DateTime | Expressions/ExpandableString.ps1:1:23:1:38 | Now |
| Expressions/ExpandableString.ps1:1:23:1:38 | Now | Expressions/ExpandableString.ps1:1:23:1:38 | Now |
| Expressions/ExpandableString.ps1:1:23:1:38 | Now | Expressions/ExpandableString.ps1:1:23:1:38 | Now |
| Expressions/ExpandableString.ps1:1:23:1:38 | Now | Expressions/ExpandableString.ps1:1:23:1:38 | {...} |
| Expressions/ExpandableString.ps1:1:23:1:38 | {...} | Expressions/ExpandableString.ps1:1:21:1:39 | $(...) |
| Expressions/ExpandableString.ps1:1:35:1:38 | Now | Expressions/ExpandableString.ps1:1:23:1:38 | Now |
| Expressions/SubExpression.ps1:1:1:1:12 | $(...) | Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays |
| Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays | Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays |
| Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays | Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays |
| Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays | Expressions/SubExpression.ps1:1:1:2:22 | {...} |
| Expressions/SubExpression.ps1:1:1:2:22 | {...} | Expressions/SubExpression.ps1:1:1:2:22 | SubExpression.ps1 |
| Expressions/SubExpression.ps1:1:3:1:11 | Get-Date | Expressions/SubExpression.ps1:1:3:1:11 | Get-Date |
| Expressions/SubExpression.ps1:1:3:1:11 | Get-Date | Expressions/SubExpression.ps1:1:3:1:11 | Get-Date |
| Expressions/SubExpression.ps1:1:3:1:11 | Get-Date | Expressions/SubExpression.ps1:1:3:1:11 | {...} |
| Expressions/SubExpression.ps1:1:3:1:11 | {...} | Expressions/SubExpression.ps1:1:1:1:12 | $(...) |
| Expressions/SubExpression.ps1:1:13:1:20 | AddDays | Expressions/SubExpression.ps1:1:1:1:24 | call to AddDays |
@@ -228,8 +205,6 @@
| Expressions/SubExpression.ps1:2:1:2:12 | $(...) | Expressions/SubExpression.ps1:2:1:2:22 | call to AddDays |
| Expressions/SubExpression.ps1:2:1:2:22 | call to AddDays | Expressions/SubExpression.ps1:1:1:2:22 | {...} |
| Expressions/SubExpression.ps1:2:1:2:22 | call to AddDays | Expressions/SubExpression.ps1:2:1:2:22 | call to AddDays |
| Expressions/SubExpression.ps1:2:1:2:22 | call to AddDays | Expressions/SubExpression.ps1:2:1:2:22 | call to AddDays |
| Expressions/SubExpression.ps1:2:3:2:11 | Get-Date | Expressions/SubExpression.ps1:2:3:2:11 | Get-Date |
| Expressions/SubExpression.ps1:2:3:2:11 | Get-Date | Expressions/SubExpression.ps1:2:3:2:11 | Get-Date |
| Expressions/SubExpression.ps1:2:3:2:11 | Get-Date | Expressions/SubExpression.ps1:2:3:2:11 | {...} |
| Expressions/SubExpression.ps1:2:3:2:11 | {...} | Expressions/SubExpression.ps1:2:1:2:12 | $(...) |
@@ -243,7 +218,6 @@
| Expressions/TernaryExpression.ps1:1:9:1:10 | 6 | Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... |
| Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... | Expressions/TernaryExpression.ps1:1:8:1:17 | (...) |
| Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... | Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... |
| Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... | Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... |
| Expressions/TernaryExpression.ps1:1:15:1:16 | 7 | Expressions/TernaryExpression.ps1:1:9:1:16 | ... -gt ... |
| Expressions/TernaryExpression.ps1:1:20:1:21 | 1 | Expressions/TernaryExpression.ps1:1:8:1:23 | ...?...:... |
| Expressions/TernaryExpression.ps1:1:22:1:23 | 2 | Expressions/TernaryExpression.ps1:1:8:1:23 | ...?...:... |
@@ -252,46 +226,36 @@
| Loops/DoUntil.ps1:2:1:7:2 | {...} | Loops/DoUntil.ps1:1:1:7:19 | DoUntil |
| Loops/DoUntil.ps1:3:2:3:20 | Starting Loop $a | Loops/DoUntil.ps1:2:1:7:2 | {...} |
| Loops/DoUntil.ps1:3:2:3:20 | Starting Loop $a | Loops/DoUntil.ps1:3:2:3:20 | Starting Loop $a |
| Loops/DoUntil.ps1:3:2:3:20 | Starting Loop $a | Loops/DoUntil.ps1:3:2:3:20 | Starting Loop $a |
| Loops/DoUntil.ps1:3:17:3:19 | a | Loops/DoUntil.ps1:3:2:3:20 | Starting Loop $a |
| Loops/DoUntil.ps1:4:2:4:4 | a | Loops/DoUntil.ps1:2:1:7:2 | {...} |
| Loops/DoUntil.ps1:4:2:4:4 | a | Loops/DoUntil.ps1:4:2:4:4 | a |
| Loops/DoUntil.ps1:4:2:4:4 | a | Loops/DoUntil.ps1:4:2:4:4 | a |
| Loops/DoUntil.ps1:5:2:5:4 | a | Loops/DoUntil.ps1:5:2:5:6 | ...++ |
| Loops/DoUntil.ps1:5:2:5:6 | ...++ | Loops/DoUntil.ps1:2:1:7:2 | {...} |
| Loops/DoUntil.ps1:5:2:5:6 | ...++ | Loops/DoUntil.ps1:5:2:5:6 | ...++ |
| Loops/DoUntil.ps1:5:2:5:6 | ...++ | Loops/DoUntil.ps1:5:2:5:6 | ...++ |
| Loops/DoUntil.ps1:6:2:6:17 | Now $a is $a | Loops/DoUntil.ps1:2:1:7:2 | {...} |
| Loops/DoUntil.ps1:6:2:6:17 | Now $a is $a | Loops/DoUntil.ps1:6:2:6:17 | Now $a is $a |
| Loops/DoUntil.ps1:6:2:6:17 | Now $a is $a | Loops/DoUntil.ps1:6:2:6:17 | Now $a is $a |
| Loops/DoUntil.ps1:6:14:6:16 | a | Loops/DoUntil.ps1:6:2:6:17 | Now $a is $a |
| Loops/DoUntil.ps1:7:10:7:12 | a | Loops/DoUntil.ps1:7:10:7:18 | ... -le ... |
| Loops/DoUntil.ps1:7:10:7:18 | ... -le ... | Loops/DoUntil.ps1:1:1:7:19 | DoUntil |
| Loops/DoUntil.ps1:7:10:7:18 | ... -le ... | Loops/DoUntil.ps1:7:10:7:18 | ... -le ... |
| Loops/DoUntil.ps1:7:10:7:18 | ... -le ... | Loops/DoUntil.ps1:7:10:7:18 | ... -le ... |
| Loops/DoUntil.ps1:7:17:7:18 | 5 | Loops/DoUntil.ps1:7:10:7:18 | ... -le ... |
| Loops/DoWhile.ps1:1:1:7:19 | DoWhile | Loops/DoWhile.ps1:1:1:7:19 | {...} |
| Loops/DoWhile.ps1:1:1:7:19 | {...} | Loops/DoWhile.ps1:1:1:7:19 | DoWhile.ps1 |
| Loops/DoWhile.ps1:2:1:7:2 | {...} | Loops/DoWhile.ps1:1:1:7:19 | DoWhile |
| Loops/DoWhile.ps1:3:2:3:20 | Starting Loop $a | Loops/DoWhile.ps1:2:1:7:2 | {...} |
| Loops/DoWhile.ps1:3:2:3:20 | Starting Loop $a | Loops/DoWhile.ps1:3:2:3:20 | Starting Loop $a |
| Loops/DoWhile.ps1:3:2:3:20 | Starting Loop $a | Loops/DoWhile.ps1:3:2:3:20 | Starting Loop $a |
| Loops/DoWhile.ps1:3:17:3:19 | a | Loops/DoWhile.ps1:3:2:3:20 | Starting Loop $a |
| Loops/DoWhile.ps1:4:2:4:4 | a | Loops/DoWhile.ps1:2:1:7:2 | {...} |
| Loops/DoWhile.ps1:4:2:4:4 | a | Loops/DoWhile.ps1:4:2:4:4 | a |
| Loops/DoWhile.ps1:4:2:4:4 | a | Loops/DoWhile.ps1:4:2:4:4 | a |
| Loops/DoWhile.ps1:5:2:5:4 | a | Loops/DoWhile.ps1:5:2:5:6 | ...++ |
| Loops/DoWhile.ps1:5:2:5:6 | ...++ | Loops/DoWhile.ps1:2:1:7:2 | {...} |
| Loops/DoWhile.ps1:5:2:5:6 | ...++ | Loops/DoWhile.ps1:5:2:5:6 | ...++ |
| Loops/DoWhile.ps1:5:2:5:6 | ...++ | Loops/DoWhile.ps1:5:2:5:6 | ...++ |
| Loops/DoWhile.ps1:6:2:6:17 | Now $a is $a | Loops/DoWhile.ps1:2:1:7:2 | {...} |
| Loops/DoWhile.ps1:6:2:6:17 | Now $a is $a | Loops/DoWhile.ps1:6:2:6:17 | Now $a is $a |
| Loops/DoWhile.ps1:6:2:6:17 | Now $a is $a | Loops/DoWhile.ps1:6:2:6:17 | Now $a is $a |
| Loops/DoWhile.ps1:6:14:6:16 | a | Loops/DoWhile.ps1:6:2:6:17 | Now $a is $a |
| Loops/DoWhile.ps1:7:10:7:12 | a | Loops/DoWhile.ps1:7:10:7:18 | ... -le ... |
| Loops/DoWhile.ps1:7:10:7:18 | ... -le ... | Loops/DoWhile.ps1:1:1:7:19 | DoWhile |
| Loops/DoWhile.ps1:7:10:7:18 | ... -le ... | Loops/DoWhile.ps1:7:10:7:18 | ... -le ... |
| Loops/DoWhile.ps1:7:10:7:18 | ... -le ... | Loops/DoWhile.ps1:7:10:7:18 | ... -le ... |
| Loops/DoWhile.ps1:7:17:7:18 | 5 | Loops/DoWhile.ps1:7:10:7:18 | ... -le ... |
| Loops/While.ps1:1:1:1:5 | var | Loops/While.ps1:1:1:1:9 | ...=... |
| Loops/While.ps1:1:1:1:9 | ...=... | Loops/While.ps1:1:1:13:2 | {...} |
@@ -302,12 +266,10 @@
| Loops/While.ps1:2:8:2:12 | var | Loops/While.ps1:2:8:2:18 | ... -le ... |
| Loops/While.ps1:2:8:2:18 | ... -le ... | Loops/While.ps1:2:1:13:2 | while(...) {...} |
| Loops/While.ps1:2:8:2:18 | ... -le ... | Loops/While.ps1:2:8:2:18 | ... -le ... |
| Loops/While.ps1:2:8:2:18 | ... -le ... | Loops/While.ps1:2:8:2:18 | ... -le ... |
| Loops/While.ps1:2:17:2:18 | 5 | Loops/While.ps1:2:8:2:18 | ... -le ... |
| Loops/While.ps1:3:1:13:2 | {...} | Loops/While.ps1:2:1:13:2 | while(...) {...} |
| Loops/While.ps1:4:5:4:15 | Write-Host | Loops/While.ps1:4:5:4:41 | Write-Host |
| Loops/While.ps1:4:5:4:41 | Write-Host | Loops/While.ps1:3:1:13:2 | {...} |
| Loops/While.ps1:4:5:4:41 | Write-Host | Loops/While.ps1:4:5:4:41 | Write-Host |
| Loops/While.ps1:4:16:4:19 | The | Loops/While.ps1:4:5:4:41 | Write-Host |
| Loops/While.ps1:4:20:4:25 | value | Loops/While.ps1:4:5:4:41 | Write-Host |
| Loops/While.ps1:4:26:4:28 | of | Loops/While.ps1:4:5:4:41 | Write-Host |
@@ -317,23 +279,19 @@
| Loops/While.ps1:5:5:5:9 | var | Loops/While.ps1:5:5:5:11 | ...++ |
| Loops/While.ps1:5:5:5:11 | ...++ | Loops/While.ps1:3:1:13:2 | {...} |
| Loops/While.ps1:5:5:5:11 | ...++ | Loops/While.ps1:5:5:5:11 | ...++ |
| Loops/While.ps1:5:5:5:11 | ...++ | Loops/While.ps1:5:5:5:11 | ...++ |
| Loops/While.ps1:6:5:12:6 | if (...) {...} else {...} | Loops/While.ps1:3:1:13:2 | {...} |
| Loops/While.ps1:6:9:6:13 | var | Loops/While.ps1:6:9:6:19 | ... -le ... |
| Loops/While.ps1:6:9:6:19 | ... -le ... | Loops/While.ps1:6:5:12:6 | if (...) {...} else {...} |
| Loops/While.ps1:6:9:6:19 | ... -le ... | Loops/While.ps1:6:9:6:19 | ... -le ... |
| Loops/While.ps1:6:9:6:19 | ... -le ... | Loops/While.ps1:6:9:6:19 | ... -le ... |
| Loops/While.ps1:6:18:6:19 | 3 | Loops/While.ps1:6:9:6:19 | ... -le ... |
| Loops/While.ps1:6:20:8:6 | {...} | Loops/While.ps1:6:5:12:6 | if (...) {...} else {...} |
| Loops/While.ps1:7:9:7:17 | continue | Loops/While.ps1:6:20:8:6 | {...} |
| Loops/While.ps1:10:5:12:6 | {...} | Loops/While.ps1:6:5:12:6 | if (...) {...} else {...} |
| Loops/While.ps1:11:9:11:14 | break | Loops/While.ps1:10:5:12:6 | {...} |
| Redirections/FileRedirection.ps1:1:1:3:2 | $(...) | Redirections/FileRedirection.ps1:1:1:3:20 | $(...) |
| Redirections/FileRedirection.ps1:1:1:3:20 | $(...) | Redirections/FileRedirection.ps1:1:1:3:20 | $(...) |
| Redirections/FileRedirection.ps1:1:1:3:20 | $(...) | Redirections/FileRedirection.ps1:1:1:3:20 | {...} |
| Redirections/FileRedirection.ps1:1:1:3:20 | {...} | Redirections/FileRedirection.ps1:1:1:3:20 | FileRedirection.ps1 |
| Redirections/FileRedirection.ps1:2:5:2:9 | Here | Redirections/FileRedirection.ps1:2:5:2:32 | Here |
| Redirections/FileRedirection.ps1:2:5:2:32 | Here | Redirections/FileRedirection.ps1:2:5:2:32 | Here |
| Redirections/FileRedirection.ps1:2:5:2:32 | Here | Redirections/FileRedirection.ps1:2:5:2:32 | {...} |
| Redirections/FileRedirection.ps1:2:5:2:32 | {...} | Redirections/FileRedirection.ps1:1:1:3:2 | $(...) |
| Redirections/FileRedirection.ps1:2:10:2:12 | is | Redirections/FileRedirection.ps1:2:5:2:32 | Here |
@@ -347,7 +305,6 @@
| Statements/ExitStatement.ps1:1:1:1:8 | {...} | Statements/ExitStatement.ps1:1:1:1:8 | ExitStatement.ps1 |
| Statements/ExitStatement.ps1:1:6:1:8 | -1 | Statements/ExitStatement.ps1:1:1:1:8 | exit ... |
| Statements/ExitStatement.ps1:1:6:1:8 | -1 | Statements/ExitStatement.ps1:1:6:1:8 | -1 |
| Statements/ExitStatement.ps1:1:6:1:8 | -1 | Statements/ExitStatement.ps1:1:6:1:8 | -1 |
| Statements/IfStatement.ps1:1:1:1:3 | x | Statements/IfStatement.ps1:1:1:1:7 | ...=... |
| Statements/IfStatement.ps1:1:1:1:7 | ...=... | Statements/IfStatement.ps1:1:1:8:2 | {...} |
| Statements/IfStatement.ps1:1:1:8:2 | {...} | Statements/IfStatement.ps1:1:1:8:2 | IfStatement.ps1 |
@@ -357,17 +314,14 @@
| Statements/IfStatement.ps1:3:5:3:7 | x | Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... |
| Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... | Statements/IfStatement.ps1:3:1:8:2 | if (...) {...} else {...} |
| Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... | Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... |
| Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... | Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... |
| Statements/IfStatement.ps1:3:12:3:13 | 3 | Statements/IfStatement.ps1:3:5:3:13 | ... -ge ... |
| Statements/IfStatement.ps1:3:15:5:2 | {...} | Statements/IfStatement.ps1:3:1:8:2 | if (...) {...} else {...} |
| Statements/IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 | Statements/IfStatement.ps1:3:15:5:2 | {...} |
| Statements/IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 | Statements/IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
| Statements/IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 | Statements/IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
| Statements/IfStatement.ps1:4:3:4:5 | x | Statements/IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
| Statements/IfStatement.ps1:6:6:8:2 | {...} | Statements/IfStatement.ps1:3:1:8:2 | if (...) {...} else {...} |
| Statements/IfStatement.ps1:7:2:7:21 | $x is less than 3 | Statements/IfStatement.ps1:6:6:8:2 | {...} |
| Statements/IfStatement.ps1:7:2:7:21 | $x is less than 3 | Statements/IfStatement.ps1:7:2:7:21 | $x is less than 3 |
| Statements/IfStatement.ps1:7:2:7:21 | $x is less than 3 | Statements/IfStatement.ps1:7:2:7:21 | $x is less than 3 |
| Statements/IfStatement.ps1:7:3:7:5 | x | Statements/IfStatement.ps1:7:2:7:21 | $x is less than 3 |
| Statements/TrapStatement.ps1:1:1:4:2 | TrapTest | Statements/TrapStatement.ps1:1:1:6:9 | {...} |
| Statements/TrapStatement.ps1:1:1:6:9 | {...} | Statements/TrapStatement.ps1:1:1:6:9 | TrapStatement.ps1 |
@@ -377,13 +331,10 @@
| Statements/TrapStatement.ps1:2:10:2:26 | {...} | Statements/TrapStatement.ps1:2:5:2:26 | TrapStatement at: Statements/TrapStatement.ps1:2:5:2:26 |
| Statements/TrapStatement.ps1:2:11:2:25 | Error found. | Statements/TrapStatement.ps1:2:10:2:26 | {...} |
| Statements/TrapStatement.ps1:2:11:2:25 | Error found. | Statements/TrapStatement.ps1:2:11:2:25 | Error found. |
| Statements/TrapStatement.ps1:2:11:2:25 | Error found. | Statements/TrapStatement.ps1:2:11:2:25 | Error found. |
| Statements/TrapStatement.ps1:3:5:3:19 | nonsenseString | Statements/TrapStatement.ps1:2:5:3:19 | {...} |
| Statements/TrapStatement.ps1:3:5:3:19 | nonsenseString | Statements/TrapStatement.ps1:3:5:3:19 | nonsenseString |
| Statements/TrapStatement.ps1:3:5:3:19 | nonsenseString | Statements/TrapStatement.ps1:3:5:3:19 | nonsenseString |
| Statements/TrapStatement.ps1:6:1:6:9 | TrapTest | Statements/TrapStatement.ps1:1:1:6:9 | {...} |
| Statements/TrapStatement.ps1:6:1:6:9 | TrapTest | Statements/TrapStatement.ps1:6:1:6:9 | TrapTest |
| Statements/TrapStatement.ps1:6:1:6:9 | TrapTest | Statements/TrapStatement.ps1:6:1:6:9 | TrapTest |
| Statements/Try.ps1:1:1:13:2 | try {...} | Statements/Try.ps1:1:1:13:2 | {...} |
| Statements/Try.ps1:1:1:13:2 | {...} | Statements/Try.ps1:1:1:13:2 | Try.ps1 |
| Statements/Try.ps1:1:5:4:2 | {...} | Statements/Try.ps1:1:1:13:2 | try {...} |
@@ -391,37 +342,31 @@
| Statements/Try.ps1:2:4:2:95 | ...=... | Statements/Try.ps1:1:5:4:2 | {...} |
| Statements/Try.ps1:2:17:2:27 | New-Object | Statements/Try.ps1:2:17:2:95 | New-Object |
| Statements/Try.ps1:2:17:2:95 | New-Object | Statements/Try.ps1:2:4:2:95 | ...=... |
| Statements/Try.ps1:2:17:2:95 | New-Object | Statements/Try.ps1:2:17:2:95 | New-Object |
| Statements/Try.ps1:2:28:2:53 | System.Xaml.XamlException | Statements/Try.ps1:2:17:2:95 | New-Object |
| Statements/Try.ps1:2:54:2:67 | ArgumentList | Statements/Try.ps1:2:17:2:95 | New-Object |
| Statements/Try.ps1:2:68:2:95 | (...) | Statements/Try.ps1:2:17:2:95 | New-Object |
| Statements/Try.ps1:2:69:2:80 | Bad XAML! | Statements/Try.ps1:2:69:2:94 | ...,... |
| Statements/Try.ps1:2:69:2:94 | ...,... | Statements/Try.ps1:2:68:2:95 | (...) |
| Statements/Try.ps1:2:69:2:94 | ...,... | Statements/Try.ps1:2:69:2:94 | ...,... |
| Statements/Try.ps1:2:69:2:94 | ...,... | Statements/Try.ps1:2:69:2:94 | ...,... |
| Statements/Try.ps1:2:82:2:87 | null | Statements/Try.ps1:2:69:2:94 | ...,... |
| Statements/Try.ps1:2:89:2:91 | 10 | Statements/Try.ps1:2:69:2:94 | ...,... |
| Statements/Try.ps1:2:93:2:94 | 2 | Statements/Try.ps1:2:69:2:94 | ...,... |
| Statements/Try.ps1:3:5:3:21 | throw ... | Statements/Try.ps1:1:5:4:2 | {...} |
| Statements/Try.ps1:3:11:3:21 | Exception | Statements/Try.ps1:3:5:3:21 | throw ... |
| Statements/Try.ps1:3:11:3:21 | Exception | Statements/Try.ps1:3:11:3:21 | Exception |
| Statements/Try.ps1:3:11:3:21 | Exception | Statements/Try.ps1:3:11:3:21 | Exception |
| Statements/Try.ps1:5:1:7:2 | catch[...] {...} | Statements/Try.ps1:1:1:13:2 | try {...} |
| Statements/Try.ps1:5:7:5:32 | System.Net.WebException | Statements/Try.ps1:5:1:7:2 | catch[...] {...} |
| Statements/Try.ps1:5:33:5:56 | System.IO.IOException | Statements/Try.ps1:5:1:7:2 | catch[...] {...} |
| Statements/Try.ps1:5:57:7:2 | {...} | Statements/Try.ps1:5:1:7:2 | catch[...] {...} |
| Statements/Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. | Statements/Try.ps1:5:57:7:2 | {...} |
| Statements/Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. | Statements/Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. |
| Statements/Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. | Statements/Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. |
| Statements/Try.ps1:8:1:10:2 | catch {...} | Statements/Try.ps1:1:1:13:2 | try {...} |
| Statements/Try.ps1:8:7:10:2 | {...} | Statements/Try.ps1:8:1:10:2 | catch {...} |
| Statements/Try.ps1:9:5:9:52 | An error occurred that could not be resolved. | Statements/Try.ps1:8:7:10:2 | {...} |
| Statements/Try.ps1:9:5:9:52 | An error occurred that could not be resolved. | Statements/Try.ps1:9:5:9:52 | An error occurred that could not be resolved. |
| Statements/Try.ps1:9:5:9:52 | An error occurred that could not be resolved. | Statements/Try.ps1:9:5:9:52 | An error occurred that could not be resolved. |
| Statements/Try.ps1:11:9:13:2 | {...} | Statements/Try.ps1:1:1:13:2 | try {...} |
| Statements/Try.ps1:12:5:12:37 | The finally block is executed. | Statements/Try.ps1:11:9:13:2 | {...} |
| Statements/Try.ps1:12:5:12:37 | The finally block is executed. | Statements/Try.ps1:12:5:12:37 | The finally block is executed. |
| Statements/Try.ps1:12:5:12:37 | The finally block is executed. | Statements/Try.ps1:12:5:12:37 | The finally block is executed. |
| Statements/UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | Get-Number | Statements/UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | {...} |
| Statements/UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | {...} | Statements/UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | UseProcessBlockForPipelineCommand.ps1 |
| Statements/UseProcessBlockForPipelineCommand.ps1:2:1:11:2 | {...} | Statements/UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | Get-Number |
@@ -435,7 +380,6 @@
| Statements/UseProcessBlockForPipelineCommand.ps1:6:9:6:14 | int | Statements/UseProcessBlockForPipelineCommand.ps1:5:9:7:16 | Number |
| Statements/UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number | Statements/UseProcessBlockForPipelineCommand.ps1:4:5:10:12 | {...} |
| Statements/UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number | Statements/UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number |
| Statements/UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number | Statements/UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number |
| file://:0:0:0:0 | (no string representation) | Blocks/ParamBlock.ps1:3:5:4:23 | Parameter |
| file://:0:0:0:0 | (no string representation) | Dynamic/DynamicExecutionWithFunc.ps1:3:9:3:19 | userInput |
| file://:0:0:0:0 | (no string representation) | Statements/UseProcessBlockForPipelineCommand.ps1:5:9:7:16 | Number |

View File

@@ -31,9 +31,6 @@ conditionals.ps1:
# 4| if (...) {...}
#-----| -> myBool
# 4| myBool
#-----| -> myBool
# 4| myBool
#-----| true -> {...}
@@ -60,9 +57,6 @@ conditionals.ps1:
# 14| if (...) {...} else {...}
#-----| -> myBool
# 14| myBool
#-----| -> myBool
# 14| myBool
#-----| true -> {...}
#-----| false -> {...}
@@ -95,14 +89,11 @@ conditionals.ps1:
# 27| myBool1
#-----| false, true -> myBool2
# 27| ... -and ...
#-----| -> myBool1
# 27| ... -and ...
#-----| true -> {...}
# 27| ... -and ...
#-----| -> ... -and ...
#-----| -> myBool1
# 27| myBool2
#-----| false, true -> ... -and ...
@@ -130,15 +121,12 @@ conditionals.ps1:
# 37| myBool1
#-----| false, true -> myBool2
# 37| ... -and ...
#-----| -> myBool1
# 37| ... -and ...
#-----| true -> {...}
#-----| false -> {...}
# 37| ... -and ...
#-----| -> ... -and ...
#-----| -> myBool1
# 37| myBool2
#-----| false, true -> ... -and ...
@@ -168,14 +156,11 @@ conditionals.ps1:
# 50| myBool1
#-----| false, true -> myBool2
# 50| ... -or ...
#-----| -> myBool1
# 50| ... -or ...
#-----| true -> {...}
# 50| ... -or ...
#-----| -> ... -or ...
#-----| -> myBool1
# 50| myBool2
#-----| false, true -> ... -or ...
@@ -203,15 +188,12 @@ conditionals.ps1:
# 60| myBool1
#-----| false, true -> myBool2
# 60| ... -or ...
#-----| -> myBool1
# 60| ... -or ...
#-----| true -> {...}
#-----| false -> {...}
# 60| ... -or ...
#-----| -> ... -or ...
#-----| -> myBool1
# 60| myBool2
#-----| false, true -> ... -or ...
@@ -238,9 +220,6 @@ conditionals.ps1:
# 73| if (...) {...}
#-----| -> myBool1
# 73| myBool1
#-----| -> myBool1
# 73| myBool1
#-----| true -> {...}
@@ -267,9 +246,6 @@ conditionals.ps1:
# 87| if (...) {...} else {...}
#-----| -> myBool1
# 87| myBool1
#-----| -> myBool1
# 87| myBool1
#-----| true -> {...}
#-----| false -> {...}
@@ -296,9 +272,6 @@ conditionals.ps1:
# 102| {...}
#-----| -> switch(...) {...}
# 102| n
#-----| -> n
# 102| n
# 102| n
@@ -319,9 +292,6 @@ conditionals.ps1:
# 111| {...}
#-----| -> switch(...) {...}
# 111| n
#-----| -> n
# 111| n
# 111| n
@@ -348,9 +318,6 @@ conditionals.ps1:
# 124| switch(...) {...}
#-----| -> n
# 124| n
#-----| -> n
# 124| n
# 124| n
@@ -394,14 +361,11 @@ functions.ps1:
# 8| number1
#-----| -> number2
# 8| ...+...
#-----| -> number1
# 8| ...+...
#-----| -> exit {...} (normal)
# 8| ...+...
#-----| -> ...+...
#-----| -> number1
# 8| number2
#-----| -> ...+...
@@ -461,14 +425,11 @@ functions.ps1:
# 19| name
#-----| -> name2
# 19| ...+...
#-----| -> name
# 19| ...+...
#-----| -> exit {...} (normal)
# 19| ...+...
#-----| -> ...+...
#-----| -> name
# 19| name2
#-----| -> ...+...
@@ -512,9 +473,6 @@ functions.ps1:
# 29| number
#-----| -> {...}
# 29| numbers
#-----| -> numbers
# 29| numbers
#-----| -> forach(... in ...)
@@ -536,9 +494,6 @@ functions.ps1:
# 31| number
#-----| -> number
# 33| sum
#-----| -> sum
# 33| sum
#-----| -> exit {...} (normal)
@@ -596,9 +551,6 @@ functions.ps1:
# 48| {...}
#-----| -> sum
# 50| sum
#-----| -> sum
# 50| sum
#-----| -> exit {...} (normal)
@@ -715,15 +667,12 @@ loops.ps1:
# 4| a
#-----| -> 10
# 4| ... -le ...
#-----| -> a
# 4| ... -le ...
#-----| false -> exit {...} (normal)
#-----| true -> {...}
# 4| ... -le ...
#-----| -> ... -le ...
#-----| -> a
# 4| 10
#-----| -> ... -le ...
@@ -784,15 +733,12 @@ loops.ps1:
# 11| a
#-----| -> 10
# 11| ... -le ...
#-----| -> a
# 11| ... -le ...
#-----| false -> exit {...} (normal)
#-----| true -> {...}
# 11| ... -le ...
#-----| -> ... -le ...
#-----| -> a
# 11| 10
#-----| -> ... -le ...
@@ -838,15 +784,12 @@ loops.ps1:
# 19| a
#-----| -> 10
# 19| ... -le ...
#-----| -> a
# 19| ... -le ...
#-----| false -> exit {...} (normal)
#-----| true -> {...}
# 19| ... -le ...
#-----| -> ... -le ...
#-----| -> a
# 19| 10
#-----| -> ... -le ...
@@ -913,15 +856,12 @@ loops.ps1:
# 30| a
#-----| -> 10
# 30| ... -le ...
#-----| -> a
# 30| ... -le ...
#-----| false -> exit {...} (normal)
#-----| true -> {...}
# 30| ... -le ...
#-----| -> ... -le ...
#-----| -> a
# 30| 10
#-----| -> ... -le ...
@@ -982,15 +922,12 @@ loops.ps1:
# 38| a
#-----| -> 10
# 38| ... -ge ...
#-----| -> a
# 38| ... -ge ...
#-----| true -> exit {...} (normal)
#-----| false -> {...}
# 38| ... -ge ...
#-----| -> ... -ge ...
#-----| -> a
# 38| 10
#-----| -> ... -ge ...
@@ -1042,15 +979,12 @@ loops.ps1:
# 44| i
#-----| -> 10
# 44| ... -le ...
#-----| -> i
# 44| ... -le ...
#-----| false -> exit {...} (normal)
#-----| true -> {...}
# 44| ... -le ...
#-----| -> ... -le ...
#-----| -> i
# 44| 10
#-----| -> ... -le ...
@@ -1171,9 +1105,6 @@ try.ps1:
#-----| -> try {...}
# 2| {...}
#-----| -> Write-Output
# 3| Write-Output
# 10| test-try-with-throw-catch
#-----| -> test-try-with-throw-catch-with-throw
@@ -1196,9 +1127,6 @@ try.ps1:
# 12| if (...) {...}
#-----| -> b
# 12| b
#-----| -> b
# 12| b
#-----| true -> {...}
@@ -1211,9 +1139,6 @@ try.ps1:
# 13| throw ...
#-----| -> 42
# 13| 42
#-----| -> 42
# 13| 42
# 13| 42
@@ -1240,9 +1165,6 @@ try.ps1:
# 23| if (...) {...}
#-----| -> b
# 23| b
#-----| -> b
# 23| b
#-----| true -> {...}
@@ -1255,9 +1177,6 @@ try.ps1:
# 24| throw ...
#-----| -> 42
# 24| 42
#-----| -> 42
# 24| 42
# 24| 42
@@ -1284,9 +1203,6 @@ try.ps1:
# 34| if (...) {...}
#-----| -> b
# 34| b
#-----| -> b
# 34| b
#-----| true -> {...}
@@ -1299,9 +1215,6 @@ try.ps1:
# 35| throw ...
#-----| -> 42
# 35| 42
#-----| -> 42
# 35| 42
# 35| 42
@@ -1323,9 +1236,6 @@ try.ps1:
#-----| -> try {...}
# 44| {...}
#-----| -> Write-Output
# 45| Write-Output
# 52| test-try-catch-specific-1
#-----| -> test-try-two-catch-specific-1
@@ -1343,9 +1253,6 @@ try.ps1:
#-----| -> try {...}
# 53| {...}
#-----| -> Write-Output
# 54| Write-Output
# 61| test-try-two-catch-specific-1
#-----| -> test-try-catch-specific-2
@@ -1363,9 +1270,6 @@ try.ps1:
#-----| -> try {...}
# 62| {...}
#-----| -> Write-Output
# 63| Write-Output
# 72| test-try-catch-specific-2
#-----| -> test-try-two-catch-specific-2
@@ -1383,9 +1287,6 @@ try.ps1:
#-----| -> try {...}
# 73| {...}
#-----| -> Write-Output
# 74| Write-Output
# 81| test-try-two-catch-specific-2
#-----| -> test-try-three-catch-specific-2
@@ -1403,9 +1304,6 @@ try.ps1:
#-----| -> try {...}
# 82| {...}
#-----| -> Write-Output
# 83| Write-Output
# 92| test-try-three-catch-specific-2
#-----| -> test-try-catch-finally
@@ -1423,9 +1321,6 @@ try.ps1:
#-----| -> try {...}
# 93| {...}
#-----| -> Write-Output
# 94| Write-Output
# 105| test-try-catch-finally
#-----| -> test-try-finally
@@ -1443,9 +1338,6 @@ try.ps1:
#-----| -> try {...}
# 106| {...}
#-----| -> Write-Output
# 107| Write-Output
# 116| test-try-finally
#-----| -> test-try-finally-catch-specific-1
@@ -1463,9 +1355,6 @@ try.ps1:
#-----| -> try {...}
# 117| {...}
#-----| -> Write-Output
# 118| Write-Output
# 125| test-try-finally-catch-specific-1
#-----| -> test-nested-try-inner-finally
@@ -1483,9 +1372,6 @@ try.ps1:
#-----| -> try {...}
# 126| {...}
#-----| -> Write-Output
# 127| Write-Output
# 136| test-nested-try-inner-finally
#-----| -> test-nested-try-inner-finally
@@ -1509,9 +1395,6 @@ try.ps1:
#-----| -> {...}
# 138| {...}
#-----| -> Write-Output
# 139| Write-Output
# 149| test-nested-try-inner-finally
#-----| -> test-nested-try-outer-finally
@@ -1535,9 +1418,6 @@ try.ps1:
#-----| -> {...}
# 151| {...}
#-----| -> Write-Output
# 152| Write-Output
# 164| test-nested-try-outer-finally
#-----| -> test-nested-try-inner-outer-finally
@@ -1561,9 +1441,6 @@ try.ps1:
#-----| -> {...}
# 166| {...}
#-----| -> Write-Output
# 167| Write-Output
# 179| test-nested-try-inner-outer-finally
#-----| -> exit try.ps1 (normal)
@@ -1587,6 +1464,3 @@ try.ps1:
#-----| -> {...}
# 181| {...}
#-----| -> Write-Output
# 182| Write-Output