How to build XPATH query for adding new rules for PL/SQL in SonarQube?


(Sayantan Srimani) #1

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)-- SonarQube V7.0, Scanner v3.1.0.1141, Plugin -sonar-plsql-open-plugin-2.1.0-SNAPSHOT
  • what are you trying to achieve - I am trying to build new rules for PL?SQL in SonarQube
  • what have you tried so far to achieve this- I have found that new rules needs to be create through XPATH query and that needs to be build in SSLR Toolkit. So for that I have installed all the necessary things but I want to know what exact details we have to provide to generate XPATH query.

(Colin Mueller) #2


The plugin you are using is the Community PL/SQL analyzer rather than the SonarSource’s PL/SQL analyzer. Therefore, the documentation for custom PL/SQL rules (or anything else related to scanning PL/SQL) found in SonarSource’s documentation may not apply.

I suggest asking the maintainers of the Community PL/SQL analyzer, or referring to these docs included in their wiki. It does not look like xPath is an option here.