diff --git a/.travis.yml b/.travis.yml
index 29f5e6fe61..74ad0a2745 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -108,7 +108,6 @@ script:
- if [[ $TRAVIS_PHP_VERSION == "7.1" ]]; then $(pwd)/vendor/bin/phpcs -s ./bin/class-ruleset-test.php --standard=WordPress-Core; fi
- if [[ $TRAVIS_PHP_VERSION == "7.1" ]]; then $(pwd)/vendor/bin/phpcs -s ./bin/class-ruleset-test.php --standard=WordPress-Docs; fi
- if [[ $TRAVIS_PHP_VERSION == "7.1" ]]; then $(pwd)/vendor/bin/phpcs -s ./bin/class-ruleset-test.php --standard=WordPress-Extra; fi
- - if [[ $TRAVIS_PHP_VERSION == "7.1" ]]; then $(pwd)/vendor/bin/phpcs -s ./bin/class-ruleset-test.php --standard=WordPress-VIP; fi
- if [[ $TRAVIS_PHP_VERSION == "7.1" ]]; then $(pwd)/vendor/bin/phpcs -s ./bin/class-ruleset-test.php --standard=WordPress; fi
# WordPress Coding Standards.
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
@@ -123,7 +122,6 @@ script:
- if [[ "$SNIFF" == "1" ]]; then diff -B --tabsize=4 ./WordPress-Core/ruleset.xml <(xmllint --format "./WordPress-Core/ruleset.xml"); fi
- if [[ "$SNIFF" == "1" ]]; then diff -B --tabsize=4 ./WordPress-Docs/ruleset.xml <(xmllint --format "./WordPress-Docs/ruleset.xml"); fi
- if [[ "$SNIFF" == "1" ]]; then diff -B --tabsize=4 ./WordPress-Extra/ruleset.xml <(xmllint --format "./WordPress-Extra/ruleset.xml"); fi
- - if [[ "$SNIFF" == "1" ]]; then diff -B --tabsize=4 ./WordPress-VIP/ruleset.xml <(xmllint --format "./WordPress-VIP/ruleset.xml"); fi
- if [[ "$SNIFF" == "1" ]]; then diff -B --tabsize=4 ./phpcs.xml.dist.sample <(xmllint --format "./phpcs.xml.dist.sample"); fi
# Validate the composer.json file.
# @link https://getcomposer.org/doc/03-cli.md#validate
diff --git a/README.md b/README.md
index eb903125a1..d672ea0ed4 100644
--- a/README.md
+++ b/README.md
@@ -127,7 +127,7 @@ You should then see `WordPress-Core` et al listed when you run `phpcs -i`.
### Standards subsets
-The project encompasses a super-set of the sniffs that the WordPress community may need. If you use the `WordPress` standard you will get all the checks. Some of them might be unnecessary for your environment, for example, those specific to WordPress.com VIP coding requirements.
+The project encompasses a super-set of the sniffs that the WordPress community may need. If you use the `WordPress` standard you will get all the checks.
You can use the following as standard names when invoking `phpcs` to select sniffs, fitting your needs:
@@ -137,9 +137,8 @@ You can use the following as standard names when invoking `phpcs` to select snif
- `WordPress-Extra` - extended ruleset for recommended best practices, not sufficiently covered in the WordPress core coding standards
- includes `WordPress-Core`
-**Notes:** This WPCS package contains the sniffs for another ruleset, `WordPress-VIP`. This ruleset was originally intended to aid with the [WordPress.com VIP coding requirements](https://vip.wordpress.com/documentation/vip-go/code-review-blockers-warnings-notices/), but this is no longer used or recommended by the WordPress.com VIP team or their clients, since they prefer to use their [official VIP coding standards](https://github.com/Automattic/VIP-Coding-Standards) ruleset instead.
-
-Before WPCS `1.0.0`, the WordPress-VIP ruleset was included as part of the complete `WordPress` ruleset. **As of `1.0.0` the `WordPress-VIP` ruleset is not part of the WordPress ruleset, and it is deprecated**. The remaining `WordPress-VIP` sniffs may still be referenced in custom rulesets, so to maintain some backwards compatibility, they will remain in WPCS until `2.0.0`. See [#1309](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1309) for more information.
+**Note:** The WPCS package used to include a `WordPress-VIP` ruleset and associated sniffs, prior to WPCS 2.0.0.
+The `WordPress-VIP` ruleset was originally intended to aid with the [WordPress.com VIP coding requirements](https://vip.wordpress.com/documentation/vip-go/code-review-blockers-warnings-notices/), but has been superseded. It is recommended to use the [official VIP coding standards](https://github.com/Automattic/VIP-Coding-Standards) ruleset instead for checking code against the VIP platform requirements.
### Using a custom ruleset
diff --git a/WordPress-VIP/ruleset.xml b/WordPress-VIP/ruleset.xml
deleted file mode 100644
index 202b3bc872..0000000000
--- a/WordPress-VIP/ruleset.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
- Deprecated WordPress.com VIP Coding Standards. Use the official VIP coding standards instead which can be found at https://github.com/Automattic/VIP-Coding-Standards
-
-
-
-
- ./../WordPress/PHPCSAliases.php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- error
-
-
-
-
- error
-
-
- error
-
-
-
-
-
-
-
- Using cURL functions is highly discouraged within VIP context. Check (Fetching Remote Data) on VIP Documentation.
-
-
- %s() is highly discouraged, please use vip_safe_wp_remote_get() instead.
-
-
-
-
-
-
- error
- Attempting a database schema change is highly discouraged.
-
-
- error
- Usage of a direct database call without caching is prohibited on the VIP platform. Use wp_cache_get / wp_cache_set or wp_cache_delete.
-
-
-
-
-
-
- error
-
-
-
-
- error
- Scheduling crons at %s sec ( less than %s minutes ) is prohibited.
-
-
-
-
-
-
- error
-
-
- error
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
diff --git a/WordPress/Sniff.php b/WordPress/Sniff.php
index ca7ca0bad8..461faad62f 100644
--- a/WordPress/Sniff.php
+++ b/WordPress/Sniff.php
@@ -213,7 +213,6 @@ abstract class Sniff implements PHPCS_Sniff {
'the_author' => true,
'the_date' => true,
'the_title_attribute' => true,
- 'vip_powered_wpcom' => true,
'walk_nav_menu_tree' => true,
'wp_dropdown_categories' => true,
'wp_dropdown_users' => true,
diff --git a/WordPress/Sniffs/VIP/AdminBarRemovalSniff.php b/WordPress/Sniffs/VIP/AdminBarRemovalSniff.php
deleted file mode 100644
index ba8208c601..0000000000
--- a/WordPress/Sniffs/VIP/AdminBarRemovalSniff.php
+++ /dev/null
@@ -1,465 +0,0 @@
- false,
- 'FoundPropertyForDeprecatedSniff' => false,
- );
-
- /**
- * A list of tokenizers this sniff supports.
- *
- * @since 0.11.0
- *
- * @var array
- */
- public $supportedTokenizers = array( 'PHP', 'CSS' );
-
- /**
- * Whether or not the sniff only checks for removal of the admin bar
- * or any manipulation to the visibility of the admin bar.
- *
- * Defaults to true: only check for removal of the admin bar.
- * Set to false to check for any form of manipulation of the visibility
- * of the admin bar.
- *
- * @since 0.11.0
- *
- * @var bool
- */
- public $remove_only = true;
-
- /**
- * Functions this sniff is looking for.
- *
- * @since 0.11.0
- *
- * @var array
- */
- protected $target_functions = array(
- 'show_admin_bar' => true,
- 'add_filter' => true,
- );
-
- /**
- * CSS properties this sniff is looking for.
- *
- * @since 0.11.0
- *
- * @var array
- */
- protected $target_css_properties = array(
- 'visibility' => array(
- 'type' => '!=',
- 'value' => 'hidden',
- ),
- 'display' => array(
- 'type' => '!=',
- 'value' => 'none',
- ),
- 'opacity' => array(
- 'type' => '>',
- 'value' => 0.3,
- ),
- );
-
- /**
- * CSS selectors this sniff is looking for.
- *
- * @since 0.11.0
- *
- * @var array
- */
- protected $target_css_selectors = array(
- '.show-admin-bar',
- '#wpadminbar',
- );
-
- /**
- * String tokens within PHP files we want to deal with.
- *
- * Set from the register() method.
- *
- * @since 0.11.0
- *
- * @var array
- */
- private $string_tokens = array();
-
- /**
- * Regex template for use with the CSS selectors in combination with PHP text strings.
- *
- * @since 0.11.0
- *
- * @var string
- */
- private $target_css_selectors_regex = '`(?:%s).*?\{(.*)$`';
-
- /**
- * Property to keep track of whether a ' ) ) {
- // Make sure we check any content on this line before the closing style tag.
- $this->in_style[ $file_name ] = false;
- $content = trim( substr( $content, 0, strpos( $content, '' ) ) );
- }
- } elseif ( true === $this->has_html_open_tag( 'style', $stackPtr, $content ) ) {
- // Ok, found a ' ) ) {
- // Make sure we check any content on this line after the opening style tag.
- $this->in_style[ $file_name ] = true;
- $content = trim( substr( $content, ( strpos( $content, '';
-
-// Various text before/after combinations.
-echo ''; // Bad.
-
-echo 'Some text about .show-admin-bar before a style tag '; // Ok.
-echo 'Some text about .show-admin-bar after a style tag'; // Ok.
-
-echo '';
-
-// Testing T_DOUBLE_QUOTED_STRING.
-echo "
-";
-
-// Testing T_HEREDOC.
-$style = <<
- .show-admin-bar {
- visibility: $hidden; /* Ok, value not 'hidden'. */
- }
-
-EOT;
-
-// Testing T_NOWDOC.
-$style = <<<'EOT'
-
-EOT;
-
-// Testing T_INLINE_HTML
-?>
-
-
-
-
-
-
- .show-admin-bar {
- visibility: $hidden; /* Bad. */
- }
- .my-admin-bar {
- visibility: $hidden; /* OK. */
- }
-
-EOT;
-?>
-
-
-/* @codingStandardsChangeSetting WordPress.VIP.AdminBarRemoval remove_only true */
diff --git a/WordPress/Tests/VIP/AdminBarRemovalUnitTest.php b/WordPress/Tests/VIP/AdminBarRemovalUnitTest.php
deleted file mode 100644
index d6b7a06516..0000000000
--- a/WordPress/Tests/VIP/AdminBarRemovalUnitTest.php
+++ /dev/null
@@ -1,105 +0,0 @@
- =>
- */
- public function getErrorList( $testFile = '' ) {
-
- switch ( $testFile ) {
- case 'AdminBarRemovalUnitTest.inc':
- return array(
- 3 => 1,
- 6 => 1,
- 9 => 1,
- 12 => 1,
- 13 => 1,
- 19 => 1,
- 20 => 1,
- 21 => 1,
- 26 => 1,
- 32 => 1,
- 56 => 1,
- 57 => 1,
- 58 => 1,
- 68 => 1,
- 69 => 1,
- 70 => 1,
- 81 => 1,
- 82 => 1,
- 83 => 1,
- 92 => 1,
- 103 => 1,
- 104 => 1,
- 105 => 1,
- );
-
- case 'AdminBarRemovalUnitTest.css':
- return array(
- 15 => 1,
- 16 => 1,
- 17 => 1,
- 22 => 1,
- 23 => 1,
- 24 => 1,
- 29 => 1,
- 30 => 1,
- 31 => 1,
- 38 => 1,
- 39 => 1,
- 40 => 1,
- 46 => 1,
- 47 => 1,
- 48 => 1,
- );
-
- default:
- return array();
- }
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @param string $testFile The name of the file being tested.
- * @return array =>
- */
- public function getWarningList( $testFile = '' ) {
- switch ( $testFile ) {
- case 'AdminBarRemovalUnitTest.css':
- return array(
- 1 => 2,
- );
-
- case 'AdminBarRemovalUnitTest.inc':
- return array();
-
- default:
- return array();
- }
- }
-}
diff --git a/WordPress/Tests/VIP/CronIntervalUnitTest.inc b/WordPress/Tests/VIP/CronIntervalUnitTest.inc
deleted file mode 100644
index 51e6582bac..0000000000
--- a/WordPress/Tests/VIP/CronIntervalUnitTest.inc
+++ /dev/null
@@ -1,6 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array();
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- 4 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/DirectDatabaseQueryUnitTest.inc b/WordPress/Tests/VIP/DirectDatabaseQueryUnitTest.inc
deleted file mode 100644
index a8799948e3..0000000000
--- a/WordPress/Tests/VIP/DirectDatabaseQueryUnitTest.inc
+++ /dev/null
@@ -1,6 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array();
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/FileSystemWritesDisallowUnitTest.inc b/WordPress/Tests/VIP/FileSystemWritesDisallowUnitTest.inc
deleted file mode 100644
index 4a5c2b23e1..0000000000
--- a/WordPress/Tests/VIP/FileSystemWritesDisallowUnitTest.inc
+++ /dev/null
@@ -1,49 +0,0 @@
- $loop ) {
- if ( flock( $fp, LOCK_EX ) ) { // Bad.
- fwrite( $fp, $text ); // Bad.
- }
- flock( $fp, LOCK_UN ); // Bad.
-}
-
-fclose( $fp );
-
-delete();
-fputcsv();
-fputs();
-ftruncate();
-is_writable();
-is_writeable();
-link();
-rename();
-symlink();
-tempnam();
-touch();
-unlink();
-
-mkdir();
-rmdir();
-
-chgrp();
-chown();
-chmod();
-lchgrp();
-lchown();
-
-// @codingStandardsChangeSetting WordPress.VIP.FileSystemWritesDisallow exclude directory
-mkdir();
-
-// @codingStandardsChangeSetting WordPress.VIP.FileSystemWritesDisallow exclude false
-
-
-// Issue #956.
-use Fieldmanager_Link as Link;
-
-namespace Fieldmanager\Link\Something;
-namespace Fieldmanager\Link;
diff --git a/WordPress/Tests/VIP/FileSystemWritesDisallowUnitTest.php b/WordPress/Tests/VIP/FileSystemWritesDisallowUnitTest.php
deleted file mode 100644
index b5d30f8a56..0000000000
--- a/WordPress/Tests/VIP/FileSystemWritesDisallowUnitTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 3 => 1,
- 9 => 1,
- 10 => 1,
- 12 => 1,
- 17 => 1,
- 18 => 1,
- 19 => 1,
- 20 => 1,
- 21 => 1,
- 22 => 1,
- 23 => 1,
- 24 => 1,
- 25 => 1,
- 26 => 1,
- 27 => 1,
- 28 => 1,
- 30 => 1,
- 31 => 1,
- 33 => 1,
- 34 => 1,
- 35 => 1,
- 36 => 1,
- 37 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/OrderByRandUnitTest.inc b/WordPress/Tests/VIP/OrderByRandUnitTest.inc
deleted file mode 100644
index 0a722377df..0000000000
--- a/WordPress/Tests/VIP/OrderByRandUnitTest.inc
+++ /dev/null
@@ -1,18 +0,0 @@
- 'rand', // Bad.
- "orderby" => "rand", // Bad.
- "orderby" => "RAND", // Bad.
-);
-
-_query_posts( 'orderby=rand' ); // Bad.
-
-$query_args['orderby'] = 'rand'; // Bad.
-
-$query_args['orderby'] = 'date'; // Ok.
-
-// @codingStandardsChangeSetting WordPress.VIP.OrderByRand exclude something
-$query_args['orderby'] = 'rand'; // Bad.
-
-// @codingStandardsChangeSetting WordPress.VIP.OrderByRand exclude false
\ No newline at end of file
diff --git a/WordPress/Tests/VIP/OrderByRandUnitTest.php b/WordPress/Tests/VIP/OrderByRandUnitTest.php
deleted file mode 100644
index 084eedfd33..0000000000
--- a/WordPress/Tests/VIP/OrderByRandUnitTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 4 => 1,
- 5 => 1,
- 6 => 1,
- 9 => 1,
- 11 => 1,
- 16 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/PluginMenuSlugUnitTest.inc b/WordPress/Tests/VIP/PluginMenuSlugUnitTest.inc
deleted file mode 100644
index a625119c1d..0000000000
--- a/WordPress/Tests/VIP/PluginMenuSlugUnitTest.inc
+++ /dev/null
@@ -1,3 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array();
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/PostsPerPageUnitTest.inc b/WordPress/Tests/VIP/PostsPerPageUnitTest.inc
deleted file mode 100644
index 25e92fbe54..0000000000
--- a/WordPress/Tests/VIP/PostsPerPageUnitTest.inc
+++ /dev/null
@@ -1,24 +0,0 @@
- true, // Bad.
- 'posts_per_page' => 999, // OK.
- 'posts_per_page' => -1, // Bad.
- 'posts_per_page' => 1, // Ok.
- 'posts_per_page' => '1', // Ok.
-);
-
-_query_posts( 'nopaging=true&posts_per_page=999' ); // Bad.
-
-$query_args['posts_per_page'] = -1; // Bad.
-$query_args['posts_per_page'] = 1; // OK.
-$query_args['posts_per_page'] = '1'; // OK.
-$query_args['posts_per_page'] = '-1'; // Bad.
-$query_args['numberposts'] = '-1'; // Bad.
-
-$query_args['my_posts_per_page'] = -1; // OK.
-
-// Test deprecated property message.
-// @codingStandardsChangeSetting WordPress.VIP.PostsPerPage posts_per_page 50
-$query_args['posts_per_page'] = 50; // OK.
-// @codingStandardsChangeSetting WordPress.VIP.PostsPerPage posts_per_page 100
diff --git a/WordPress/Tests/VIP/PostsPerPageUnitTest.php b/WordPress/Tests/VIP/PostsPerPageUnitTest.php
deleted file mode 100644
index c4ba575911..0000000000
--- a/WordPress/Tests/VIP/PostsPerPageUnitTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 4 => 1,
- 6 => 1,
- 11 => 1,
- 13 => 1,
- 16 => 1,
- 17 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/RestrictedFunctionsUnitTest.inc b/WordPress/Tests/VIP/RestrictedFunctionsUnitTest.inc
deleted file mode 100644
index f0f06d3a1b..0000000000
--- a/WordPress/Tests/VIP/RestrictedFunctionsUnitTest.inc
+++ /dev/null
@@ -1,89 +0,0 @@
-add_role(); // Ok.
-$y = Bar::add_role(); // Ok.
-\SomeNamespace\add_role(); // Ok.
-
-\add_role(); // Error.
-
-wpcom_vip_get_term_link( $term ); // Error.
-
-get_page_by_path( $path ); // Error.
-
-get_page_by_title( $page_title ); // Error.
-
-wpcom_vip_get_term_by( $field, $value, $taxonomy ); // Error.
-
-wpcom_vip_get_category_by_slug( $slug ); // Error.
-
-url_to_postid( $url ); // Error.
-
-attachment_url_to_postid( $url ); // Error.
-wpcom_vip_attachment_url_to_postid( $url ); // Ok.
-
-get_tag_link(); // Ok.
-get_category_link(); // Ok.
-get_cat_ID(); // Ok.
-url_to_post_id(); // Error.
-
-get_posts(); // Warning.
-wp_get_recent_posts(); // Warning.
-
-get_children(); // Warning.
-
-
-
-
-term_exists(); // Error.
-count_user_posts(); // Error.
-wp_old_slug_redirect(); // Error.
-get_adjacent_post(); // Error.
-get_previous_post(); // Error.
-get_next_post(); // Error.
-
-
-
-
-get_previous_post_link(); // Error.
-get_next_post_link(); // Error.
-get_intermediate_image_sizes(); // Error.
-
-
-wp_is_mobile(); // Error.
-
-setcookie( 'cookie[three]', 'cookiethree' ); // Warning.
-
-get_user_meta(); // Error.
-update_user_meta(); // Error.
-delete_user_meta(); // Error.
-add_user_meta(); // Error.
-
-// @codingStandardsChangeSetting WordPress.VIP.RestrictedFunctions exclude switch_to_blog
-switch_to_blog( $blogid ); // Error.
-
-// @codingStandardsChangeSetting WordPress.VIP.RestrictedFunctions exclude false
diff --git a/WordPress/Tests/VIP/RestrictedFunctionsUnitTest.php b/WordPress/Tests/VIP/RestrictedFunctionsUnitTest.php
deleted file mode 100644
index b2cb717aba..0000000000
--- a/WordPress/Tests/VIP/RestrictedFunctionsUnitTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 3 => 1,
- 17 => 1,
- 32 => 1,
- 34 => 1,
- 36 => 1,
- 38 => 1,
- 40 => 1,
- 42 => 1,
- 44 => 1,
- 46 => 1,
- 52 => 1,
- 62 => 1,
- 63 => 1,
- 64 => 1,
- 65 => 1,
- 66 => 1,
- 67 => 1,
- 72 => 1,
- 73 => 1,
- 74 => 1,
- 77 => 1,
- 81 => 1,
- 82 => 1,
- 83 => 1,
- 84 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- 5 => 1,
- 7 => 1,
- 9 => 1,
- 54 => 1,
- 55 => 1,
- 57 => 1,
- 79 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/RestrictedVariablesUnitTest.inc b/WordPress/Tests/VIP/RestrictedVariablesUnitTest.inc
deleted file mode 100644
index b4b3a65c48..0000000000
--- a/WordPress/Tests/VIP/RestrictedVariablesUnitTest.inc
+++ /dev/null
@@ -1,34 +0,0 @@
-users"; // Error.
-
-$wp_db->update( $wpdb->users, array( 'displayname' => 'Kanobe!' ), array( 'ID' => 1 ) ); // Error.
-
-$query = "SELECT * FROM $wpdb->usermeta"; // Error.
-
-$wp_db->update( $wpdb->usermeta, array( 'meta_value' => 'bar!' ), array( 'user_id' => 1, 'meta_key' => 'foo' ) ); // Error.
-
-$query = "SELECT * FROM $wpdb->posts"; // Ok.
-
-if ( isset( $_SERVER['REMOTE_ADDR'] ) ) { // Warning.
- foo( $_SERVER['HTTP_USER_AGENT'] ); // Warning.
-}
-
-$x = $_COOKIE['bar']; // Warning.
-
-$y = $_SERVER['REQUEST_URI']; // Ok.
-
-// Error.
-$query = <<usermeta
-EOD;
-
-// Warning
-$phrase = <<usermeta"; // Error.
-
-// @codingStandardsChangeSetting WordPress.VIP.RestrictedFunctions exclude false
diff --git a/WordPress/Tests/VIP/RestrictedVariablesUnitTest.php b/WordPress/Tests/VIP/RestrictedVariablesUnitTest.php
deleted file mode 100644
index 544118cdcc..0000000000
--- a/WordPress/Tests/VIP/RestrictedVariablesUnitTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 3 => 1,
- 5 => 1,
- 7 => 1,
- 9 => 1,
- 23 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- 13 => 1,
- 14 => 1,
- 17 => 1,
- 28 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/SessionFunctionsUsageUnitTest.inc b/WordPress/Tests/VIP/SessionFunctionsUsageUnitTest.inc
deleted file mode 100644
index 086fdab098..0000000000
--- a/WordPress/Tests/VIP/SessionFunctionsUsageUnitTest.inc
+++ /dev/null
@@ -1,34 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array_fill( 3, 26, 1 );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/SessionVariableUsageUnitTest.inc b/WordPress/Tests/VIP/SessionVariableUsageUnitTest.inc
deleted file mode 100644
index d635ed98fa..0000000000
--- a/WordPress/Tests/VIP/SessionVariableUsageUnitTest.inc
+++ /dev/null
@@ -1,4 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 3 => 1,
- 4 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/SlowDBQueryUnitTest.inc b/WordPress/Tests/VIP/SlowDBQueryUnitTest.inc
deleted file mode 100644
index 749e23d1e0..0000000000
--- a/WordPress/Tests/VIP/SlowDBQueryUnitTest.inc
+++ /dev/null
@@ -1,6 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array();
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- 4 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/SuperGlobalInputUsageUnitTest.inc b/WordPress/Tests/VIP/SuperGlobalInputUsageUnitTest.inc
deleted file mode 100644
index 449117850a..0000000000
--- a/WordPress/Tests/VIP/SuperGlobalInputUsageUnitTest.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-
- // Do something.
- =>
- */
- public function getErrorList() {
- return array();
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 1,
- 3 => 1,
- 13 => 1,
- 15 => 1,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/TimezoneChangeUnitTest.inc b/WordPress/Tests/VIP/TimezoneChangeUnitTest.inc
deleted file mode 100644
index b49ed63821..0000000000
--- a/WordPress/Tests/VIP/TimezoneChangeUnitTest.inc
+++ /dev/null
@@ -1,6 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 4 => 1,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- );
- }
-
-}
diff --git a/WordPress/Tests/VIP/ValidatedSanitizedInputUnitTest.inc b/WordPress/Tests/VIP/ValidatedSanitizedInputUnitTest.inc
deleted file mode 100644
index 01950abed5..0000000000
--- a/WordPress/Tests/VIP/ValidatedSanitizedInputUnitTest.inc
+++ /dev/null
@@ -1,6 +0,0 @@
- =>
- */
- public function getErrorList() {
- return array(
- 4 => 3,
- );
- }
-
- /**
- * Returns the lines where warnings should occur.
- *
- * @return array =>
- */
- public function getWarningList() {
- return array(
- 1 => 2,
- );
- }
-
-}
diff --git a/WordPress/ruleset.xml b/WordPress/ruleset.xml
index cd3cd73dff..505d42a273 100644
--- a/WordPress/ruleset.xml
+++ b/WordPress/ruleset.xml
@@ -6,17 +6,7 @@
-
-
-
-
-
-
-
-
-
-
-
+