Issue
I would like to exclude the necessity of having package-info
files in every of our packages. My defined path is ignored, so probably it is wrong. Please what is the correct expression for matching all packages under com.*
?
<sonar.issue.ignore.multicriteria.e11.ruleKey>squid:S1228</sonar.issue.ignore.multicriteria.e11.ruleKey>
<sonar.issue.ignore.multicriteria.e11.resourceKey>com/**</sonar.issue.ignore.multicriteria.e11.resourceKey>
Solution
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).
So you can only apply the rule on your entire project, or disable it.
Answered By - Julien H. - SonarSource Team
Answer Checked By - Marie Seifert (JavaFixing Admin)