From 9f5556c447d372348f821d8af59fe5c2f39213d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicklas=20K=C3=B6rtge?= Date: Thu, 31 Oct 2024 13:47:05 +0100 Subject: [PATCH] add result check to scanner manager (#184) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicklas Körtge --- .../src/main/java/com/ibm/plugin/ScannerManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sonar-cryptography-plugin/src/main/java/com/ibm/plugin/ScannerManager.java b/sonar-cryptography-plugin/src/main/java/com/ibm/plugin/ScannerManager.java index a5bc0bb0..96abffe3 100644 --- a/sonar-cryptography-plugin/src/main/java/com/ibm/plugin/ScannerManager.java +++ b/sonar-cryptography-plugin/src/main/java/com/ibm/plugin/ScannerManager.java @@ -56,6 +56,10 @@ public IStatistics getStatistics() { INode::getKind, Collectors.counting()))); } + public boolean hasResults() { + return !this.getAggregatedNodes().isEmpty(); + } + @Nonnull private List getAggregatedNodes() { List nodes = new ArrayList<>();