#162 make ParenPad also check method definitions

release_3.0
closed
nobody
Check (274)
5
2012-10-10
2003-05-07
No

also allow the tokens
METHOD_DEF, CTOR_DEF
in the "tokens" property for ParenPad
currently a subset of tokens CTOR_CALL, LPAREN,
METHOD_CALL, RPAREN, SUPER_CTOR_CALL,
TYPECAST
is allowed

Discussion

  • Oleg Sukhodolsky

    Logged In: YES
    user_id=746148

    As far as I unerstand the request submitter wants to be able
    to check parenthesis padding for method and ctor definition.
    In fact, current implementation of the ParenPad check does
    this. It is because in method/ctor definition we has
    standalone RPAREN and LPAREN nodes.
    Thus I close this rfe.

     
  • Jeroen M. Mostert

    Logged In: YES
    user_id=192367

    Ok, It looks like this WAS a bug in 3.0 but is it solved in 3.1
    I saw that for 3.0 the parenpadding for the method definitions
    was not flagged as an error. From the doc I assumed that it
    was not supported . It was not described that the LPAREN
    and RPAREN nodes were used by the method definitions

    [c:\temp]java -classpath u:/devtools/java/checkstyle-
    3.1/checkstyle-all-3.1.jar
    com.puppycrawl.tools.checkstyle.Main -c
    c:/work/servertest/share/test/btools/che
    ckstyle.xml CheckStyleTest.java
    Starting audit...
    CheckStyleTest.java:4:25: '(' is followed by whitespace.
    CheckStyleTest.java:4:37: ')' is preceeded with whitespace.
    CheckStyleTest.java:8:19: '(' is followed by whitespace.
    CheckStyleTest.java:8:31: ')' is preceeded with whitespace.
    Audit done.

    [c:\temp]java -classpath u:/devtools/java/checkstyle-
    3.0/checkstyle-all-3.0.jar
    com.puppycrawl.tools.checkstyle.Main -c
    c:/work/servertest/share/test/btools/che
    ckstyle.xml CheckStyleTest.java
    Starting audit...
    CheckStyleTest.java:4:25: '(' is followed by whitespace.
    CheckStyleTest.java:4:37: ')' is preceeded with whitespace.
    Audit done.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks