Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-6162

NullPointerException is thrown when searching for Check of custom rules

    Details

      Description

      This issue does not exists when the old annotation API is used, but exists when using the RuleDefinition API.

      Here's how it was working with old API :

      • In the org.sonar.api.batch.rule.Checks class, the check of the current active rule is found by using the rule key or the internal key.
      • There is a 'hack' in old Annotation API that automatically set the internal key with the rule key
      • When creating a custom rule, the internal key of the template is copied -> The Check could be found by using the internal key.

      With the RuleDefinition API, the internal key is not set from the key, Checks on custom rules are no more found.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                henryju OLD - Julien HENRY
                Reporter:
                julien.lancelot Julien Lancelot
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: