Maybe restart memcached if dev environment slow

Sometimes I notice that my dev environment is starts responding slowly, like 10× slower. When you notice this, try firing up vagrant ssh and try something like wp cache set food bard. If you get an error message about it not being able to be set, Memcached may be on the rejecting cache additions (for … Continue reading Maybe restart memcached if dev environment slow

Linting JavaScript with JSCS

Our wp-dev-lib provides a common set of configs and scripts for facilitating theme and plugin development, including a pre-commit hook, and integrations for Travis CI, JSHint, PHP_CodeSniffer, and more. As of today, the “more” now includes a new JavaScript linter called JSCS. This tool augments the basic linting that JSHint does, but JSCS goes much … Continue reading Linting JavaScript with JSCS

Installing PHP_CodeSniffer

You can install it on your host machine and then install the WordPress Coding Standards. See the instructions here. This will ensure that it will be run as part of the pre-commit hook. In short: And then add this …phpcs/scripts directory to your PATH environment variable. You should then see WordPress-VIP listed when you run … Continue reading Installing PHP_CodeSniffer