Uploaded image for project: 'SonarPHP'
  1. SonarPHP
  2. SONARPHP-12

Squiz.Formatting.OutputBufferingIndent sniff in ruleset.xml causing PHPCodeSniffer fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      Running Hudson Sonar plugin on PHP project causes PHPCodeSniffer to exit with 255 return code. I've run PHPCodeSnifer from command line on the same project with ruleset.xml provided and used by Hudson Sonar plugin (located in target/logs/) to investigate this issue. It turned out that this ruleset file contains some sniffs that are no longer used by PHPCodeSniffer. In my case the one causing problem is Squiz.Formatting.OutputBufferingIndent. Regarding to PHPCodeSniffer web page it was removed in version 1.3 RC2. This is the error message from PHPCodeSniffer:

      PHP Fatal error: Uncaught PHP_CodeSniffer_Exception: Referenced sniff Squiz.Formatting.OutputBufferingIndent.InvalidClose does not exist in /usr/share/php/PHP/CodeSniffer.php on line 738

      Here are the details of my environment:
      Hudson 2.0.1
      Hudson Sonar Plugin 1.6.1
      Maven 3.0.3
      PHPCodeSniffer 1.3.0
      Sonar 2.7

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Anonymous Anonymous
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: