Skip to content
New issue

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

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

Already on GitHub? # to your account

Add VB.NET support #100

Closed
vickyrocky opened this issue Sep 12, 2018 · 2 comments · Fixed by #213
Closed

Add VB.NET support #100

vickyrocky opened this issue Sep 12, 2018 · 2 comments · Fixed by #213
Assignees
Milestone

Comments

@vickyrocky
Copy link

vickyrocky commented Sep 12, 2018

Hi,

I have written vb analyzer and was trying to package into jar file using this sdk but getting following warning and also jar file is not created.Please refer the screenshot:
image

[EDIT] also asked at https://community.sonarsource.com/t/writing-vb-net-custom-rule/2492

@duncanp-sonar
Copy link
Contributor

Hi @vickyrocky,

The first problem is this line of code in the SonarQube Roslyn SDK i.e. it is currently hard-coded only to search the NuGet package for C# analyzers.

In theory if you changed that line of code to specify VB.Net then the SDK would produce a .jar file for you (although I noticed a second problem, which is that the language id here for Visual Basic should be vbnet rather than vb).

I say in theory because the SonarQube Roslyn SDK depends on code in the SonarScanner for MSBuild to correctly provision the analyzers during the build and upload the issues afterwards. This definitely works for C# analyzers, but it's pretty clear it won't have been tested for VB analyzers.

At runtime, you would still need to have the SonarVB plugin installed (currently part of the commercial Developer Edition).

The other alternative is to rely on the forthcoming feature in SQ7.4 that will allow all Roslyn issues to be uploaded automatically to SonarQube/SonarCloud that NicoB referred to in response your post to the community forum.

@duncanp-sonar duncanp-sonar added this to the Support milestone Sep 18, 2018
@pascalberger
Copy link

This would be an important feature for us. We have projects in C# and VB.NET and custom Roslyn analyzers for them (some analyzers in the assembly are for C# only, some for VB.NET only, others for both languages). We would like to use the SDK to create a plugin for our analyzer, so that we can use SonarQube as central place for issue management, documentation and also manage quality gates with SonarQube. This won't be possible as long as the SDK doesn't support VB.NET.

While the external issues feature helps in reporting issues from the custom analyzers in VB.NET projects it won't allow to use Quality Profiles in SonarQube for ruleset management.

@pavel-mikula-sonarsource pavel-mikula-sonarsource changed the title Not able to package vb analyzer Add VB.NET support May 15, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants