@Nullable
  private static CodeStyleSettings getLocalOrTemporarySettings(@NotNull Project project) {
    CodeStyleSettingsManager settingsManager = CodeStyleSettingsManager.getInstance(project);
    CodeStyleSettings localSettings = settingsManager.getLocalSettings();
    if (localSettings != null) {
      return localSettings;
    }

    @SuppressWarnings("TestOnlyProblems")
    CodeStyleSettings tempSettings = settingsManager.getTemporarySettings();
    if (tempSettings != null) {
      if (!ApplicationManager.getApplication().isUnitTestMode()) {
        LOG.warn("Temporary settings used in production. Please use CodeStyle#runWithLocalSettings instead.");
      }
      return tempSettings;
    }

    return null;
  }
@Nullable
  private static CodeStyleSettings getLocalOrTemporarySettings(@NotNull Project project)