sonar-xsl / Sonar-XSL-Plugin

A Schematron-based SonarQube plugin for XSL code quality measurement.
http://www.sonarxsl.org/
Apache License 2.0
5 stars 3 forks source link

xsl files not recognized in Sonar #29

Open Nico-Amplexor opened 2 years ago

Nico-Amplexor commented 2 years ago

Hello,

I installed Sonar XSL Plugin on a Sonar server (Community Edition Version 9.5 - build 56709). I restricted analysis of my code to XSL files using this parameter in Maven: sonar.sources=src/*/.xsl But when I take a look at the report, I have the following message: "The main branch has no lines of code" It seems that Sonar doesn't recognized .xsl files.

In my project, if I go to Project settings > Languages I can't select XSL in the dropdown menu: image

But I can found XSL language if I checked the main "rules" menu: image

Have you ever encountered this kind of problem ? Thanks.

jimetevenard commented 1 year ago

Hi Nicolas,

Oh god, I'm so sorry for the delay. I just realised that I drafted an answer and never sent it.

I hope you're doing well since we last met in Montrouge.

The plugin does not make XSLT appear in Settings > Languages since it does not embed any settings at the moment.

The plugin handles, by default, files ending by .xsl. This leads to a conflict with Sonar's native XML plugin, so you have to remove the .xsl suffix from the XML language settings

This can be done in Project settings > Languages > XML.
See https://github.com/sonar-xsl/Sonar-XSL-Plugin/issues/23#issuecomment-923084791 for screenshot and more details.

Regards, Jim