Skip to content

Commit

Permalink
cflint#323 - number 4 --- processing BugCounts in TestFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealAgentK committed Jul 2, 2017
1 parent 5e97022 commit c142a3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/java/com/cflint/integration/TestFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<BugInfo> result = cflint.getBugs().getFlatBugList();
StringWriter writer = new StringWriter();
new JSONOutput().output(cflint.getBugs(), writer, cflint.getStats());
Expand Down

0 comments on commit c142a3f

Please sign in to comment.