Detecting Hints in pl/sql code using custom rules (XPath)

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    ** SonarQube - pl/sql 3.4.1 (build 2576)

  • what are you trying to achieve
    Write a custom rule to report where Oracle Hints are used in the pl/sql codebase

  • what have you tried so far to achieve this
    Tried the sslr toolkit and looks like it just ignores the hints and they dont appear in the parsed xml or abstract tree

I’m afraid that what you want to achieve is not possible.
In Oracle PL/SQL, hints are specified as comments and, as far as I know, there’s no way to access comments when writing an XPath custom rule.