Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save booskills/45e2c1996952e5954256503ed2d62e70 to your computer and use it in GitHub Desktop.
Save booskills/45e2c1996952e5954256503ed2d62e70 to your computer and use it in GitHub Desktop.

Wordpress Coding Standards:

Resources for PHP CodeSniffer:

Command Line:

  • for installing PHP CodeSniffer:

      git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs
    
  • Install WordPress Coding Standards:

    git clone https://github.com/WordPress/WordPress-Coding-Standards.git wpcs
    
  • Link Coding Standards to CodeSniffer:

    cd phpcs
    php bin/phpcs --config-set installed_paths ../wpcs/
    
  • To check if linking is successful:

    php bin/phpcs -i
    

Optionally add phpCodeSniffer to your "Path" Environment Variable

@rventura20
Copy link

The PHP_CodeSniffer's problem still showing up. Did you were able to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment