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

New sniff: Verify that an up-to-date version of TGMPA is being used. #132

Merged
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ script:
# For the first run, the exit code will be 1 (= all fixable errors fixed).
# `travis_retry` should then kick in to run the fixer again which should now return 0 (= no fixable errors found).
# All error codes for the PHPCBF: https://github.com/squizlabs/PHP_CodeSniffer/issues/1270#issuecomment-272768413
- if [[ "$SNIFF" == "1" ]]; then travis_retry $PHPCS_DIR/bin/phpcbf -p ./WordPress/Tests/ --standard=WordPress --extensions=inc --exclude=Generic.PHP.Syntax --report=summary; fi
- if [[ "$SNIFF" == "1" ]]; then travis_retry $PHPCS_DIR/bin/phpcbf -p ./WordPress/Tests/ --standard=WordPress --extensions=inc --exclude=Generic.PHP.Syntax --report=summary --ignore=/WordPress/Tests/Theme/CorrectVersionTests/*; fi
# WordPress Coding Standards.
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
Expand Down
10 changes: 9 additions & 1 deletion WordPress-Theme/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,18 @@
<!-- See: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#naming-conventions-prefix-everything-in-the-global-namespace-->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals" />

<!-- Check for correct spelling of WordPress. -->
<!-- Check for correct spelling of WordPress. -->
<!-- Covers: https://make.wordpress.org/themes/handbook/review/required/#naming - third bullet. -->
<rule ref="WordPress.WP.CapitalPDangit">
<type>error</type>
</rule>

<!-- If TGMPA is used, verify that the version is up to date. -->
<rule ref="WordPress.Theme.CorrectTGMPAVersions">
<!-- Require that the Custom Generator is used to download & adjust TGMPA. -->
<properties>
<property name="required_flavour" value="wporg"/>
</properties>
</rule>

</ruleset>
Loading