Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ru/touchin/staticanalysis/task/AnalysisTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ private void runAnalysis(@NotNull final ProgressIndicator progressIndicator) thr
} else if (!Pattern.compile("Overall: FAILED").matcher(analysisOutput).find()) {
showErrorNotification("Can't detect analysis result. Try to run it manually.");
} else {
Pattern errorsCountPattern = Pattern.compile("Overall: FAILED \\((.+)\\)\u001b");
Pattern urlPattern = Pattern.compile("file:.+full_report.html");
Pattern errorsCountPattern = Pattern.compile("Overall: FAILED \\((.+)\\)");
Matcher errorsCountMatcher = errorsCountPattern.matcher(analysisOutput);
Matcher urlMatcher = urlPattern.matcher(analysisOutput);
if (errorsCountMatcher.find() && urlMatcher.find()) {
if (errorsCountMatcher.find()) {
showErrorNotification(String.format("Analysis failed: %s", errorsCountMatcher.group(1)));
(new OpenUrlHyperlinkInfo(urlMatcher.group())).navigate(project);
ApplicationManager.getApplication().invokeLater(() -> {
ToolWindowManager.getInstance(project).getToolWindow("Static Analysis Log").show(null);
});
} else {
showErrorNotification("Can't detect analysis result. Try to run it manually.");
}
Expand Down