mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C#: Autoformat QL queries
This commit is contained in:
@@ -12,8 +12,9 @@ import csharp
|
||||
import semmle.code.csharp.frameworks.system.Text
|
||||
|
||||
from ObjectCreation creation, LoopStmt loop, ControlFlow::Node loopEntryNode
|
||||
where creation.getType() instanceof SystemTextStringBuilderClass
|
||||
and loopEntryNode = loop.getBody().getAControlFlowEntryNode()
|
||||
and loop.getBody().getAChild*() = creation
|
||||
and creation.getAControlFlowNode().postDominates(loopEntryNode)
|
||||
where
|
||||
creation.getType() instanceof SystemTextStringBuilderClass and
|
||||
loopEntryNode = loop.getBody().getAControlFlowEntryNode() and
|
||||
loop.getBody().getAChild*() = creation and
|
||||
creation.getAControlFlowNode().postDominates(loopEntryNode)
|
||||
select creation, "Creating a 'StringBuilder' in a loop."
|
||||
|
||||
Reference in New Issue
Block a user