Customize Sonarway BuiltIn Rule "Inheritance tree of classes should not be too deep"

Hi Team,

We are using sonarway builtIn rule, but Developer wants to customize this rule " Inheritance tree of classes should not be too deep".

Can someone please help me here.

Hi,

Welcome to the community!

I guess you’re using the “Sonar way” profile? Those built-in profiles aren’t customizable. You’ll want to make a copy, and then you’ll be able to edit the rule parameter value in the copy profile. Just don’t forget to set your new profile as the default!

 
HTH,
Ann

Thanks Ann!!

Is it possible to share some sample JAVA code related to Customize Rule “Inheritance tree of classes should not be too" .

Hi,

I don’t understand the request. This isn’t about writing a custom rule. What I’ve suggested^ is done through the UI.

 
Ann