mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ignore INFORMATION level problems in batch
This commit is contained in:
@@ -48,6 +48,9 @@ public class OptionalIsPresentInspection extends AbstractBaseJavaLocalInspection
|
||||
|
||||
void registerProblem(@NotNull ProblemsHolder holder, @NotNull PsiExpression condition, OptionalIsPresentCase scenario) {
|
||||
if(this != NONE) {
|
||||
if (this == INFO && !holder.isOnTheFly()) {
|
||||
return; //don't register fixes in batch mode
|
||||
}
|
||||
holder.registerProblem(condition, "Can be replaced with single expression in functional style",
|
||||
this == INFO ? ProblemHighlightType.INFORMATION : ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
new OptionalIsPresentFix(scenario));
|
||||
|
||||
Reference in New Issue
Block a user