From c142a3fc72b7713b37d7dfc790fc18e6beb81744 Mon Sep 17 00:00:00 2001 From: Kai Koenig Date: Sun, 2 Jul 2017 16:07:37 +1200 Subject: [PATCH] #323 - number 4 --- processing BugCounts in TestFiles --- src/test/java/com/cflint/integration/TestFiles.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/com/cflint/integration/TestFiles.java b/src/test/java/com/cflint/integration/TestFiles.java index 3c1869941..77e26fd68 100644 --- a/src/test/java/com/cflint/integration/TestFiles.java +++ b/src/test/java/com/cflint/integration/TestFiles.java @@ -20,6 +20,7 @@ import javax.xml.bind.JAXBException; import javax.xml.transform.TransformerException; +import com.cflint.BugInfo; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -94,6 +95,9 @@ public void exceptionOccurred(Throwable exception, String messageCode, String fi final String inputString2 = FileUtil.loadFile(nextFile); cflint.process(inputString2, nextFile.getPath().replaceAll("[.]2$", "")); } + for (BugInfo bug : cflint.getBugs()) { + cflint.getStats().getCounts().add(bug.getMessageCode(), bug.getSeverity()); + } //List result = cflint.getBugs().getFlatBugList(); StringWriter writer = new StringWriter(); new JSONOutput().output(cflint.getBugs(), writer, cflint.getStats());