code-cracker / SonarQubePlugin

Code Cracker SonarQube plugin
Apache License 2.0
4 stars 0 forks source link

developmentDependency not added when used with SonarLint #1

Open pascalberger opened 8 years ago

pascalberger commented 8 years ago

I've added the Code Cracker plugin to my Sonar instance and added its rules to some quality profile. In Visual Studio I use SonarLint to synchronize the rulesets. While SonarLint adds the codecracker.CSharp analyzer to the project it doesn't add the developmentDependency attribute.

Not sure if this is an issue with the plugin or SonarLint, but it works fine for other analyzers (including custom ones which I've created using their SDK).

carloscds commented 8 years ago

@pascalberger I will check this.

carloscds commented 8 years ago

@pascalberger Your custom analyzers include developmentDependency attribute ?

pascalberger commented 8 years ago

@carloscds I've created a custom analyzer for the StyleCop.Analyzers project (just run their generator, without any metadata, etc and put this on my Sonar server). For this Analyzer the developmentDependency is correctly set in the packags.config file.

carloscds commented 8 years ago

@pascalberger Can you test with this new version ?

pascalberger commented 8 years ago

@carloscds Do you have instructions how / what to test?

carloscds commented 8 years ago

@pascalberger I'm talking with SonarQube team about this. please wait few days to proceed.

pascalberger commented 8 years ago

@carloscds OK. Since SonarLint downloads the NuGet package, I assume I need to build the NuGet package, put them on a private NuGet server, build the Sonar Plugin with the new NuGet package version, install it in Sonar and finally test using SonarLint. But maybe there's an easier way :)

carloscds commented 8 years ago

@pascalberger Update .jar file on your sonarQube Server and restar it. Activate CodeCracker Rules for C# (if you have not activated) and try SonarLint.

pascalberger commented 8 years ago

@carloscds Any special requirements how to build the nupkg/jar? Couldn't find build instructions. Just build in VS, run nuget pack and the Sonar SDK?

carloscds commented 8 years ago

@pascalberger you don't need to build NuGet, only download this new jar file (https://github.com/code-cracker/SonarQubePlugin/blob/master/codecrackercsharp-plugin-1.1.0.jar) and copy to your plugins directory under sonar server.

pascalberger commented 8 years ago

@carloscds This doesn't work like this. SonarLint requires the NuGet package to be available in the specified version. Since you updated the Sonar Plugin to 1.1.0 it now searches for a Code Cracker Plugin version 1.1.0 which doesn't exist, and therefore nothing is added.

carloscds commented 8 years ago

@pascalberger According to SonarQube Google List, there is an incompatible problem between Roslyn SDK and SonarLint, but I´m investigating.