-
Notifications
You must be signed in to change notification settings - Fork 83
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/adminIf 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.