Skip to content

can't get PHP_PHPCS working to auto fix minor things with phpcbf #1930

Answered by llaville
rzewus asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @rzewus

The reason is very simple : MegaLinter v5 or v6 (don't know which version you are running) embed only PHPCS binary and not PHPCBF binary.

It may be quite simple to add it into MegaLinter, because Phive (installation method for PHPCS; see https://github.com/oxsecurity/megalinter/blob/v6.11.1/megalinter/descriptors/php.megalinter-descriptor.yml#L61-L64) also provide a way to install PHPCBF (known in repositories list; see https://github.com/phar-io/phar.io/blob/master/data/repositories.xml#L66-L68

Differences between both of binary are explained (for those who don't know yet) on official PHPCS Wiki at https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rzewus
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants