SonarQube PHP
  1. SonarQube PHP
  2. SONARPHP-72

Importing an existing profile require priority to be present

    Details

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

      Description

      When creating a new quality profile and importing CodeSniffer ruleset, it should not be mandatory to specify priorities.

        Activity

        Hide
        Fabrice Bellingard added a comment -

        Hi Olivier,

        I've tried creating a new PHP profile and importing the following PHP CodeSniffer ruleset file in this profile, and it works:

        <?xml version="1.0" encoding="UTF-8"?>
        <ruleset name="PHP_CodeSniffer rules">
          <rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
          </rule>
        </ruleset>
        

        Do you have an example of files that make this fail?

        Show
        Fabrice Bellingard added a comment - Hi Olivier, I've tried creating a new PHP profile and importing the following PHP CodeSniffer ruleset file in this profile, and it works: <?xml version= "1.0" encoding= "UTF-8" ?> <ruleset name= "PHP_CodeSniffer rules" > <rule ref= "Generic.CodeAnalysis.EmptyStatement.NotAllowed" > </rule> </ruleset> Do you have an example of files that make this fail?
        Hide
        Fabrice Bellingard added a comment -

        This must have been fixed in previous versions.
        I added a test case to check this issue.

        Show
        Fabrice Bellingard added a comment - This must have been fixed in previous versions. I added a test case to check this issue.

          People

          • Assignee:
            Fabrice Bellingard
            Reporter:
            Anonymous
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: