rspec/rules/S140/plsql/rule.adoc
Alban Auzeill 2c306d110e Fix code block ambiguity with old header style
Ensure blank line before list and clean the one leading space
2020-06-30 17:16:12 +02:00

20 lines
757 B
Plaintext

This rule allows the definition of custom rules using XPath expressions.
Issues are created depending on the return value of the XPath expression. If the XPath expression returns:
* a single or list of AST nodes, then a line issue with the given message is created for each node
* a boolean, then a file issue with the given message is created only if the boolean is true
* anything else, no issue is created
On the following code, the XPath expression <code>//IDENTIFIER[string-length(@tokenValue) >= 10]</code> generates a violation on the identifier "aaaaaaaaaa":
----
DECLARE
aaaaaaaaaa NUMBER := 10; /* Non-Compliant, this identifier is 10 characters long */
aaaaaaaaa NUMBER := 9; /* Compliant, this one is only 9 */
BEGIN
NULL;
END;
/
----