Skip to content
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

Issue #9463: update example of AST for TokenTypes.LITERAL_BOOLEAN #10983

Closed
wants to merge 5 commits into from
Closed

Issue #9463: update example of AST for TokenTypes.LITERAL_BOOLEAN #10983

wants to merge 5 commits into from

Conversation

Venkatesh-24
Copy link
Contributor

Closes: #9463

Screenshot from 2021-11-15 12-33-37

**Test.java**
public class Test { 
  public boolean flag;
}

**AST**
java -jar checkstyle-9.0.1-all.jar -t Test.java
`--CLASS_DEF -> CLASS_DEF [4:0]
    |--MODIFIERS -> MODIFIERS [4:0]
    |   `--LITERAL_PUBLIC -> public [4:0]
    |--LITERAL_CLASS -> class [4:7]
    |--IDENT -> Test [4:13]
    `--OBJBLOCK -> OBJBLOCK [4:18]
        |--LCURLY -> { [4:18]
        |--VARIABLE_DEF -> VARIABLE_DEF [5:2]
        |   |--MODIFIERS -> MODIFIERS [5:2]
        |   |   `--LITERAL_PUBLIC -> public [5:2]
        |   |--TYPE -> TYPE [5:9]
        |   |   `--LITERAL_BOOLEAN -> boolean [5:9]
        |   |--IDENT -> flag [5:17]
        |   `--SEMI -> ; [5:21]
        `--RCURLY -> } [6:0]

# Printing the code that we care
java -jar checkstyle-9.0.1-all.jar -t Test.java | grep 5:
|--VARIABLE_DEF -> VARIABLE_DEF [5:2]
|   |--MODIFIERS -> MODIFIERS [5:2]
|   |   `--LITERAL_PUBLIC -> public [5:2]
|   |--TYPE -> TYPE [5:9]
|   |   `--LITERAL_BOOLEAN -> boolean [5:9]
|   |--IDENT -> flag [5:17]
|   `--SEMI -> ; [5:21]

Expected update for javadoc

VARIABLE_DEF -> VARIABLE_DEF
  |--MODIFIERS -> MODIFIERS
  |   `--LITERAL_PUBLIC -> public
  |--TYPE -> TYPE
  |   `--LITERAL_BOOLEAN -> boolean
  |--IDENT -> flag
  `--SEMI -> ;

@Venkatesh-24
Copy link
Contributor Author

please review it @romani

@Venkatesh-24
Copy link
Contributor Author

@romani can you please point me to some resource which tells what caused this error openjdk 11 verify is failing do I need to use open jdk instead of oracle jdk

@romani
Copy link
Member

romani commented Nov 27, 2021

From my link above:

[INFO]      [echo] Checkstyle started (checkstyle_checks.xml): 26/11/2021 02:41:45 PM
[INFO] [checkstyle] Running Checkstyle  on 1444 files
[ERROR] [checkstyle] [ERROR] /home/vsts/work/1/s/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java:1538: Trailing whitespace is not allowed [noTrailingWhitespace]
[ERROR] [checkstyle] [ERROR] /home/vsts/work/1/s/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java:1553: Trailing whitespace is not allowed [noTrailingWhitespace]
[ERROR] [checkstyle] [ERROR] /home/vsts/work/1/s/src/main/java/com/puppycrawl/tools/checkstyle/api/TokenTypes.java:1554: Javadoc tag '@see' should be preceded with an empty line. [RequireEmptyLineBeforeBlockTagGroup]
[INFO]

@Venkatesh-24
Copy link
Contributor Author

Thanks @romani I will do it

@Venkatesh-24
Copy link
Contributor Author

After I made the changes I was getting merge conflicts after I resolve those conflicts I am not able to squash the commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update example of AST for TokenTypes.LITERAL_BOOLEAN
2 participants