S1659 — Multiple variables should not be declared on the same line

Language
VB.NET
Type
Code smell
Severity
Minor
Tags
convention

Why is this an issue?

Declaring multiple variable on one line is difficult to read.

Noncompliant code example


Module Module1
  Public Const AAA As Integer = 5, BBB = 42, CCC As String = "foo"  ' Noncompliant
End Module

Compliant solution


Module Module1
  Public Const AAA As Integer = 5
  Public Const BBB = 42
  Public Const CCC as String = "foo"
End Module

↑ Back to top