VB Code Analysis Issue in SonarQube

Hi,

I’m trying to run code analysis on project files, but the .vb files in the project are not being scanned even though we are using Quality profile with VB rules. Can you please help on this issue.

  • SonarQube server version: Enterprise Edition - Version 8.9
  • error observed : Files have not been analyzed.

Hi @lohith,

Can you please provide more information about your setup? Is there anything interesting in the analysis logs?

What is your file suffix configuration between VB6 and VB.NET plugins? Both can be configured as *.vb consumers.

I’m afraid we don’t have enough information yet to help you with your configuration.

Pavel

Hi @Pavel_Mikula ,

We have installed SQ on a server(Enterprise Edition - V 8.9) and trying to analyze a project which includes VB.NET files. Please find below screen shot on what we were seeing in SonarQube .vb file analysis. Except .vb files all other extension files we can see analysis data like loc,bugs etc.

Thanks in advance
Lohith

Hi @lohith,

There’re VB6 and VB.NET available on SQ Enterprise Edition and they share *.vb file extension. You should be able to confirm this theory in verbose logs.

You can try adding this parameter /d:sonar.lang.patterns.vb="*.bas" to reset VB6 file extensions for your VB.NET analysis. If it helps, you can reconfigure registered extensions in your project settings/languages on your SQ instance.

If this theory doesn’t help, please check logs in verbose mode for more clues.

Hi @Pavel_Mikula,

We have updated language patterns as mentioned above but didn’t find anything and same issue persists as above image. At first after updating it failed with conflict since it has .vb and .bas in both vb.net and vb6. later on tried patterns only for vb.net and it didn’t work.

Regards,
Lohith KE.

Please run the analysis with debug verbosity logs for more clues.

Hi @Pavel_Mikula,

I did run Sonar analysis with debug verbose logs and have attached logs file. Please have look at it if you get time.

Thanks in advance,
Lohith KE.
VB_SQ Analysis.txt (1.9 MB)

Hi,
How did you setup your analysis? The logs indicate that you’ve used Azure DevOps extension. Is that correct?

What are the parameters that you’ve passed to the extension?

It seems that you’ve explicitly configured sonar.modules that doesn’t match your module GUIDs, resulting in overriding the autogenerated stuff. Can you remove the explicit sonar.modules?