checkstyle
checkstyle copied to clipboard
Issue #16981: `Migrate to Java 21 - [noTrailingWhitespace] not aware of string block """`
Issue #16981: Migrate to Java 21 - [noTrailingWhitespace] not aware of string block """
- #16981
- https://github.com/checkstyle/checkstyle/blob/35367fcf1374443520909aeacb3026ba6d08e994/src/test/java/com/puppycrawl/tools/checkstyle/TreeWalkerTest.java#L415
@Test
public void testRequiredTokenIsEmptyIntArray() throws Exception {
final File file = new File(temporaryFolder, "file.java");
try (Writer writer = Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8)) {
final String configComment = """
/*
com.puppycrawl.tools.checkstyle.TreeWalkerTest\
$RequiredTokenIsEmptyIntArray
*/
""";
writer.write(configComment);
}
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
verifyWithInlineConfigParserTwice(file.getPath(), expected);
}
#16981
I have read check documentation: https://checkstyle.org/checks/xxxxxx/nameofaffectedcheck.html I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
/var/tmp $ javac YOUR_FILE.java
#[[MAKE SURE THERE IS SUCCESSFUL COMPILATION]]
/var/tmp $ cat config.xml
#[[PLACE YOUR OUTPUT HERE]]
/var/tmp $ cat YOUR_FILE.java
#[[PLACE YOU OUTPUT HERE]]
/var/tmp $ RUN_LOCALE="-Duser.language=en -Duser.country=US"
/var/tmp $ java $RUN_LOCALE -jar checkstyle-X.XX-all.jar -c config.xml YOUR_FILE.java
#[[PLACE YOUR OUTPUT HERE]]
For Windows users, please use type instead of cat and run
set RUN_LOCALE="-Duser.language=en -Duser.country=US"
java %RUN_LOCALE% -jar checkstyle-X.XX-all.jar -c config.xml YOUR_FILE.java
in place of the last 2 commands above.
Describe what you expect in detail.
Still not clear ??? see example - https://checkstyle.org/report_issue.html#How_to_report_a_bug.3F
ATTENTION: FAILURE TO FOLLOW THE ABOVE TEMPLATE WILL RESULT IN THE ISSUE BEING CLOSED.
Please follow the bug report template, in the issue description, as is always requested
Hello 👋!
It looks like this issue has been inactive for a while. Could you provide the requested feedback? If no response is received in the next 60 days, we will close this issue.
🚧 This Github Action is under testing, please let us know if it is misbehaving. 🚧
Hello 👋!
Since we haven't received any feedback, we are closing this issue. If you have any questions or need further assistance, please feel free to reopen this issue.
🚧 This Github Action is under testing, please let us know if it is misbehaving. 🚧