SonarQube PHP
  1. SonarQube PHP
  2. SONARPHP-222

Ignore disabled rules during the analysis

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.4
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      "Sensors" run the tools (PMD/PHPCodeSniffer) to analyse the code.
      "RulesRepository" are able to export a configuration from the SONAR format to the Tools configuration format.

      The "RulesRepository" import/export functions are useless today, because the "Sensor" are not using them.

      The "Sensor" should import the rules as a config file, to not parse all rules during the source analysis:

      • it will reduce the processing time because it ignores the disabled rules
      • it will reduce the XML output, so it will reduce the parsing time of this XML

      The rules are filtered during the "xml parsing" time, by checking if the rule is enabled or disabled n the DB.

        Activity

        Hide
        Mathias kluba added a comment -

        To be able to do it for PHPCodeSniffer, please:

        Show
        Mathias kluba added a comment - To be able to do it for PHPCodeSniffer, please: download the "permalinks" ruleset from Sonar (ex: http://localhost:8080/sonar/profiles/export?format=php_codesniffer_rules&language=php&name=ALL ) copy it in /target/sonar/ruleset.xml add it to the phpc command line: phpc --standard="/path/to/project/target/sonar/ruleset.xml
        Hide
        Akram Ben Aissi added a comment -

        phpmd and phpcodesniffer tools now received their ruleset on the fly from their respective profile exporter.

        Show
        Akram Ben Aissi added a comment - phpmd and phpcodesniffer tools now received their ruleset on the fly from their respective profile exporter.

          People

          • Assignee:
            Akram Ben Aissi
            Reporter:
            Anonymous
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: