isotopsweden/isotopcs

Isotop WordPress Coding Standard

Installs: 8 386

Dependents: 6

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 3

Open Issues: 0

Type:phpcodesniffer-standard

v0.14.0 2020-05-20 06:13 UTC

This package is auto-updated.

Last update: 2022-07-29 01:34:05 UTC


README

The coding standard used for WordPress sites.

Installation

Standalone

Standards are provided as a Composer package and can be installed with:

composer create-project isotopsweden/isotopcs:dev-master

Composer will automatically install dependencies, register standards paths, and set default PHP Code Sniffer standard to Isotop.

As dependency

You should update minimum-stability to dev and set prefer-stable to true.

{
  "minimum-stability": "dev",
  "prefer-stable": true
}

Then you can install isotopcs as a dependency.

composer require isotopsweden/isotopcs:dev-master --dev

Command line

vendor/bin/phpcs --extensions=php /path/to/folder/

Editors

Atom

Use linter-phpcs.

Sublime

{
  "phpcs_executable_path": "/path/to/isotopcs/vendor/bin/phpcs",
  "phpcs_additional_args": {
    "--standard": "Isotop"
  }
}

PhpStorm

Refer to Using PHP Code Sniffer Tool in PhpStorm documentation.

After installation Isotop standard will be available as a choice in PHP Code Sniffer Validation inspection.