From f10dc17c66c6f2fb1477f580f24fb388c6f0f746 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 21 May 2026 11:50:09 +0100 Subject: [PATCH] Do not include comments in the CFG --- go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll b/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll index 0e95d05aaa3..e736460be63 100644 --- a/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll +++ b/go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll @@ -56,6 +56,10 @@ module GoCfg { or e instanceof Go::ParenExpr or + e instanceof Go::CommentGroup + or + e instanceof Go::Comment + or e = any(Go::ImportSpec is).getPathExpr() or e.getParent*() = any(Go::ArrayTypeExpr ate).getLength()