am i right that code analisys support for VB isn't complete in the current EAP build 2070? I've noticed the following problems:
with keyword seems not to be supported. All properties of the variable accessed within a with block are marked as error.
- For a property defined as public readonly R# displays the error message "Property has no setter"
- The My namespace seems not to be supported as access to My.Computer displays the error message "Cannot resolve symbol Computer".
On Error GoTo 0 is marked as error (On Error Resume Next not).
- In the .designer.vb files assignments to the Name property of a control marked with the error "Cannot resolve symbol '...'"
- I have defined an enumeration in a separate file without specifying a namespace. The first lines in the code are Option Strict / Explicit. I moved the enum to a namespace with the corresponding R# refactoring. The Namespace definition is placed in the same line as my last Option definition instead into a new line which leads to an error.
Another thing is the following: I have a function with following signature:
Public Function FehlerBearbeitung(ByRef iReturnCode As Integer, ByRef sFormName As String, ByRef sFunktionsName As String, _
Optional ByRef sBemerkung As String = "") As Short
Then i call it the following way:
FehlerBearbeitung(iReturnCode, MK_FormName, "MeineMethode")
where MK_FormName is defined as private const of type String
R# says "Constant cannot be used as assignment target".
I understand this, because ByRef returns the parameter. The reason for this declaration is, that the code was converted from VB 6 with the
migration assistant. As the migration assistant migrates all function parameters as ByRef by default i have much errors of this type in my code.
I didn't find an entry in the Inspect Severity options to control this message.