@NotNull
  private static InspectionProfile getCurrentProfile(@NotNull PsiFile file) {
    Function<? super InspectionProfile, ? extends InspectionProfileWrapper> custom = InspectionProfileWrapper.getCustomInspectionProfileWrapper(file);
    InspectionProfileImpl currentProfile = InspectionProjectProfileManager.getInstance(file.getProject()).getCurrentProfile();
    return custom != null ? custom.apply(currentProfile).getInspectionProfile() : currentProfile;
  }
@NotNull
  private static InspectionProfile getCurrentProfile(@NotNull PsiFile file)