From 9d1f5882b9b0b9d8689ae0d57fa48889acbbbfc2 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Fri, 7 May 2021 16:30:30 +0200 Subject: [PATCH] api to mark places which were not checked by local inspection but would be checked in batch mode (IDEA-268840) ignore possible problems in batch mode GitOrigin-RevId: 50bf04dbb01a6ec4fa36c1dbed3d7159ddbd0170 --- .../codeInsight/daemon/impl/LocalInspectionsPass.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java index d99db17a80ed..681021cc8c69 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java @@ -142,7 +142,8 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass LocalInspectionToolWrapper toolWrapper = inspectionResult.tool; final String shortName = toolWrapper.getShortName(); for (ProblemDescriptor descriptor : inspectionResult.foundProblems) { - if (descriptor.getHighlightType() == ProblemHighlightType.INFORMATION) { + ProblemHighlightType highlightType = descriptor.getHighlightType(); + if (highlightType == ProblemHighlightType.INFORMATION) { if (ourToolsWithInformationProblems.add(shortName)) { String message = "Tool #" + shortName + " registers INFORMATION level problem in batch mode on " + getFile() + ". " + "INFORMATION level 'warnings' are invisible in the editor and should not become visible in batch mode. " + @@ -158,6 +159,9 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass } continue; } + else if (highlightType == ProblemHighlightType.POSSIBLE_PROBLEM) { + continue; + } addDescriptors(toolWrapper, descriptor, context); } }