Skip to content

Don't run PHP style fixer before running test suite#1316

Merged
williamjallen merged 2 commits into
Kitware:masterfrom
williamjallen:phpcs-no-fix-before-test
Mar 5, 2023
Merged

Don't run PHP style fixer before running test suite#1316
williamjallen merged 2 commits into
Kitware:masterfrom
williamjallen:phpcs-no-fix-before-test

Conversation

@williamjallen
Copy link
Copy Markdown
Collaborator

We currently run the PHP style fixer during the CMake configure step, which fixes most of the code before we re-run the fixer again during the testing process to catch style issues. This means that there are potentially style issues in the codebase which are not caught by our test suite because they are automatically fixed before the test suite is run.

This PR removes the "fix" step from the CMake configure process. To automatically fix changes locally, it is now necessary to run vendor/bin/php-cs-fixer fix manually.

In the future, we may want to investigate using PHP_CodeSniffer instead of PHP-CS-Fixer since the former provides more helpful errors.

I believe that this fixes #1309.

@williamjallen williamjallen merged commit 6aec289 into Kitware:master Mar 5, 2023
@williamjallen williamjallen deleted the phpcs-no-fix-before-test branch March 5, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate PHP Style Check in CI

2 participants