TBH, as long as IllegalAnnotationInspection correctly reports all misplaced and/or misused annotations, I'm fine with whatever scoping rules we come up with
Right but at least we get consistent behavior, even if we don't have a separator line between the declares, and it does not contradict what VBE does show with separator, I'm happy.
what I was commenting earlier about the logical line and end of statement ---
Case #1:
Public Sub foo()
End Sub
-------
'
'
Public Sub bar()
End Sub
Case #2:
Public Sub foo()
End Sub
'
--------
'
Public Sub bar()
End Sub
Case #3:
Public Sub foo()
End Sub
------
'
'
Public Sub bar()
End Sub
Option Explicit: Type Foo: Bar As String: Baz As String: End Type: Enum Alpha: A: B: C: D: End Enum: Enum Nums: One: Two: End Enum: Dim ws As Worksheet: Const CONSTANT As String = "Foo"
@M.Doerner I actually agree. I suppose if there's an inspection as I suggested to call out weird-placed annotations, that might encourage them to keep the code consistently formatted.
i just don't like it contradicting what the procedure separator line suggests.
BINGO!
Earned all hats in the same row, column, or diagonal.
Hats are arranged in a grid with 5 columns (B-I-N-G-O). Clear a row, column or diagonal and say "BINGO!". Only awarded once per user.
I realize this one stands no chance against Darth Vador, Gandalf, or even a LEGO brick. But loo...
Would it be OK to put the annotation line on the annotation itself?
I mean the line it would apply to.
And for module annotations the line the line that determines whether it is above the first member.
I could determine it from the context in the processing, but putting it an the annotation would probably cause the least pain trying to get decent performance.