checkstyle / checkstyle/contribution

diff.groovy: allow exclude list to come from multi-line file

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

Description

Identified at https://github.com/checkstyle/contribution/pull/527#pullrequestreview-836542670 ,

We should not be maintaining a 13k character singleline, especially when our own repo is trying to cut down lines to 100 characters or less. This is not easily maintainable. There is also the extra maintainability that we need a separate file with a similar list in another type of file format. We clearly need a better way.

Our `projects*.properties` files format needs to be changed to allow this possible. The current format is:
`REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]`

~We should update it to allow an exclude file, relative to the property file's current location.
Example: `REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]|[EXCLUDE FILE]`.
Exclude file should be completely optional. It doesn't need the final `|` and even if it is provided, it should allowed to be nothing meaning there is no excludes in a file to use.
As long as there is no added complexity, both excludes should be additional. Meaning if I exclude folders and provide an exclude file, then they should act like they are all combined into 1 big list.~
We should update it to allow an exclude file or a list of folders.
`EXCLUDE FOLDERS` should identify as a file if it starts with `file://$PWD`. It will take this file as in the current working directory. Anything that is not identified as this file should fall back on the old behavior of list of folders.

The format of exclude file should be similar to exclude folders, with the only difference being that multiple lines is encouraged. Each new line should act like an `OR` or similar to `,` in the exclude folders.
Comments (in the form of `#`) should be allowed. Blank lines should be allowed too.

`diff.groovy` needs to be updated to process the new changes in the property file.

With the new functionality, the following 2 things also need to occur:
* The changes in https://github.com/checkstyle/contribution/pull/527#pullrequestreview-836542670 have to be updated for this issue's new functionality.
* We must find a way to remove https://github.com/checkstyle/checkstyle/blob/master/.ci/openjdk16-excluded.files and have it all embedded into the above item so we are just managing 1 file.
* * If the above functionality discussed in this issue needs to change to make this item happen, then all the better as it is more beneficial to have 1 list instead of managing changes between 2 similar files.

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.