2017 © Pedro Peláez
 

wp-cli-package wp-cli-lint

WP-CLI command for linting your code

image

frozzare/wp-cli-lint

WP-CLI command for linting your code

  • Tuesday, October 17, 2017
  • by fredrikforsmo
  • Repository
  • 2 Watchers
  • 14 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

wp-cli-lint

Build Status No Maintenance Intended, (*1)

Lint your WordPress code using WP CLI., (*2)

Installation

If you're using WP-CLI v0.23.0 or later, you can install this package with:, (*3)

wp package install frozzare/wp-cli-lint

Alternatively, you can require this file in your global config file or add it to your project., (*4)

Example of ~/.wp-cli/config.yml:, (*5)

require:
  - /path/to/wp-cli-lint/src/class-lint-command.php

For other methods, please refer to WP-CLI's Community Packages wiki., (*6)

Usage

Running the command without any options will lint your code in the current directory with WordPress-Core standard. The lint command will try to find a ruleset in the same directory you are linting or in the ABSPATH or in Bedrocks base directory., (*7)

Example:, (*8)

wp lint
wp lint path/to/code

Config

You can add the path to the phpcs bin to use in WP CLI's config file and/or the standard that should be used., (*9)

Example of ~/.wp-cli/config.yml:, (*10)

lint:
  phpcs: /path/to/phpcs
  standard: WordPress-Extra

Options

[<directory>]

The directory to lint code in. Default: 'Current directory', (*11)

[--standard=<standard>]

The standard to use when running phpcs. Default: 'WordPress-Core', (*12)

Examples

wp lint
wp lint path/to/code --standard=WordPress-Extra

The Versions

17/10 2017

dev-master

9999999-dev https://github.com/frozzare/wp-cli-lint

WP-CLI command for linting your code

  Sources   Download

MIT

The Requires

  • php >=5.4

 

wordpress wp-cli

17/10 2017

dev-frozzare-patch-1

dev-frozzare-patch-1 https://github.com/frozzare/wp-cli-lint

WP-CLI command for linting your code

  Sources   Download

MIT

The Requires

  • php >=5.4

 

wordpress wp-cli