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
Create I18n_Usage_Check #18
Comments
@jjgrainger The ACs here were added a while ago and are outdated. They need to be updated to reflect the way the |
Thanks @felixarntz I've updated the AC's to reflect the changes made to the |
@jjgrainger ACs LGTM! |
@jjgrainger Added a CC @felixarntz |
@jjgrainger I have addressed your feedback and left one question for you. Thank you! |
Description
Checks that WordPress internationalization functions are used properly, including using a valid textdomain that matches the plugin’s textdomain in the main file comment header. It will also include checks for each of the localization functions for typos and ensure the correct parameters are passed. This will use the existing
WordPress.WP.I18n
sniff in the WordPress Coding Standards.Acceptance Criteria
I18n_Usage_Check
should be created and exists atincludes/Checker/Checks
I18n_Usage_Check
should extend theAbstract_PHP_CodeSniffer_Check
abstract classget_args()
and return an associative array of the required PHPCS arguments'sniffs' => 'WordPress.WP.I18n'
'standard' => 'WordPress'
Tests Coverage
get_args()
method returns the expected array of PHPCS arguments for the checkrun()
method adds a correct message to the$check_result
when checking an invalid filerun()
method does not add any message to the$check_result
when checking a valid fileThe text was updated successfully, but these errors were encountered: