checkstyle / checkstyle/contribution

Remove exclude list from openjdk projects

Open
#881 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
57
Forks
168
Avg merge
1d 11h
Merged PRs (30d)
15

Description

detected at https://github.com/checkstyle/contribution/pull/878#discussion_r1678624190

> 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](https://github.com/checkstyle/checkstyle/blob/f5c492af3fde6bd417053e2f5a0d187767b3551b/config/projects-to-test/openjdk21-excluded.files#L1).

script source code:

```bash
#!/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 "\n \n" >> config/projects-to-test/openjdk20-excluded.files
rm -rf .ci-temp/contribution
git add .
git commit -m "added another file filter"
done
```

The 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](https://github.com/checkstyle/checkstyle/blob/master/config/projects-to-test/openjdk21-excluded.files) should be skipped automatically due to https://github.com/checkstyle/contribution/blob/45007b979ce86ccf80c3a6cef08e5945f6f3685f/checkstyle-tester/my_check.xml#L22-L23

Given the above analysis, I see no value in having the excludes in the .properties file. I think we can remove them.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.