Add multiple untyped declaration example for rubberduckvba.com
Justification It's much more common to see the code below:
Public Sub Foo()
Dim i, j, k As Long
'code
End Sub
than it is to see:
Public Sub Foo()
Dim i As Long, j As Long, k As Long
'code
End Sub
This is a very common pitfall. Example code in a MultipleDeclarations inspection that looks more like what new programmers would write can help those seeing it understand the inspection.
Description Add an example with multiple declarations on a single line without typing.
This example should also be added to VariableTypeNotDeclaredInspection.
Since the website content is automatically generated from the xml-doc comments, this example, together with the corresponding examples not triggering the inspection, should be added to the xml-docs.
IMO the existing examples should remain, and an additional two (?) examples would show the "more common" case with implicit variants (perhaps reorder the examples to put the new ones first); the reason this particular example is specifying explicit data types is because we want the emphasis to be on what triggers this inspection - implicit variant declarations being flagged by a separate inspection with its own examples.
Hey I would like to contribute, but I'm not entirely sure what the proposal is. Can I get some more information?
@pedro-camargo11 basically the suggestion is to add the first codeblock as an additional example to the following XML-documentation:
https://github.com/rubberduck-vba/Rubberduck/blob/b53f353bdba34ebc4e0baca2a7b39254e29da262/Rubberduck.CodeAnalysis/Inspections/Concrete/MultipleDeclarationsInspection.cs#L11-L31
The syntax for the XML should be fairly obvious. That XML is automatically used to generate the content on the website that is served as user-documentation.
Hi @Vogel612 Actually I´ve Done this task. Can u review the fix?