Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for CLI commands #345

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions docs/CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[Back to overview](./README.md)

# wp plugin check

Runs plugin check.

## OPTIONS
```
<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. Options are table, csv, and json. The default will be a table.
---
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
wp plugin check akismet --checks=late_escaping
wp plugin check akismet --format=json
```

# wp plugin list-checks

Lists the available checks for plugins.

## OPTIONS
```
[--fields=<fields>]
: Limit displayed results to a subset of fields provided.

[--format=<format>]
: Format to display the results. Options are table, csv, and json. The default will be a table.
---
default: table
options:
- table
- csv
- json
---

[--categories]
: Limit displayed results to include only specific categories.

[--include-experimental]
: Include experimental checks.
```
## EXAMPLES
```
wp plugin list-checks
wp plugin list-checks --format=json
```

# wp plugin list-check-categories

Lists the available check categories for plugins.

## OPTIONS
```
[--fields=<fields>]
: Limit displayed results to a subset of fields provided.

[--format=<format>]
: Format to display the results. Options are table, csv, and json. The default will be a table.
---
default: table
options:
- table
- csv
- json
---
```
## EXAMPLES
```
wp plugin list-check-categories
wp plugin list-check-categories --format=json
```
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)
* [CLI Commands](CLI.md)