WordPress / WordPress/plugin-check
Display warning if non existent parameters are passed in `--checks` and `--categories`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 362
- Forks
- 126
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 22
Description
Proper warning message should be displayed rather than fatal error when non existent check is passed to --checks
wp plugin check hello-universe --checks=nonexistent_check
Currently it generates PHP fatal error.
Fatal error: Uncaught Exception: Check with the slug "nonexistent_check" does not exist. in /var/www/html/wp-content/plugins/plugin-check/includes/Checker/Default_Check_Collection.php:158
May be we should display warning message like
WARNING: Invalid check slug 'nonexistent_check'
We could implement similar for categories also.
wp plugin check hello-universe --categories=nonexistent_category
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in includes/Checker/Default_Check_Collection.php, where the nonexistent check slug currently produces the fatal exception. Trace how the --checks and --categories CLI arguments are validated, then make invalid values report warnings instead. Done means both example commands show a warning for the invalid slug or category rather than a fatal error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100