i wrote a custom rules to check if some methods are annotated with a configurable annotation. As it is configurable i may want to check if both “MyAnnotation” and “AnotherAnnotation” is present but i can activate the rule only one time in a profile and if i create a parent profile with a different rule configuration the rule is overridden.
If I understand your question correctly, I think you are looking for “Rule Templates”. See “Rule Templates and Custom Rules” in the Rules documentation.
Concretely, you simply have to add the key of your rule to this list in the JavaRulesDefinition.