@Override
  public BaseInspectionVisitor buildVisitor() {
    return new BaseInspectionVisitor() {
      @Override
      public void visitIfStatement(@NotNull PsiIfStatement ifStatement) {
        super.visitIfStatement(ifStatement);
        boolean chainedIf = PsiTreeUtil.skipWhitespacesAndCommentsBackward(ifStatement) instanceof PsiIfStatement ||
                            (ifStatement.getParent() instanceof PsiIfStatement &&
                             ((PsiIfStatement)ifStatement.getParent()).getElseBranch() == ifStatement);
        if (ignoreChainedIf && chainedIf && !isOnTheFly()) return;
        final PsiExpression condition = ifStatement.getCondition();
        if (condition == null) {
          return;
        }
        if (isTrivial(ifStatement)) {
          PsiElement anchor = Objects.requireNonNull(ifStatement.getFirstChild());
          ProblemHighlightType level =
            ignoreChainedIf && chainedIf ? ProblemHighlightType.INFORMATION : ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
          String turnOffOption;
          if (chainedIf && !ignoreChainedIf &&
              !InspectionProjectProfileManager.isInformationLevel(getShortName(), ifStatement)) {
            turnOffOption = "ignoreChainedIf";
          }
          else if (!ignoreAssertStatements && isSimplifiableAssert(ifStatement)) {
            turnOffOption = "ignoreAssertStatements";
          }
          else {
            turnOffOption = null;
          }
          registerError(anchor, level, turnOffOption);
        }
      }
    };
  }
@Override
  public BaseInspectionVisitor buildVisitor()