- what are you trying to achieve*
I would like set new custom rule in my project. As it’s PL/SQL related repository I have to do it via XPath.
In my case I would like to create a rule that shows (for partcular file extension) that SQL keyword ‘FORCE’ have to be used on the beginning of code, during view creation.
COMPLIANT: CREATE OR REPLACE FORCE VIEW…
NONCOMPLIANT: CREATE OR REPLACE VIEW…
Unfortunately there are no info about xpath expressions creation in sonar documentation and in others such info has often nothing to do with sonar rules.
- what have you tried so far to achieve this*
I was on sonar documentation chapter “Adding Code Rules” as well as browsed half of internet trying to solve this puzzle but I did not find even quite similar issue to mine.