How to validate an extension against the Magento coding standards from the command line?

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: