frozzare/wp-cli-lint 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

frozzare/wp-cli-lint

Composer 安装命令:

composer require frozzare/wp-cli-lint

包简介

WP-CLI command for linting your code

README 文档

README

Build Status No Maintenance Intended

Lint your WordPress code using WP CLI.

Installation

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

wp package install frozzare/wp-cli-lint

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

Example of ~/.wp-cli/config.yml:

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

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

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.

Example:

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.

Example of ~/.wp-cli/config.yml:

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

Options

[<directory>]

The directory to lint code in. Default: 'Current directory'

[--standard=<standard>]

The standard to use when running phpcs. Default: 'WordPress-Core'

Examples

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

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-03