Skip to content

Commit f513259

Browse files
committed
PS: Format, add a helper predicate and add an explicit 'this' to silence a warning.
1 parent 9be1f2d commit f513259

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

powershell/ql/lib/semmle/code/powershell/ast/internal/Parameter.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class PipelineByPropertyNameParameter extends Parameter instanceof PipelineByPro
6565
* Gets the iterator variable that is used to iterate over the elements in the pipeline.
6666
*/
6767
PipelineByPropertyNameIteratorVariable getIteratorVariable() { result.getParameter() = this }
68+
69+
ProcessBlock getProcessBlock() { result = this.getIteratorVariable().getProcessBlock() }
6870
}
6971

7072
/**

powershell/ql/lib/semmle/code/powershell/ast/internal/Synthesis.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ newtype VarKind =
2626
PipelineIteratorKind() or
2727
PipelineByPropertyNameIteratorKind(string name) {
2828
exists(Raw::ProcessBlock pb |
29-
name = pb.getScriptBlock().getParamBlock().getAPipelineByPropertyNameParameter().getLowerCaseName()
29+
name =
30+
pb.getScriptBlock().getParamBlock().getAPipelineByPropertyNameParameter().getLowerCaseName()
3031
)
3132
}
3233

powershell/ql/lib/semmle/code/powershell/dataflow/internal/SsaImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private module DataFlowIntegrationInput implements Impl::DataFlowIntegrationInpu
278278
* guard to `branch`.
279279
*/
280280
predicate controlsBranchEdge(SsaInput::BasicBlock bb1, SsaInput::BasicBlock bb2, boolean branch) {
281-
hasBranchEdge(bb1, bb2, branch)
281+
this.hasBranchEdge(bb1, bb2, branch)
282282
}
283283
/**
284284
* Holds if the evaluation of this guard to `branch` corresponds to the edge

0 commit comments

Comments
 (0)