void (@NotNull PsiMethod method) { super.visitMethod(method); final PsiType returnType = method.getReturnType(); if (returnType == null || returnType.equals(PsiTypes.booleanType())) { return; } if (ignoreBooleanMethods && returnType.equalsToText(CommonClassNames.JAVA_LANG_BOOLEAN)) { return; } if (!startsWithQuestionWord(method.getName())) { return; } if (onlyWarnOnBaseMethods) { if (MethodUtils.hasSuper(method)) { return; } } else if (LibraryUtil.isOverrideOfLibraryMethod(method)) { return; } registerMethodError(method, method); }