
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
49 lines
980 B
Plaintext
49 lines
980 B
Plaintext
== Why is this an issue?
|
|
|
|
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 an issue on each 'td' tag using the 'nowrap' deprecated attribute:
|
|
|
|
----
|
|
//td[@nowrap]
|
|
----
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
=== Parameters
|
|
|
|
.filePattern
|
|
****
|
|
|
|
Files to be validated using Ant-style matching patterns.
|
|
****
|
|
.expression
|
|
****
|
|
|
|
The XPath query
|
|
****
|
|
.message
|
|
****
|
|
|
|
----
|
|
The XPath expression matches this piece of code
|
|
----
|
|
|
|
The issue message
|
|
****
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|