Is there a way to exclude specific methods in classes when analyzing with sonarqube? All I find is how to exclude files and modules.
Asked
Active
Viewed 8,939 times
1 Answers
5
Unless you want to surround the methods with marker comments and use exclusions, the answer is no.

G. Ann - SonarSource Team
- 22,346
- 4
- 40
- 76
-
1How? Could you please write here one example. – Krishna Kumar Singh Dec 14 '20 at 15:22
-
1@G.Ann - SonarSource Team, the link provided is no longer available :(... is there an udpated link? – Artanis Zeratul Oct 17 '21 at 05:56
-
@G.Ann-SonarSourceTeam, thank for the update. I think it will be worth mentioning this link to give us an example --> https://community.sonarsource.com/t/sonar-ignore-issues-by-block-not-working/27008/6 – Artanis Zeratul Oct 21 '21 at 22:12
-
This documentation link is more specific: https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/#ignore-blocks-within-files – éclairevoyant Dec 12 '22 at 15:56
-
https://stackoverflow.com/a/76722069/10435528 has an example – devatherock Jul 19 '23 at 13:55