Skip to content

Commit

Permalink
Merge branch 'rubberduck-vba/next' into RenameRefactoring_ParserSuspend
Browse files Browse the repository at this point in the history
  • Loading branch information
BZngr committed Oct 11, 2019
2 parents d27309d + 1972b75 commit 16aeffa
Show file tree
Hide file tree
Showing 24 changed files with 685 additions and 466 deletions.
Expand Up @@ -21,7 +21,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// <why>
/// The VBA compiler does not check whether different object types are compatible. Instead there is a runtime error whenever the types are incompatible.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// IInterface:
///
Expand Down Expand Up @@ -49,7 +49,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// IInterface:
///
Expand Down
Expand Up @@ -15,7 +15,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// <why>
/// The VBA compiler does not check whether the necessary default member is present. Instead there is a runtime error whenever the runtime type fails to have the default member.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Class1:
///
Expand All @@ -34,7 +34,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Class1:
///
Expand Down
Expand Up @@ -14,31 +14,31 @@ namespace Rubberduck.Inspections.Concrete
/// Default member accesses hide away the actually called member. This is especially misleading if there is no indication in the expression that such a call is made
/// and can cause errors in which a member was forgotten to be called to go unnoticed.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As ADODB.Field)
/// Dim bar As Variant
/// bar = arg
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As ADODB.Connection)
/// Dim bar As String
/// arg = bar
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As ADODB.Field)
/// Dim bar As Variant
/// bar = arg.Value
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As ADODB.Connection)
/// Dim bar As String
Expand Down
Expand Up @@ -14,7 +14,7 @@ namespace Rubberduck.Inspections.Concrete
/// Default member accesses hide away the actually called member. This is especially misleading if there is no indication in the expression that such a call is made
/// and the final default member is not on the interface of the object itself. In particular, this can cause errors in which a member was forgotten to be called to go unnoticed.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Public Function Foo() As Class2
Expand All @@ -40,7 +40,7 @@ namespace Rubberduck.Inspections.Concrete
/// ]]>
/// </module>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Public Function Foo() As Class2
Expand Down
Expand Up @@ -17,29 +17,29 @@ namespace Rubberduck.Inspections.Concrete
/// and if the default member cannot be determined from the declared type of the object. As a consequence, errors in which a member was forgotten to be called can go unnoticed
/// and should there not be a suitable default member at runtime, an error 438 'Object doesn't support this property or method' will be raised.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As Object)
/// Dim bar As Variant
/// bar = arg
/// End Sub
/// ]]>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As Object)
/// Dim bar As Variant
/// arg = bar
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As Object)
/// Dim bar As Variant
/// bar = arg.SomeValueReturningMember
/// End Sub
/// ]]>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal arg As Object)
/// Dim bar As Variant
Expand Down
Expand Up @@ -14,15 +14,15 @@ namespace Rubberduck.Inspections.Concrete
/// <why>
/// An indexed default member access hides away the actually called member.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal coll As Collection)
/// Dim bar As Variant
/// bar = coll(23)
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal coll As Collection)
/// Dim bar As Variant
Expand Down
Expand Up @@ -14,15 +14,15 @@ namespace Rubberduck.Inspections.Concrete
/// <why>
/// An indexed default member access hides away the actually called member. This is especially problematic if the corresponding parameterized default member is not on the interface of the object itself.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal rst As ADODB.Recordset)
/// Dim bar As Variant
/// bar = rst("MyField")
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal rst As ADODB.Recordset)
/// Dim bar As Variant
Expand Down
Expand Up @@ -17,15 +17,15 @@ namespace Rubberduck.Inspections.Concrete
/// An indexed default member access hides away the actually called member. This is especially problematic if the default member cannot be determined from the declared type of the object.
/// Should there not be a suitable default member at runtime, an error 438 'Object doesn't support this property or method' will be raised.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal rst As Object)
/// Dim bar As Variant
/// bar = rst("MyField")
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal rst As Object)
/// Dim bar As Variant
Expand Down
Expand Up @@ -20,7 +20,7 @@ namespace Rubberduck.Inspections.Concrete
/// Providing an object where a procedure is required leads to an implicit call to the object's default member.
/// This behavior is not obvious, and most likely unintended.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Public Function Foo() As Long
Expand All @@ -37,7 +37,7 @@ namespace Rubberduck.Inspections.Concrete
/// ]]>
/// </module>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Public Function Foo() As Long
Expand Down
Expand Up @@ -20,7 +20,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// 'While...Wend' loops were made obsolete when 'Do While...Loop' statements were introduced.
/// 'While...Wend' loops cannot be exited early without a GoTo jump; 'Do...Loop' statements can be conditionally exited with 'Exit Do'.
/// </why>
/// <example hasResults="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething()
/// While True
Expand All @@ -29,7 +29,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// End Sub
/// ]]>
/// </example>
/// <example hasResults="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething()
/// Do While True
Expand Down
Expand Up @@ -15,7 +15,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// <why>
/// The VBA compiler does not check whether the necessary default member is present. Instead there is a runtime error whenever the runtime type fails to have the default member.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Class1:
///
Expand All @@ -33,7 +33,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Class1:
///
Expand Down
Expand Up @@ -22,7 +22,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// <why>
/// The VBA compiler does not check whether different object types are compatible. Instead there is a runtime error whenever the types are incompatible.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// IInterface:
///
Expand All @@ -49,7 +49,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// IInterface:
///
Expand Down
Expand Up @@ -25,7 +25,7 @@ namespace Rubberduck.Inspections.Concrete.UnreachableCaseInspection
/// <remarks>
/// Not all unreachable 'Case' blocks may be flagged, depending on expression complexity.
/// </remarks>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Private Sub Example(ByVal value As Long)
/// Select Case value
Expand All @@ -41,7 +41,7 @@ namespace Rubberduck.Inspections.Concrete.UnreachableCaseInspection
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
///
/// 'If the cumulative result of multiple 'Case' statements
Expand All @@ -65,7 +65,7 @@ namespace Rubberduck.Inspections.Concrete.UnreachableCaseInspection
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Enum ProductID
/// Widget = 1
Expand Down Expand Up @@ -93,7 +93,7 @@ namespace Rubberduck.Inspections.Concrete.UnreachableCaseInspection
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
///
/// 'The inspecion flags Range Clauses that are not of the required form:
Expand Down
Expand Up @@ -14,14 +14,14 @@ namespace Rubberduck.Inspections.Concrete
/// <why>
/// A dictionary access expression looks like a strongly typed call, but it actually is a stringly typed access to the parameterized default member of the object.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal wkb As Excel.Workbook)
/// wkb.Worksheets!MySheet.Range("A1").Value = 42
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Sub DoSomething(ByVal wkb As Excel.Workbook)
/// With wkb.Worksheets
Expand All @@ -30,21 +30,21 @@ namespace Rubberduck.Inspections.Concrete
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal wkb As Excel.Workbook)
/// wkb.Worksheets("MySheet").Range("A1").Value = 42
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal wkb As Excel.Workbook)
/// wkb.Worksheets.Item("MySheet").Range("A1").Value = 42
/// End Sub
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Sub DoSomething(ByVal wkb As Excel.Workbook)
/// With wkb.Worksheets
Expand Down
Expand Up @@ -15,14 +15,14 @@ namespace Rubberduck.Inspections.Concrete
/// A dictionary access expression looks like a strongly typed call, but it actually is a stringly typed access to the parameterized default member of the object.
/// This is especially misleading if the parameterized default member is not on the object itself and can only be reached by calling the parameterless default member first.
/// </why>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Function MyName(ByVal rst As ADODB.Recordset) As Variant
/// MyName = rst!Name.Value
/// End Function
/// ]]>
/// </example>
/// <example hasResult="true">
/// <example hasresult="true">
/// <![CDATA[
/// Public Function MyName(ByVal rst As ADODB.Recordset) As Variant
/// With rst
Expand All @@ -31,28 +31,28 @@ namespace Rubberduck.Inspections.Concrete
/// End Function
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Function MyName(ByVal rst As ADODB.Recordset) As Variant
/// MyName = rst.Fields.Item("Name").Value
/// End Function
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Function MyName(ByVal rst As ADODB.Recordset) As Variant
/// MyName = rst("Name").Value
/// End Function
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Function MyName(ByVal rst As ADODB.Recordset) As Variant
/// MyName = rst.Fields!Name.Value 'see "UseOfBangNotation" inspection
/// End Function
/// ]]>
/// </example>
/// <example hasResult="false">
/// <example hasresult="false">
/// <![CDATA[
/// Public Function MyName(ByVal rst As ADODB.Recordset) As Variant
/// With rst
Expand Down

0 comments on commit 16aeffa

Please sign in to comment.