rspec/rules/S140/python/rule.adoc
Arseniy Zaostrovnykh 7ca29f686f Force linebreaks
2021-02-02 15:02:10 +01:00

24 lines
930 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
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
Here is an example of an XPath expression to log a violation on each statement:
----
//statement
----