Skip to content

Commit

Permalink
Add documentation for plugin check command
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Dec 18, 2023
1 parent 0101c91 commit e9ba092
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* [Technical Overview](technical-overview.md)
* [Creating a Static Check](creating-a-static-check.md)
* [Creating a Runtime Check](creating-a-runtime-check.md)
* [Plugin Check CLI Command](wp-plugin-check.md)
34 changes: 34 additions & 0 deletions docs/wp-plugin-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[Back to overview](./README.md)

# wp plugin check

Runs plugin check.

## Options

| Argument | Description |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **\<plugin\>** | The plugin to check. Plugin name. |
| **[--checks=\<checks\>]** | Only runs checks provided as an argument in comma-separated values, e.g. `i18n_usage,late_escaping`. Otherwise runs all checks. |
| **[--exclude-checks=\<checks\>]** | Exclude checks provided as an argument in comma-separated values, e.g. `i18n_usage,late_escaping`. Applies after evaluating `--checks`. |
| **[--format=\<format\>]** | Format to display the results. Default: `table`. Options: `table`, `csv`, `json` |
| **[--categories]** | Limit displayed results to include only specific categories Checks. |
| **[--fields=\<fields\>]** | Limit displayed results to a subset of fields provided. |
| **[--ignore-warnings]** | Limit displayed results to exclude warnings. |
| **[--ignore-errors]** | Limit displayed results to exclude errors. |
| **[--include-experimental]** | Include experimental checks. |
| **[--exclude-directories=\<directories\>]** | Additional directories to exclude from checks. By default, `.git`, `vendor` and `node_modules` directories are excluded. |

## Examples

`wp plugin check akismet`

Runs plugin checks with default argument values.

`wp plugin check akismet --checks=late_escaping`

Runs plugin checks for `late_escaping` only.

`wp plugin check akismet --format=json`

Runs plugin checks and generates report in `JSON` format.

0 comments on commit e9ba092

Please sign in to comment.