I started to implement support for Business Process Model and Notation language. (Xml notation which describes process execution.) There are rules and tests executed on the top of the process as for regular java class.
I have some problems:
- bpmn file sufixes are: ‘.bpmn,.bpmn20.xml’. there is a clash between xml and bpmn languages to decide which scanner to use
Language of file 'src\main\java\my-process.bpmn20.xml' can not be decided as the fi ile matches patterns of both sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl and sonar.lang.patterns.bpmn : **/*.bpmn20.xml -> [Help 1]
- in a scanner
fileSystem.inputFiles(...) returns only files from
src/main/java or . project directory.
bpmn20.xml files are usually stored in
src/main/model… . How can I add additional directories to filesystem?
Thank you in advance,
Welcome to the community!
XML support is shipped out-of-the-box in SonarQube. You can either remove .xml as an XML extension, or just rely on that default support to make the files available to analysis.
For finding the files, I guess you’re doing a Maven analysis. In that case, the default value for
sonar.sources is going to be Maven-centric, i.e. Java-centric. So you’ll need to override
sonar.sources to pass in the broader list of locations.
Thank you for your help.
Is it possible to have both analysis on
.xml files? or can
.bpmn20.xml has precedence before
Sure. It seems that you’ve declared BPMN as a language and, thus provided metrics and claimed file extensions for it. If you run it as an additional analyzer, you won’t need to do either of those things.
I’m not familiar with what you will have to do to make sure your stuff is run as additional XML checks, but you can probably pick that up from something like the Checkstyle plugin.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.