public void trackIssues(ScannerReportReader reader, DefaultInputComponent component) { // raw issues = all the issues created by rule engines during this module scan and not excluded by filters List<ScannerReport.Issue> rawIssues = new LinkedList<>(); try (CloseableIterator<ScannerReport.Issue> it = reader.readComponentIssues(component.scannerId())) { while (it.hasNext()) { rawIssues.add(it.next()); } } catch (Exception e) { throw new IllegalStateException("Can't read issues for " + component.key(), e); } List<TrackedIssue> trackedIssues; if (localIssueTracking != null) { trackedIssues = localIssueTracking.trackIssues(component, rawIssues, analysisDate); } else { trackedIssues = doTransition(rawIssues, component); } for (TrackedIssue issue : trackedIssues) { issueCache.put(issue); } }
public void execute() { if (localIssueTracking != null) { localIssueTracking.init(); } ScannerReportReader reader = new ScannerReportReader(reportPublisher.getReportDir().toFile()); int nbComponents = inputComponentStore.all().size(); if (nbComponents == 0) { return; } ProgressReport progressReport = new ProgressReport("issue-tracking-report", TimeUnit.SECONDS.toMillis(10)); progressReport.start("Performing issue tracking"); int count = 0; try { for (InputComponent component : inputComponentStore.all()) { trackIssues(reader, (DefaultInputComponent) component); count++; progressReport.message(count + "/" + nbComponents + " components tracked"); } } finally { progressReport.stop(count + "/" + nbComponents + " components tracked"); } }
getComponentByType(IssueTransition.class).execute(); getComponentByType(JSONReport.class).execute(); LOG.info("ANALYSIS SUCCESSFUL");
getComponentByType(IssueTransition.class).execute(); getComponentByType(JSONReport.class).execute(); LOG.info("ANALYSIS SUCCESSFUL");
public void trackIssues(ScannerReportReader reader, DefaultInputComponent component) { // raw issues = all the issues created by rule engines during this module scan and not excluded by filters List<ScannerReport.Issue> rawIssues = new LinkedList<>(); try (CloseableIterator<ScannerReport.Issue> it = reader.readComponentIssues(component.scannerId())) { while (it.hasNext()) { rawIssues.add(it.next()); } } catch (Exception e) { throw new IllegalStateException("Can't read issues for " + component.key(), e); } List<TrackedIssue> trackedIssues; if (localIssueTracking != null) { trackedIssues = localIssueTracking.trackIssues(component, rawIssues, analysisDate); } else { trackedIssues = doTransition(rawIssues, component); } for (TrackedIssue issue : trackedIssues) { issueCache.put(issue); } }
public void execute() { if (localIssueTracking != null) { localIssueTracking.init(); } ScannerReportReader reader = new ScannerReportReader(reportPublisher.getReportDir().toFile()); int nbComponents = inputComponentStore.all().size(); if (nbComponents == 0) { return; } ProgressReport progressReport = new ProgressReport("issue-tracking-report", TimeUnit.SECONDS.toMillis(10)); progressReport.start("Performing issue tracking"); int count = 0; try { for (InputComponent component : inputComponentStore.all()) { trackIssues(reader, (DefaultInputComponent) component); count++; progressReport.message(count + "/" + nbComponents + " components tracked"); } } finally { progressReport.stop(count + "/" + nbComponents + " components tracked"); } }