Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

developmentDependency not added when used with SonarLint #1

Open
pascalberger opened this issue Aug 23, 2016 · 12 comments
Open

developmentDependency not added when used with SonarLint #1

pascalberger opened this issue Aug 23, 2016 · 12 comments
Assignees

Comments

@pascalberger
Copy link

pascalberger commented Aug 23, 2016

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
Copy link
Contributor

@pascalberger I will check this.

@carloscds carloscds self-assigned this Aug 23, 2016
@carloscds
Copy link
Contributor

@pascalberger Your custom analyzers include developmentDependency attribute ?

@pascalberger
Copy link
Author

@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
Copy link
Contributor

@pascalberger Can you test with this new version ?

@pascalberger
Copy link
Author

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

@carloscds
Copy link
Contributor

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

@pascalberger
Copy link
Author

@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
Copy link
Contributor

@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
Copy link
Author

@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
Copy link
Contributor

@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
Copy link
Author

@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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants