#117 Detect Multiple Variable Declarations per line

release_3.4
closed
Check (274)
5
2012-10-10
2002-11-16
Anonymous
No

My team has a coding standard that stating "no more
than one variable shall be declared per line" For
example, the following would violate this error:

int x = 0; int y=0;

We would like to see the standard enforced by
CheckStyle (configurable, of course).

Thanks!

Discussion

  • Lars Kühne
    Lars Kühne
    2002-11-16

    Logged In: YES
    user_id=401384

    This is not a bug and should be closed here to keep our
    database clean.

    I think the request is a special case of the "check
    indentation" RFE. If we had that, it would report that the
    declaration of y should start at the same column as the
    declaration of x.

     
  • Logged In: YES
    user_id=746148

    Committed to CVS for 3.4
    module MultipleVariableDeclarations