Unable to install magento-ecg/coding-standard
to PHP_CodeSniffer
:
Tried below command after cloning PHP_CodeSniffer from github:
phpcs --config-set installed_paths ./vendor/magento-ecg/coding-standard
But phpcs -i is showing only following standards.
The installed coding standards are PSR1, MySource, Zend, Squiz, PHPCS,
PEAR and PSR2
Best Answer
facing the same problem solved it by
git clone https://github.com/magento-ecg/coding-standard
then added the complete path where you clone it
phpcs --config-set installed_paths /home/your_user/vendor/magento-ecg/coding-standard
End reuslt phpcs -i
The installed coding standards are PSR1, PSR2, PEAR, MySource, PHPCS, Zend, Squiz, Ecg and EcgM2