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

Remove problematic words from the code #1915

Closed
dingo-d opened this issue Jul 2, 2020 · 7 comments · Fixed by #2366
Closed

Remove problematic words from the code #1915

dingo-d opened this issue Jul 2, 2020 · 7 comments · Fixed by #2366

Comments

@dingo-d
Copy link
Member

dingo-d commented Jul 2, 2020

As discussed in #1908 we should scan the code for any problematic and non-inclusive words (whitelist/blacklist for instance).

The principles discussed in PHPCSStandards/PHPCSExtra#59 should be taken into the account. I think that sniff will be useful if included in standards for this repo 🙂

Also, a thing to look out for is pronouns in comments. I know I've done that many times (haven't checked this repo in details for this) - using he in comments. Like:

/**
 * This code will force a user to do this.
 * He will then be redirected.
 */

Instead, a more inclusive version can be used

/**
 * This code will force a user to do this.
 * They will then be redirected.
 */

A small change that doesn't hurt anybody, but makes it a bit more inclusive.

Note to anybody who wants to point out that this is blown out of proportion, please, don't even try. While the offense is taken, not given, using non-inclusive words means creating a non-inclusive environment, and inclusivity brings diversity and a happier space to work in. And this is what we should always strive for.

@jrfnl
Copy link
Member

jrfnl commented Jul 2, 2020

I've just added this issue to the 3.0 milestone.

I'm pretty sure there are some public properties which people can set from a custom [.]phpcs.xml[.dist] which uses "whitelist"/"blacklist" terminology.

Changing the names of those properties will be a BC-break for end-users, so should be done in a major version (which we just happen to be working on right now).

@jrfnl
Copy link
Member

jrfnl commented Jan 8, 2023

This was largely addressed by #2065, though a cursory word search for other potentially problematic words should still be done before the issue can be closed.

@jrfnl
Copy link
Member

jrfnl commented Aug 18, 2023

Anyone still up for a cursory search ? If not, I suggest we close this issue as fixed. Follow-up issues can be opened if other problematic terminology would be encountered in the future.

@GaryJones
Copy link
Member

Using https://github.com/get-woke/woke, it detected:

Expand for raw results
WordPress/Helpers/IsUnitTestTrait.php:62:51-60: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 *               Renamed from `$custom_test_class_whitelist` to `$custom_test_classes`.
	                                                  ^
WordPress/Helpers/IsUnitTestTrait.php:76:46-55: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 *               - Renamed from `$test_class_whitelist` to `$known_test_classes`.
	                                             ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:43:12-21: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
add_option('blacklist_keys');
            ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:44:20-29: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
add_option('comment_whitelist', $value);
                    ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:45:35-44: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
add_option(value: $value, option: 'blacklist_keys');
                                   ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:46:12-21: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
get_option('blacklist_keys');
            ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:47:20-29: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
get_option('comment_whitelist', $default);
                    ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:48:47-56: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
get_option(default: $default, option: 'comment_whitelist');
                                               ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:49:15-24: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
update_option('blacklist_keys', $value);
               ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:50:23-32: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
update_option('comment_whitelist', $value);
                       ^
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc:51:54-63: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
update_option(autoload: true, value: $value, option: 'blacklist_keys');
                                                      ^
WordPress/Tests/Security/EscapeOutputUnitTest.1.inc:127:34-43: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
echo $html_fragment; // WPCS: XSS whitelist.
                                  ^
WordPress/Helpers/WPGlobalVariablesHelper.php:142:7-16: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		'new_whitelist_options'            => true,
		     ^
WordPress/Helpers/WPGlobalVariablesHelper.php:222:3-12: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		'whitelist_options'                => true,
		 ^
WordPress/Tests/DB/DirectDatabaseQueryUnitTest.inc:19:9-14: `dummy` may be insensitive, use `placeholder`, `sample` instead (error)
function dummy() {
         ^
phpunit.xml.dist:18:3-12: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
		 ^
phpunit.xml.dist:18:34-43: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
		                                ^
phpunit.xml.dist:18:76-85: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
		                                                                          ^
phpunit.xml.dist:26:4-13: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		</whitelist>
		  ^
WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php:62:33-42: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0  Renamed from `$whitelisted_mixed_case_member_var_names` to `$allowed_mixed_case_member_var_names`.
	                                ^
WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php:79:49-58: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0  Renamed from `$customPropertiesWhitelist` to `$allowed_custom_properties`.
	                                                ^
WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php:272:37-46: `WhiteList` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0  Renamed from `mergeWhiteList()` to `merge_allow_lists()`.
	                                    ^
WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php:44:51-60: `WHITELIST` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `POST_TYPE_CHARACTER_WHITELIST` to `VALID_POST_TYPE_CHARACTERS`.
	                                                  ^
WordPress/Tests/WP/DeprecatedFunctionsUnitTest.inc:347:23-32: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
_wp_register_meta_args_whitelist();
                       ^
WordPress/Tests/WP/DeprecatedFunctionsUnitTest.inc:348:11-20: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
add_option_whitelist();
           ^
WordPress/Tests/WP/DeprecatedFunctionsUnitTest.inc:349:14-23: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
remove_option_whitelist();
              ^
WordPress/Tests/WP/DeprecatedFunctionsUnitTest.inc:350:3-12: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
wp_blacklist_check();
   ^
WordPress/Sniffs/PHP/IniSetSniff.php:48:32-41: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$whitelisted_options` to `$safe_options`.
	                               ^
WordPress/Sniffs/PHP/IniSetSniff.php:75:32-41: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$blacklisted_options` to `$disallowed_options`.
	                               ^
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php:71:6-15: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
					'blacklist_keys' => array(
					 ^
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php:75:14-23: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
					'comment_whitelist' => array(
					         ^
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php:154:6-15: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
					'blacklist_keys' => array(
					 ^
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php:158:14-23: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
					'comment_whitelist' => array(
					         ^
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php:199:6-15: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
					'blacklist_keys' => array(
					 ^
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php:203:14-23: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
					'comment_whitelist' => array(
					         ^
WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php:48:44-53: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$use_default_whitelist` to `$usePHPFunctionsList`.
	                                           ^
WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php:61:39-48: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$custom_whitelist` to `$customAllowedFunctionsList`.
	                                      ^
WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php:82:41-50: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$function_whitelist` to `$allowedFunctionsList`.
	                                        ^
WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php:82:40-49: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
	 * @since 3.0.0  Renamed from `$prefix_blacklist` to `$prefix_blocklist`.
	                                       ^
WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php:133:32-41: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$whitelisted_core_hooks` to `$allowed_core_hooks`.
	                               ^
WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php:153:32-41: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0 Renamed from `$whitelisted_core_constants` to `$allowed_core_constants`.
	                               ^
WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php:1164:53-62: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	 * @since 3.0.0  Renamed from `variable_prefixed_or_whitelisted()` to `variable_prefixed_or_allowed()`.
	                                                    ^
WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php:1367:26-35: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		'_wp_register_meta_args_whitelist' => array(
		                        ^
WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php:1371:14-23: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		'add_option_whitelist' => array(
		            ^
WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php:1375:17-26: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
		'remove_option_whitelist' => array(
		               ^
WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php:1379:6-15: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
		'wp_blacklist_check' => array(
		    ^
CHANGELOG.md:56:96-105: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
- `WordPress.NamingConventions.PrefixAllGlobals`: the `PHP` prefix has been added to the prefix blacklist as it is reserved by PHP itself.
                                                                                                ^
CHANGELOG.md:115:71-80: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The generic `TestCase` class name has been added to the `$test_class_whitelist`.
                                                                       ^
CHANGELOG.md:131:73-82: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The new WP 5.1 `WP_UnitTestCase_Base` class to the `Sniff::$test_class_whitelist` property.
                                                                         ^
CHANGELOG.md:282:37-46: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:282:118-127: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:283:27-36: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
    The WordPressCS native whitelist comments will continue to work for now, but a deprecation warning will be thrown when they are encountered.
                           ^
CHANGELOG.md:284:38-47: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:334:42-51: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The `WordPress.DB.SlowDBQuery.DeprecatedWhitelistFlagFound` error code which is superseded by the blanket deprecation warning for using the now deprecated WPCS native whitelist comments.
                                          ^
CHANGELOG.md:334:169-178: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The `WordPress.DB.SlowDBQuery.DeprecatedWhitelistFlagFound` error code which is superseded by the blanket deprecation warning for using the now deprecated WPCS native whitelist comments.
                                                                                                                                                                         ^
CHANGELOG.md:344:70-79: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- `WordPress.NamingConventions.ValidVariableName`: The `customVariableWhitelist` property, which had been deprecated since WordPressCS 0.11.0. Use the `customPropertiesWhitelist` property instead.
                                                                      ^
CHANGELOG.md:344:168-177: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- `WordPress.NamingConventions.ValidVariableName`: The `customVariableWhitelist` property, which had been deprecated since WordPressCS 0.11.0. Use the `customPropertiesWhitelist` property instead.
                                                                                                                                                                        ^
CHANGELOG.md:401:28-37: `blacklist` may be insensitive, use `denylist`, `blocklist`, `exclusion list` instead (warning)
- `WordPress` to the prefix blacklist for the `WordPress.NamingConventions.PrefixAllGlobals` sniff.
                            ^
CHANGELOG.md:429:18-27: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The `Sniff::has_whitelist_comment()` method would sometimes incorrectly regard `// phpcs:set` comments as whitelist comments.
                  ^
CHANGELOG.md:429:108-117: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The `Sniff::has_whitelist_comment()` method would sometimes incorrectly regard `// phpcs:set` comments as whitelist comments.
                                                                                                            ^
CHANGELOG.md:437:110-119: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:437:265-274: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:439:37-46: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
    * Contains a public `use_default_whitelist` property which can be set from a custom ruleset which regulates whether or not the standard whitelist of PHP functions should be used by the sniff.
                                     ^
CHANGELOG.md:439:140-149: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
    * Contains a public `use_default_whitelist` property which can be set from a custom ruleset which regulates whether or not the standard whitelist of PHP functions should be used by the sniff.
                                                                                                                                            ^
CHANGELOG.md:440:22-31: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
	    The user-defined whitelist will always be respected.
	                     ^
CHANGELOG.md:601:23-32: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:601:104-113: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:601:187-196: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:610:60-69: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
    - Namespaced classes where the classname was one of the whitelisted global classes would incorrectly be recognized as a test class, even though they were not the same class.
                                                            ^
CHANGELOG.md:611:71-80: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
        This also happened if a namespaced class `extend`ed one of the whitelisted global classes.
                                                                       ^
CHANGELOG.md:612:167-176: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
    - A namespaced custom test class where the name was split between the namespace declaration and the extended class declaration was not correctly recognized as the whitelisted test class.
                                                                                                                                                                       ^
CHANGELOG.md:614:29-38: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:674:75-84: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:674:155-164: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:674:384-393: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:690:18-27: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:737:169-178: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:737:247-256: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:772:53-62: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:772:127-136: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:788:393-402: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:790:6-15: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The whitelist flag for the `WordPress.VIP.SlowQuery` sniff was `tax_query` which was unintuitive. This has now been changed to `slow query` to be in line with other whitelist flags.
      ^
CHANGELOG.md:790:167-176: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The whitelist flag for the `WordPress.VIP.SlowQuery` sniff was `tax_query` which was unintuitive. This has now been changed to `slow query` to be in line with other whitelist flags.
                                                                                                                                                                       ^
CHANGELOG.md:819:7-16: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:819:104-113: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:819:195-204: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:819:239-248: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:887:71-80: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:887:168-177: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:887:332-341: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:890:349-358: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
CHANGELOG.md:958:44-53: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- Ability to add arbitrary variables to the whitelist via a custom ruleset property for the `WordPress.NamingConventions.ValidVariableName` sniff.
                                            ^
CHANGELOG.md:959:19-28: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- Ability to use a whitelist comment for tax queries for the `WordPress.VIP.SlowDBQuery` sniff.
                   ^
CHANGELOG.md:971:24-33: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- Added `cat_ID` to the whitelisted exceptions for the `WordPress.NamingConventions.ValidVariableName` sniff.
                        ^
CHANGELOG.md:972:42-51: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- Added `__debugInfo` to the magic method whitelist for class methods starting with double underscore in the `WordPress.NamingConventions.ValidFunctionName` sniff.
                                          ^
CHANGELOG.md:975:71-80: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The array provided to `AbstractFunctionRestrictions` can now take a `whitelist` key to whitelist select functions when blocking a group of functions by function prefix.
                                                                       ^
CHANGELOG.md:975:89-98: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- The array provided to `AbstractFunctionRestrictions` can now take a `whitelist` key to whitelist select functions when blocking a group of functions by function prefix.
                                                                                         ^
CHANGELOG.md:993:2-11: `Whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- Whitelist comments directly followed by a PHP closing tag were not being recognized.
  ^
CHANGELOG.md:1129:29-38: `whitelist` may be insensitive, use `allowlist`, `inclusion list` instead (warning)
- Support for `sanitization` whitelisting comments for the `WordPress.VIP.ValidatedSanitizedInput` sniff.

Other than an easy rename of dummy() to placeholder() in a test file (the only one reported as an error), all the rest are either:

  • Deprecated functions, properties, option names etc. from WP core that themselves were renamed. We need to know the old name to be able to report on it.
  • Documentation comments in our sniffs of our previous renames of properties and variables and method names. Not strictly essential to keep, but generally good practice for development sake, including developers building on top of this package.
  • PHPUnit code coverage configuration. It's changed in newer versions of PHPUnit, but we need to run on PHPUnit 7.
  • References in the changelog - some of these could be changed, but some would need to stay and changing some could lead to a little confusion.

@GaryJones
Copy link
Member

Is there any interest in having an ignore for the remainder of the items?

A .wokeignore file would need:

Contents of any `.wokeignore` file
CHANGELOG.md
phpunit.xml.dist

WordPress/Helpers/IsUnitTestTrait.php
WordPress/Helpers/WPGlobalVariablesHelper.php

WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php
WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php
WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php
WordPress/Sniffs/PHP/IniSetSniff.php
WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php
WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php
WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php

WordPress/Tests/Security/EscapeOutputUnitTest.1.inc
WordPress/Tests/WP/DeprecatedFunctionsUnitTest.inc
WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.inc

...though obviously that would mean any new valid non-inclusive instances added in the future would also be skipped.

We could also ignore on a current/next line basis (like PHPCS) though that then adds tooling-specific comments throughout our codebase.

@jrfnl
Copy link
Member

jrfnl commented Aug 20, 2023

I'm hoping we all are "woke" (=empathic and humane) enough to actively prevent new occurrences coming into the codebase after this clean up action...

@dingo-d
Copy link
Member Author

dingo-d commented Aug 20, 2023

I'd refrain from using woke as it has super negative connotations. In most cases, it's used to justify being a jerk. And when people are confronted and asked to define or describe what woke means, they can't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants