diff --git a/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/SQLVerifyChecker.java b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/SQLVerifyChecker.java index d742c0d..b7e2726 100644 --- a/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/SQLVerifyChecker.java +++ b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/SQLVerifyChecker.java @@ -76,6 +76,12 @@ public class SQLVerifyChecker extends SquidCheck { for (AstNode expr:astNodeList) { lists.add(expr.getToken().getValue()); } + if(astNodeList.size() == 0){ + List descendants = astNode.getDescendants(CxxGrammarImpl.condition); + for (AstNode desc:descendants) { + lists.add(desc.getToken().getValue()); + } + } } } //获取表达是数据信息