composer create-project --repository=https://repo.magento.com magento/marketplace-eqp magento-coding-standard
cd magento-coding-standard
vendor/bin/phpcs <path to extension> --standard=MEQP2 --severity=10
See also:
- Will there be any code check for Magento 2.0 extensions before approval?
- How to validate a Magento 2 extension?
- Is there a PHPCS ruleset available for validating Magento 2.0 extensions with the same checks applied when extension are submitted to the Magento 2.0 marketplace?
- Where do I find the Magento Marketplace coding standards that you will be comparing me to?