mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 13:20:53 +07:00
redundant suppression: don't warn on "all" locally as global tools are not run (IDEA-253244)
GitOrigin-RevId: 3666dcf887e8a4735dee08f16e172c9272bfca24
This commit is contained in:
committed by
intellij-monorepo-bot
parent
017a58c542
commit
64cb6979ca
@@ -1,4 +1,4 @@
|
||||
// "Remove 'ALL' suppression" "true"
|
||||
// "Remove 'ALL' suppression" "false"
|
||||
import java.util.*;
|
||||
|
||||
@SuppressWarnings({"AL<caret>L"})
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.WriteExternalException;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
|
||||
@@ -335,16 +334,6 @@ public class RedundantSuppressInspection extends GlobalSimpleInspectionTool {
|
||||
HashMap<PsiElement, Collection<String>> scopes = new HashMap<>();
|
||||
boolean suppressAll = collectSuppressions(element, scopes, IGNORE_ALL, mySuppressor);
|
||||
if (suppressAll) {
|
||||
for (String suppressId : myActiveTools) {
|
||||
if (isSuppressedFor(element, suppressId, myToolToSuppressScopes.get(suppressId))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
TextRange range = mySuppressor.getHighlightingRange(element, SuppressionUtil.ALL);
|
||||
String allSuppression = range.substring(element.getText());
|
||||
holder.registerProblem(element, range,
|
||||
InspectionsBundle.message("inspection.redundant.suppression.description"),
|
||||
mySuppressor.createRemoveRedundantSuppressionFix(allSuppression));
|
||||
return;
|
||||
}
|
||||
Collection<String> suppressIds = scopes.get(element);
|
||||
|
||||
Reference in New Issue
Block a user