Custom sonar-xml plugin highlighting conflict

127 Views Asked by At

I've developed a custom XML plugin for Sonar, based on a fork of official sonar-xml plugin following these recommendations.

When I develop the custom plugin the sonar-xml version was 1.5.1 and and both plugins work fine together in SonarQube 5.6.6.

Now I'm upgrading the SonarQube version to 7.9.1 and his plugins, but when the analysis is performed with sonar-xml-plugin v2.0.1 and my custom xml plugin based on sonar-xml-plugin v1.5.1 I get an error trying to save highlighting for XML files and an Issue in those files with issues detected by both plugins:

Parse error: Trying to save highlighting twice for the same file is not supported: samplefile.xml
Rule: XML parser failure (xml:S2260)

After seeing the javadoc of NewHighlighting class I came to the conclusion that it is a deliberate decision but I need to use both plugins and I would not want to leave them without updating because I also want to see the issues in SonarLint.

And not, rules based on XPath template of sonar-xml-plugin are not enough for my rules requirements.

Has anyone somewhere had the same problem? Some idea to solve the problem? Thanks a lot in advance!

0

There are 0 best solutions below