Disable specific sonarqube rule for all java files in a project -


i running sonarqube analysis 1 of java project , reporting lot of violations , majority of violations reported maximum number of parents class can have squid:maximuminheritancedepth

this class has 6 parents greater 5 authorized

i have more 100 classes in project , not want add @suppresswarning annotation each of classes.

is there way can disable rule java files in project?

one option analyze project copy of profile you've removed rule.

another create profile, inherit rules existing profile , update parameter value on particular rule, bumping value 6 (or 7 or ...)

a third option use exclusions turn rule off files in project.

go project administration > general settings > analysis scope > ignore issues on multiple criteria , fill in rule key (squid:maximuminheritancedepth) , file pattern (**/*.java) , should trick.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -