static HighlightInfo.Builder checkWellFormedRecord(@NotNull PsiClass psiClass) {
    PsiRecordHeader header = psiClass.getRecordHeader();
    if (!psiClass.isRecord()) {
      if (header != null) {
        HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(header)
          .descriptionAndTooltip(JavaErrorBundle.message("record.header.regular.class"));
        IntentionAction action = QuickFixFactory.getInstance().createDeleteFix(header);
        info.registerFix(action, null, null, null, null);
        return info;
      }
      return null;
    }
    PsiIdentifier identifier = psiClass.getNameIdentifier();
    if (identifier == null) return null;
    if (header == null) {
      HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(identifier)
        .descriptionAndTooltip(JavaErrorBundle.message("record.no.header"));
      IntentionAction action = QuickFixFactory.getInstance().createAddEmptyRecordHeaderFix(psiClass);
      info.registerFix(action, null, null, null, null);
      return info;
    }
    return null;
  }
static HighlightInfo.Builder checkWellFormedRecord(@NotNull PsiClass psiClass)