Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this
I am using sonarQube 7.6
want to evaluate regular expressions in SonarQube
Hi,
Am trying to explore SonarQube7.6 community edition for xml code review.
As part of building custom rule to validate the xml, created a regular expression - matches(//*[local-name() = ‘set-payload’]/@doc:name, ‘[A-Z]’)
But when evaluating the xml, the sonarqube is throwing below error. Can you please help me if there is any way in sonarqube to achieve the above.
matches(//*[local-name() = ‘set-payload’]/@doc:name, ‘[A-Z]’)
I am getting the below error while executing sonar-scanner:
Caused by: javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: Could not find function: matches
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:400)
at org.sonar.plugins.xml.checks.XPathCheck.getXPathExpression(XPathCheck.java:112)
… 46 common frames omitted
Thanks and Regards,
Kilani.