checkstyle / test-configs

Stores configs for regression-report.yml (checkstyle repository) and diff.groovy (contribution repository)
https://github.com/checkstyle/checkstyle/tree/master/.github/workflows#regression-report-workflow---regression-reportyml
GNU Lesser General Public License v2.1
2 stars 3 forks source link

Support of config bundles with extra configuration files #214

Open romani opened 1 month ago

romani commented 1 month ago

https://github.com/checkstyle/test-configs/tree/main/RegexpHeader/Example2 requires extra config file <property name="headerFile" value="config/java.header"/> (folder is not required we can update example to be just java.header) https://github.com/checkstyle/test-configs/blob/670089984c086b21f75e11dfd493ac8205ad2404/RegexpHeader/Example2/config.xml#L20

Even we add it https://github.com/checkstyle/test-configs/commit/24f8a55bc31db0d761d76facee4b52979f08f676 like this. it will not be downloaded, as we download only 2 files from test-configs repo. and inside regression-report.yml of checkstyle we copy them to required folder for report generation. https://github.com/checkstyle/checkstyle/blob/5eca53ce31f48b61fae0612a2092815009772b48/.github/workflows/regression-report.yml#L388-L394

We need to find a way to download all required files/folders and copy them to execution folder by regression-report.yml .

This feature will help a lot of modules, as several of them have ability to keep configs in separate files.

romani commented 1 month ago

Proporsed solution: we can make extra file in Example folder of this repo: extra-config-files.txt content of this file will be just list of files in this folder for other to download. So regression-report.yml workflow will download list-of-projects.yml and config.xml. Download extra-config-files.txt, quickly split all lines in it and download all that referenced in it. regression-report.yml will cache all downloaded files, even extra-config-files.txt. regression-report.yml will be smart during copy file from cache to execution folder to be aware of extra-config-files.txt and copy few more files.

ATTENTION: To simplify first version, lets presume there is no folders of configs, all extra files should be in ExampleX folder.