3

I have been trying to get Sonar code analysis work on a c# project. Since it's a web project I'd also like to run analysis on JavaScript.

However, as mentioned in the following link, you cannot run multi-module projects on a .NET solution (http://sonar.15.x6.nabble.com/Multi-language-javascript-amp-c-td5011530.html). The suggested workaround is to trigger two analysis profiles separately and then combine them with the views plugin (http://www.sonarsource.com/products/plugins/governance/portfolio-management/)

But this plugin costs about 1800$. Because Sonar has the possibility to analyse multiple projects in .NET through the solution file, it therefore disables multiple modules for .NET solutions (to prevent a specific error).

I find it really annoying that by doing this, it forces me to use a paid module (and not a cheap one) to create a sub-optimal workaround.

Are there any other better solutions for this?

2
  • Did you able to make it work? I am trying to do the same but unfortunately i get some error. Could you please check my post stackoverflow.com/questions/51878860/… Aug 22, 2018 at 11:29
  • I haven't worked with Sonar in a long time, so unfortunately, I'm not able to help you. However, according to the comments on the answer below, it's now possible to analyse VS.NET solution for C# and JS
    – Kenneth
    Aug 22, 2018 at 13:58

1 Answer 1

1

No, there's currently no better solution for this case. This issue has been identified and we'll take a look at it during the next spring - but I'm not sure that it can be solved easily though.

You can and watch and vote here: http://jira.codehaus.org/browse/SONARDOTNT-291

8
  • I understand that it is hard to solve. What I don't understand is then the reason to make a workaround that expensive. Would there be a possibility to create a basic free version of that component so we could at least circumvent the problem?
    – Kenneth
    May 27, 2013 at 8:32
  • You get it wrong Kenneth. The Views plugin is not meant to be THE workaround for that case: this is a more generic plugin (that existed before the C# plugins) which purpose is to handle application portfolio management. And fortunately it can be applied to solve your case until we find a good way to handle this. Also, please keep in mind that the Views plugin (and the other commercial ones) are what allows us to make a big part of the Sonar ecosystem free to use... May 27, 2013 at 8:50
  • Hi Fabrice, I think you understood me wrong. I meant that the workaround was made expensive, not that a workaround was made for this case. I certainly understand that there needs to be some kind of funding to make the rest free. I hope you also see my problem. I don't need to handle a big application portfolios, I just want to handle a very basic use case, which is possible with all languages except for .NET. I would offer help to implement this feature, but unfortunately I'm a .NET developer and Sonar is built with JAVA, so it would be rather difficult to provide a valuable contribution.
    – Kenneth
    May 27, 2013 at 10:34
  • OK, so let's wait for SONARDOTNT-291! :) May 28, 2013 at 8:39
  • 1
    @Scottie This question is very old... and so is my answer! It is now possible to analyse VS.NET solutions containing both C# and JS. Dec 10, 2015 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.