From b2cd9296c385995fc691706af402173b2370b746 Mon Sep 17 00:00:00 2001 From: Greg Sherwood Date: Fri, 31 Jan 2020 15:32:41 +1100 Subject: [PATCH] Remove the MySource standard Fixes squizlabs/PHP_CodeSniffer 2471 Related to 6 --- .github/CONTRIBUTING.md | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 6 +- .github/labeler.yml | 4 - .github/workflows/validate.yml | 1 - .../Sniffs/CSS/BrowserSpecificStylesSniff.php | 126 ------- .../Channels/DisallowSelfActionsSniff.php | 164 -------- .../Sniffs/Channels/IncludeOwnSystemSniff.php | 137 ------- .../Sniffs/Channels/IncludeSystemSniff.php | 353 ------------------ .../Sniffs/Channels/UnusedSystemSniff.php | 180 --------- .../Commenting/FunctionCommentSniff.php | 123 ------ .../MySource/Sniffs/Debug/DebugCodeSniff.php | 94 ----- .../Sniffs/Debug/FirebugConsoleSniff.php | 103 ----- .../Sniffs/Objects/AssignThisSniff.php | 120 ------ .../Objects/CreateWidgetTypeCallbackSniff.php | 257 ------------- .../Sniffs/Objects/DisallowNewWidgetSniff.php | 98 ----- .../Sniffs/PHP/AjaxNullComparisonSniff.php | 142 ------- .../Sniffs/PHP/EvalObjectFactorySniff.php | 153 -------- .../Sniffs/PHP/GetRequestDataSniff.php | 145 ------- .../Sniffs/PHP/ReturnFunctionValueSniff.php | 102 ----- .../Sniffs/Strings/JoinStringsSniff.php | 115 ------ .../CSS/BrowserSpecificStylesUnitTest.css | 13 - .../CSS/BrowserSpecificStylesUnitTest.php | 53 --- .../Channels/DisallowSelfActionsUnitTest.inc | 51 --- .../Channels/DisallowSelfActionsUnitTest.php | 58 --- .../Tests/Channels/IncludeSystemUnitTest.inc | 112 ------ .../Tests/Channels/IncludeSystemUnitTest.php | 65 ---- .../Tests/Channels/UnusedSystemUnitTest.inc | 67 ---- .../Tests/Channels/UnusedSystemUnitTest.php | 60 --- .../Commenting/FunctionCommentUnitTest.inc | 101 ----- .../Commenting/FunctionCommentUnitTest.php | 59 --- .../Tests/Debug/DebugCodeUnitTest.inc | 4 - .../Tests/Debug/DebugCodeUnitTest.php | 56 --- .../Tests/Debug/FirebugConsoleUnitTest.js | 8 - .../Tests/Debug/FirebugConsoleUnitTest.php | 66 ---- .../Tests/Objects/AssignThisUnitTest.js | 20 - .../Tests/Objects/AssignThisUnitTest.php | 63 ---- .../CreateWidgetTypeCallbackUnitTest.js | 186 --------- .../CreateWidgetTypeCallbackUnitTest.php | 62 --- .../Objects/DisallowNewWidgetUnitTest.inc | 6 - .../Objects/DisallowNewWidgetUnitTest.php | 53 --- .../Tests/PHP/AjaxNullComparisonUnitTest.inc | 182 --------- .../Tests/PHP/AjaxNullComparisonUnitTest.php | 60 --- .../Tests/PHP/EvalObjectFactoryUnitTest.inc | 26 -- .../Tests/PHP/EvalObjectFactoryUnitTest.php | 57 --- .../Tests/PHP/GetRequestDataUnitTest.inc | 30 -- .../Tests/PHP/GetRequestDataUnitTest.php | 61 --- .../Tests/PHP/ReturnFunctionValueUnitTest.inc | 9 - .../Tests/PHP/ReturnFunctionValueUnitTest.php | 57 --- .../Tests/Strings/JoinStringsUnitTest.js | 18 - .../Tests/Strings/JoinStringsUnitTest.php | 67 ---- src/Standards/MySource/ruleset.xml | 18 - tests/Core/Ruleset/ConstructorTest.php | 13 +- 52 files changed, 10 insertions(+), 4176 deletions(-) delete mode 100644 src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php delete mode 100644 src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php delete mode 100644 src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php delete mode 100644 src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php delete mode 100644 src/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php delete mode 100644 src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php delete mode 100644 src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.css delete mode 100644 src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.js delete mode 100644 src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Objects/AssignThisUnitTest.js delete mode 100644 src/Standards/MySource/Tests/Objects/AssignThisUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.js delete mode 100644 src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.php delete mode 100644 src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.php delete mode 100644 src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.php delete mode 100644 src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.php delete mode 100644 src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.inc delete mode 100644 src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.php delete mode 100644 src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js delete mode 100644 src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.php delete mode 100644 src/Standards/MySource/ruleset.xml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e4f41efd31..20b695a36b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -31,7 +31,7 @@ already and if so, comment in that issue if you have additional information, ins Before reporting a bug, you should check what sniff an error is coming from. Running `phpcs` with the `-s` flag will show the name of the sniff for each error. -If the error code starts with anything other than `Generic`, `MySource`, `PEAR`, `PSR1`, `PSR2`, `PSR12`, `Squiz` or `Zend`, +If the error code starts with anything other than `Generic`, `PEAR`, `PSR1`, `PSR2`, `PSR12`, `Squiz` or `Zend`, the error is likely coming from an external PHP_CodeSniffer standard. **Please report bugs for externally maintained sniffs to the appropriate repository.** diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a8652749d4..1c46ed4644 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,9 +10,9 @@ assignees: '' - - - - - diff --git a/tests/Core/Ruleset/ConstructorTest.php b/tests/Core/Ruleset/ConstructorTest.php index eaea6c239e..3700edd7fd 100644 --- a/tests/Core/Ruleset/ConstructorTest.php +++ b/tests/Core/Ruleset/ConstructorTest.php @@ -116,13 +116,12 @@ public static function dataStandardsAreRegisteredWithAutoloader() { $basePath = dirname(dirname(dirname(__DIR__))).DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'Standards'.DIRECTORY_SEPARATOR; $defaultPaths = [ - $basePath.'MySource' => 'MySource', - $basePath.'PEAR' => 'PEAR', - $basePath.'PSR1' => 'PSR1', - $basePath.'PSR12' => 'PSR12', - $basePath.'PSR2' => 'PSR2', - $basePath.'Squiz' => 'Squiz', - $basePath.'Zend' => 'Zend', + $basePath.'PEAR' => 'PEAR', + $basePath.'PSR1' => 'PSR1', + $basePath.'PSR12' => 'PSR12', + $basePath.'PSR2' => 'PSR2', + $basePath.'Squiz' => 'Squiz', + $basePath.'Zend' => 'Zend', ]; $data = [