mage-os / github-actions

Mage-OS GitHub Actions for the distribution repositories.
13 stars 12 forks source link

fix: coding-standard-baseline: Run baseline test on modified files only (fixes #227) #228

Closed rhoerr closed 4 months ago

rhoerr commented 4 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Fixes: #227

Current behavior is for the PHPCS baseline test to fail with 'no such file' when adding files, because the new file doesn't exist in the baseline files.

What is the new behavior?

This PR fixes it by adding a separate filter list of modified files only, and using that for the baseline test and follow up actions. The final PHPCS test is still run on all added and modified files. This is proper behavior, since the baseline is to exclude any preexisting standards errors, and new files would not have any preexisting standards errors -- only modified ones would. But all added or modified files must be checked for code standards.

Does this PR introduce a breaking change?

Other information