SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-574

[Patch] PDF Report does not URLEncode rules name, causes crashes

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: PDF-REPORT-1.1, PDF-REPORT-1.2
    • Fix Version/s: PDF-REPORT-1.2
    • Component/s: PDF Report
    • Labels:
      None
    • Environment:
      Debian lenny, sonar 2.1
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      The PDF report plugin does not work when rules names contains spaces (i.e. The PHP plugin has rules named PHP PMD, PHP Unit, ...). As the PDF plugin use the API to collect data, the url is not correct. Here is the error:

      [INFO] [pdf-report:generate]
      [INFO] Team workbook report type selected
      [INFO] Retrieving project info for com.sensio.app:testapp
      [INFO]     Retrieving measures
      [INFO]     Retrieving categories RCI
      [INFO]     Retrieving most violated rules
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Can not execute Sonar
      
      Embedded error: Can not analyze the project
      Invalid uri 'http://localhost:9000/api/violations?resource=com.sensio.app:testapp&scopes=FIL&depth=-1&limit=20&rules=PHP PMD:CyclomaticComplexity&format=xml': Invalid query
      

      I join a patch that fix this issue.

        Activity

        Hide
        Antonio Manuel Muñiz Martín added a comment -

        Patch applied with a little modification (logging).

        Show
        Antonio Manuel Muñiz Martín added a comment - Patch applied with a little modification (logging).

          People

          • Assignee:
            Antonio Manuel Muñiz Martín
            Reporter:
            Noel GUILBERT
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: