code: Path dumpXmlReport(Report report) {
          if (!settings.getBoolean(PROPERTY_GENERATE_XML).orElse(false)) {
              return null;
          }
  
          try {
              final String reportAsString = reportToString(report);
              final Path reportFile = writeToWorkingDirectory(reportAsString, PMD_RESULT_XML);
  
              LOG.info("PMD output report: " + reportFile.toString());
  
              return reportFile;
          } catch (IOException e) {
              throw new IllegalStateException("Fail to save the PMD report", e);
          }
      }
docs: Writes an XML Report about the analyzed project into the current working directory
  unless <code>sonar.pmd.generateXml</code> is set to false.
  
  @param report The report which shall be written into an XML file.
  @return The file reference to the XML document.