Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

dontforgit/dj-wp-phpcs-ruleset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DJ WP CMS Coding Standards


Requirements

WP Engine Coding Standards (WPECS) uses Composer to install these main dependencies:

If you're using Homebrew on Mac, you can install Composer with: brew install composer. Otherwise, follow the official installation instructions for Composer.

Installation

Global installation

  1. Clone the repository and install the dependencies:
git clone git@github.com:newscorp-ghfb/dj-wp-phpcs-ruleset.git
cd dj-wp-phpcs-ruleset
composer install
  1. Link your coding standards to your phpcs installation:
phpcs --config-set installed_paths /path/to/dj-wp-phpcs-ruleset

Install as a dependency

You can also install the coding standards as a dependency in your local project. Here's how

  1. Add the following repository to your composer.json
{
  "repositories": [
    {
      "type": "git",
      "url": "git@github.com:newscorp-ghfb/dj-wp-phpcs-ruleset.git"
    }
  ]
}
  1. Manually add the following to require-dev in composer.json
{
  "newscorp/dj-wp-phpcs-ruleset": "dev-master"
}
  1. Run composer install or composer update to ensure your project is configured.

  2. You can now use DJ-WordPress-CMS in any IDE that uses the local phpcs. If you already have a phpcs.xml in your project, simply add the following to it:

 <rule ref="DJ-WordPress-CMS"/>

Usage

Command line

Run the phpcs command line tool on a given file or directory, for example:

phpcs --standard=DJ-WordPress-CMS wp-load.php

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors