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

Pull Request for Issue #487 Add phpcbf tool to automatically fix errors found by phpcs tool in run:checker Command #489

Closed
wants to merge 3 commits 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.

Alex Api added 3 commits April 20, 2022 16:49
Pull request related to the suggestion.
Fix #490  drone ci constantly breaking due to staging branch that doesn't exists anymore in joomla/joomla-cms repo.
This pull request was closed.
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