Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #487 Add phpcbf to run:checker Command #488

Closed
wants to merge 1 commit into from
Closed

Fix #487 Add phpcbf to run:checker Command #488

wants to merge 1 commit into from

Conversation

alexandreelise
Copy link

Pull request related to the suggestion.

Pull Request for Issue #487 .

Summary of Changes

Change the way the tools are displayed in command line:

  • Add $allowedTools array to be able to easily add or remove tools and display the list of tools added accordingly using php built-in implode function
  • Add $allowedToolsString Which is the string representation of the allowed tools array helping us not having to manually change the tools to display each time
  • Add sprintf to display the list of tools which I found more "clean" than a concatenation but that's suggestive. Open for your feedback.
  • Add phpcbf --extensions=php because it seems that by default phpcbf tries to fix js files too which is not what we want.

Testing Instructions

Go to the root of the project.
type vendor/bin/robo run:checker phpcbf

Expected result

If there are coding standard errors most of them if not all should be automatically fixed

Actual result

the console shows a message:
The tool you required is not known. Valid tools are phpmd, phpcs, phpcpd
Since phpcbf is not added yet in RoboFile.php

Documentation Changes Required

Probably. Just adding the fact that phpcbf is available. Usually it's installed at the same time and the same folder than phpcs. But that's to be verified.

Thanks for your feedback.

Pull request related to the suggestion.
@alexandreelise alexandreelise deleted the alexandreelise-patch-1 branch April 21, 2022 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant