Skip to end of metadata
Go to start of metadata

There are two ways to extend coding rules:

  1. Writing coding rules using Java via a SonarQube plugin
  2. 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.

(tick) Available; (error) Not Available

 XPathJavaOther
ABAP(error)(error) 
C/C++

(error)

(error) CPP-202 
C#

(error)

(error)

(tick) Custom C# Roslyn Analyzers can be integrated in SonarQube with the sonarqube-roslyn-sdk

COBOL(error)(tick) 
Flex(tick)(error) 
Java(error)(tick) 
JavaScript(error)(tick) 
Objective-C(error)(error) CPP-202 
PHP(error)(tick) 
PL/SQL(tick)(error) 
PL/I(tick)(error) 
Python(tick)(error) 
VB.NET(error)(error)

(tick) Custom C# Roslyn Analyzers can be integrated in SonarQube with the sonarqube-roslyn-sdk

Visual Basic 6(error)(error) 
RPG

(error)

(tick) 
Swift(error)(error) 
T-SQL(error)(error)
Web(error)(error) 
XML(tick)(error) 


 

  • No labels