Open tats-u opened 7 months ago
Would love to see that, it would make code so much more consistent but I would also like to see the opposite for code bases that prefer the more explicit style and an EditorConfig setting for preference.On Mar 3, 2024, at 4:50 PM, Tatsunori Uchino @.***> wrote:
Brief description: In VB.NET, the setter definition in a property declaration often specifies (value As String) unnecessarily, even though value is the default name for the setter parameter. While some coding rules may enforce this specification, it can lead to confusion among new developers and clutter the code unnecessarily. Languages applicable: VB Only Code example that the analyzer should report: Private _name As String
Public Property Name() As String
Get
Return _name
End Get
Set (value As String) ' Variable name specification as value
is redundant.
' ~~~~~ (lighten the colors)
_name = value
NotifyOnSomewhereElse()
End Set
End Property
Additional information:
Documentation requirements:
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
but I would also like to see the opposite for code bases that prefer the more explicit style and an EditorConfig setting for preference.
Fine. A new EditorConfig preference is mandatory.
As C# is forced to use value
, I think removal should be the default behavior.
Brief description:
In VB.NET, the setter definition in a property declaration often specifies
(value As String)
unnecessarily, even thoughvalue
is the default name for the setter parameter. While some coding rules may enforce this specification, it can lead to confusion among new developers and clutter the code unnecessarily.Languages applicable:
VB Only
Code example that the analyzer should report:
Additional information:
Documentation requirements: