SonarAnalyzer.VisualBasic Disposable

Hello everyone,

I am new to the community, first I apologize if I created this thread incorrectly.

I have noticed that SonarQube and SonarLint analysing code in VisualBasic.NET language (SonarAnalyzer.VisualBasic) does not detect possible problems:
Using blocks to apply the Dispose
Apply the Close() of StreamMemory and HttpWebResponse.

I have the following code in VB.NET:

 Private Sub Test()
        request = DirectCast(WebRequest.Create(url), HttpWebRequest)
        Dim requestWriter As StreamWriter = New StreamWriter(request.GetRequestStream())

        response = DirectCast(request.GetResponse(), HttpWebResponse)

End Sub

In VB.NET it was not suggesting to close and in C# projects it was suggesting to add it in Using block or close.

I have found a rule that does detect it in C# CA2213: Disposable fields should be disposed, but I haven’t found any similar rule for Visual Basic.Net.

I have been checking the open tasks, but I can’t find anything related. Issues · SonarSource/sonar-dotnet · GitHub

Are these new rules and do they have to be requested, do these rules have to be created, do these rules already exist?

Thank you

SonarQube Version 8.4.2 (build 36762)


Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.4.2 → 8.9.3 → 9.1 (last step optional)

You may find the Upgrade Guide helpful.

If your error persists after upgrade, please come back to us.