Exclude package-level rule java:S1228

Hi,
I would like to ignore the rule
Packages should have a javadoc file 'package-info.java’java:S1228
for some packages.

However this seems not to work, even if the ruleKey pattern */ is used which should match all files.

<sonar.issue.ignore.multicriteria>missingPackageInfo</sonar.issue.ignore.multicriteria>
<sonar.issue.ignore.multicriteria.missingPackageInfo.ruleKey>java:S1228</sonar.issue.ignore.multicriteria.missingPackageInfo.ruleKey>
<sonar.issue.ignore.multicriteria.missingPackageInfo.resourceKey>**/*</sonar.issue.ignore.multicriteria.missingPackageInfo.resourceKey>

I assume this could be caused by the fact that the rules is not applied to files, but to packages.

I also found this old post from 2019 which seems to support this hypothesis and also states that there is no solution for this.

“The rule S2118 is a special case since issues are not reported on files. They used to be reported on folders, but with recent versions of SonarQube we removed the ability to report issues on folders so those issues will be reported at project level.
In any case (old or new behavior) it is not possible to use issue exclusion by path pattern for such issues (it only works for file level issues).”

Is this still true in 2025, is there really no way to disable this rule for some specific packages?

Thanks,
Thomas

SonarQube, Enterprise Editionv 9.9.8

Hey there.

Nothing has changed here since 2019 – issue exclusions like this only deal with line-level issues, not file/package-level issues (of which we develop quite a few these days).

You can, however, remove the rule from your Quality Profile or simply mark the issue as false-positive/won’t fix.