-
Notifications
You must be signed in to change notification settings - Fork 144
Description
detected at #878 (comment)
openjdk 21 requires lots of excludes, list here should be consistent with file filters at https://github.com/checkstyle/checkstyle/blob/master/config/projects-to-test/openjdk21-excluded.files
This list is generated by bash/python from here.
script source code:
#!/bin/bash
OUTPUT="test"
while [ -n "$OUTPUT" ]; do
OUTPUT=$(.ci/no-exception-test.sh openjdk20-with-checks-nonjavadoc-error | grep "Caused by: " | grep -oh '/.*.java' | sed 's./.[\\\\\\/].g' | uniq)
echo "$OUTPUT"
echo -e "<module name=\"BeforeExecutionExclusionFileFilter\">\n <property name=\"fileNamePattern\" value=\"$OUTPUT\$\"/>\n</module>" >> config/projects-to-test/openjdk20-excluded.files
rm -rf .ci-temp/contribution
git add .
git commit -m "added another file filter"
doneThe script runs .ci/no-exception-test.sh and pipes the output to grep "Caused by: " to filter lines containing "Caused by: ". So,
This script makes a list of all files not parsable by checkstyle and causes an exception during the run then we add those files to the exclude list. And this is basically what treeWalker is capable of, we have a property that skips files on Java parse exception. internally all the files from openjdk21-excluded.files should be skipped automatically due to
contribution/checkstyle-tester/my_check.xml
Lines 22 to 23 in 45007b9
| <property name="skipFileOnJavaParseException" value="true"/> | |
| <property name="javaParseExceptionSeverity" value="ignore"/> |
Given the above analysis, I see no value in having the excludes in the .properties file. I think we can remove them.