resourceKey = ComponentKeys.createEffectiveKey(def.getKey(), inputPath);
} else {
resourceKey = def.getKey();
}
RuleKey ruleKey = issue.ruleKey();
DefaultActiveRule activeRule = (DefaultActiveRule) activeRules.find(ruleKey);
if (activeRule == null) {
// rule does not exist or is not enabled -> ignore the issue
LOG.debug("Rule {} does not exists or is not enabled. Issue {} is ignored.", issue.ruleKey(), issue);
return;
}
if (Strings.isNullOrEmpty(activeRule.name()) && Strings.isNullOrEmpty(issue.message())) {
throw MessageException.of(String.format("The rule '%s' has no name and the related issue has no message.", ruleKey));
}
updateIssue((DefaultIssue) issue, activeRule);