VB.NET

Language-specific information about the way that SonarQube Cloud supports the analysis of VB.NET.

Supported versions

The level of support for a language is defined as follows:

  • Fully supported: Analysis will complete. All the language features are understood and examined.

  • Supported: Most language features are understood and examined but the version includes unsupported features. Analysis might break or provide incomplete results.

Versions 7 to 16 are fully supported.

Supported frameworks and tools

ASP.NET MVC, ASP.NET Core MVC

Language-specific properties

To discover and update the VB.NET-specific properties, navigate in SonarQube Cloud to Your Project > Administration > General Settings > Languages > VB.NET. See the Analysis parameters page for more information about specific properties.

Analyze Generated Code

To analyze tool-generated code (e.g. WCF code generated by SvcUtil.exe) for a specific VB.NET project, enable the "Analyze generated code" setting inside Project > Administration > General Settings > Languages > VB.NET. By default, tool-generated code files are skipped from the analysis.

The detection of generated code is based on the file name, special comments, and attributes. The currently recognized values are in GeneratedCodeRecognizer.cs.

When a Generated comment is present in the file, SonarQube ignores the entire ** file, even if only parts of it were generated. It’s possible to enable or disable analysis of files containing generated code at the project level in Your project > Administration > General Settings > Languages > Your language > Analyze generated code.

Scanner compatibility

To analyze VB.NET code, you need to use the Introduction version 4.x or newer.

Exclusions

Files to be excluded should be set in the project configuration. Excluded files are still going to be analyzed during the compilation and the results will be filtered according to the exclusion settings.

As an alternative, a .editorconfig file can be used to disable the analysis for a specific rule on a file or directory. This can solve performance problems on large files.

[Path/File.vb]
dotnet_diagnostic.Sxxx.severity = none

Known Limitations

Currently, an error will be thrown when an issue is raised on a line of code containing the following pattern \s+error\s*: (i.e. one or more spaces, the string ‘error’, zero or more spaces, and a ‘:’ ). This is a well-known problem on the Microsoft side (see issue). In order to work around this problem, the analysis will skip issues reported on any line where the pattern is detected.

Last updated

Was this helpful?