There are two ways to extend coding rules:
- Writing coding rules using Java via a SonarQube plugin
- Adding XPath rules directly through the SonarQube web interface
Note that the Java API, if available, will be more fully-featured than what's available for XPath, and is generally preferable.
Before implementing a new coding rule, you should consider whether it is specific to your own context or might benefit others. If it might benefit others, you can propose them on the Community Forums. If there is shared interest, then they might be followed-up directly in the related language plugin. It means less maintenance for you, and benefit to others.
Support of Custom Rules by Language
This table shows if for a given language you can add custom rules using XPath, Java or other technologies.
Available; Not Available
|VB.NET||Importing Issues from Third-Party Roslyn Analyzers (C#, VB.NET)|
|Visual Basic 6|