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.