WordPress / WordPress/plugin-check
Enhancement: Add CLI options to check specific files and directories
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 362
- Forks
- 126
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 22
Description
Currently, the wp plugin check command supports excluding files and directories via --exclude-files and --exclude-directories, but there's no way to check only specific files or directories. This feature would add --include-files and --include-directories options that restrict checks to only the specified files and/or directories, working as the inverse of the exclude options.
Examples:
wp plugin check my-plugin --include-files=src/Plugin.php,src/admin/Settings.php
wp plugin check my-plugin --include-directories=src/admin,src/database
wp plugin check my-plugin --include-files=src/Plugin.php --include-directories=src/admin
If both include and exclude options are provided for the same type (e.g. --include-files and --exclude-files), the command could error as they are mutually exclusive. The --include-files and --include-directories options can be used together. Directory inclusion should work recursively, including all files within the specified directories and their subdirectories.
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 at the wp plugin check command and trace how the existing --exclude-files and --exclude-directories options select paths. Implement matching include options with recursive directory behavior, define handling for conflicting include and exclude options, and verify that the example commands restrict checks to the requested paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100