New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in AST tructure for block-comments #3431

Closed
romani opened this Issue Sep 6, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@romani
Member

romani commented Sep 6, 2016

$ cat TableName.java 
/**
* some text
*/
public class TableName {

} 
$ java -jar checkstyle-7.2-SNAPSHOT-all.jar -J TableName.java 
CLASS_DEF -> CLASS_DEF [4:0]
|--MODIFIERS -> MODIFIERS [4:0]
|   |--JAVADOC -> \n* some text\n<EOF> [1:0]
|   |   |--NEWLINE -> \n [1:0]
|   |   |--LEADING_ASTERISK -> * [2:0]
|   |   |--TEXT ->  some text [2:1]
|   |   |   |--WS ->   [2:1]
|   |   |   |--CHAR -> s [2:2]
|   |   |   |--CHAR -> o [2:3]
|   |   |   |--CHAR -> m [2:4]
|   |   |   |--CHAR -> e [2:5]
|   |   |   |--WS ->   [2:6]
|   |   |   |--CHAR -> t [2:7]
|   |   |   |--CHAR -> e [2:8]
|   |   |   |--CHAR -> x [2:9]
|   |   |   `--CHAR -> t [2:10]
|   |   |--NEWLINE -> \n [2:11]
|   |   `--EOF -> <EOF> [3:0]
|   `--LITERAL_PUBLIC -> public [4:0]
|--LITERAL_CLASS -> class [4:7]
|--IDENT -> TableName [4:13]
`--OBJBLOCK -> OBJBLOCK [4:23]
    |--LCURLY -> { [4:23]
    `--RCURLY -> } [6:0]
$ java -jar checkstyle-7.2-SNAPSHOT-all.jar -T TableName.java 
CLASS_DEF -> CLASS_DEF [4:0]
|--MODIFIERS -> MODIFIERS [4:0]
|   |--BLOCK_COMMENT_BEGIN -> /* [1:0]
|   |   |--COMMENT_CONTENT -> *\n* some text\n [1:2]
|   |   `--BLOCK_COMMENT_END -> */ [3:0]
|   `--LITERAL_PUBLIC -> public [4:0]
|--LITERAL_CLASS -> class [4:7]
|--IDENT -> TableName [4:13]
`--OBJBLOCK -> OBJBLOCK [4:23]
    |--LCURLY -> { [4:23]
    `--RCURLY -> } [6:0]

Attention to:

|--MODIFIERS -> MODIFIERS [4:0]
|   |--BLOCK_COMMENT_BEGIN -> /* [1:0]

vs

|--MODIFIERS -> MODIFIERS [4:0]
|   |--JAVADOC -> \n* some text\n<EOF> [1:0]

Expected:

    |--BLOCK_COMMENT_BEGIN -> /* [1:0]
    |   |--JAVADOC -> \n* some text\n<EOF> [1:0]
    |   |   |--NEWLINE -> \n [1:0]
    |   |   |--LEADING_ASTERISK -> * [2:0]
    |   |   |--TEXT ->  some text [2:1]
    |   |   |   |--WS ->   [2:1]
    |   |   |   |--CHAR -> s [2:2]
    |   |   |   |--CHAR -> o [2:3]
    |   |   |   |--CHAR -> m [2:4]
    |   |   |   |--CHAR -> e [2:5]
    |   |   |   |--WS ->   [2:6]
    |   |   |   |--CHAR -> t [2:7]
    |   |   |   |--CHAR -> e [2:8]
    |   |   |   |--CHAR -> x [2:9]
    |   |   |   `--CHAR -> t [2:10]
    |   |   |--NEWLINE -> \n [2:11]
    |   |   `--EOF -> <EOF> [3:0]
    |   `--BLOCK_COMMENT_END -> */ [3:0]

kazachka added a commit to kazachka/checkstyle that referenced this issue Oct 3, 2016

kazachka added a commit to kazachka/checkstyle that referenced this issue Oct 14, 2016

kazachka added a commit to kazachka/checkstyle that referenced this issue Oct 14, 2016

kazachka added a commit to kazachka/checkstyle that referenced this issue Oct 16, 2016

romani added a commit that referenced this issue Oct 22, 2016

kazachka added a commit to kazachka/checkstyle that referenced this issue Oct 24, 2016

kazachka added a commit to kazachka/checkstyle that referenced this issue Oct 27, 2016

romani added a commit that referenced this issue Oct 29, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 29, 2016

Member

@kazachka , there is still problem in GUI part.
screenshot from 2016-10-29 13-56-57

please provide the fix and update http://checkstyle.sourceforge.net/writingjavadocchecks.html#Checkstyle_SDK_GUI with new picture , to build web site you can do "mvn clean site -Dlinkcheck.skip=true".

Member

romani commented Oct 29, 2016

@kazachka , there is still problem in GUI part.
screenshot from 2016-10-29 13-56-57

please provide the fix and update http://checkstyle.sourceforge.net/writingjavadocchecks.html#Checkstyle_SDK_GUI with new picture , to build web site you can do "mvn clean site -Dlinkcheck.skip=true".

agcuda added a commit to agcuda/checkstyle that referenced this issue Oct 30, 2016

agcuda added a commit to agcuda/checkstyle that referenced this issue Oct 30, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 30, 2016

Member

CLI side is fixed in 7.2 release.
issues is closed as UI part will be done at #3445 .

Member

romani commented Oct 30, 2016

CLI side is fixed in 7.2 release.
issues is closed as UI part will be done at #3445 .

@romani romani closed this Oct 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment