From 7d33714f88f7075fcc7d8c517995c6a810e851a1 Mon Sep 17 00:00:00 2001 From: Jay McPartland Date: Tue, 30 Sep 2025 14:20:38 +0100 Subject: [PATCH] Move DocCommentLineLength Sniff to Docs ruleset To aid test discovery, the Docs ruleset has been renamed from 'BigBite-Docs' to 'BigBiteDocs'. --- BigBite/ruleset.xml | 4 ++-- .../DocCommentLineLengthStandard.xml | 0 .../Commenting/DocCommentLineLengthSniff.php | 4 ++-- BigBiteDocs/Tests/AbstractSniffUnitTest.php | 18 ++++++++++++++++++ .../DocCommentLineLengthUnitTest.1.inc | 0 .../DocCommentLineLengthUnitTest.1.inc.fixed | 0 .../DocCommentLineLengthUnitTest.2.inc | 8 ++++---- .../DocCommentLineLengthUnitTest.3.inc | 8 ++++---- .../DocCommentLineLengthUnitTest.php | 8 ++++---- {BigBite-Docs => BigBiteDocs}/ruleset.xml | 2 +- Tests/bootstrap.php | 3 ++- composer.json | 11 +++++++---- phpunit.xml.dist | 3 +++ 13 files changed, 47 insertions(+), 22 deletions(-) rename {BigBite => BigBiteDocs}/Docs/Commenting/DocCommentLineLengthStandard.xml (100%) rename {BigBite => BigBiteDocs}/Sniffs/Commenting/DocCommentLineLengthSniff.php (98%) create mode 100644 BigBiteDocs/Tests/AbstractSniffUnitTest.php rename {BigBite => BigBiteDocs}/Tests/Commenting/DocCommentLineLengthUnitTest.1.inc (100%) rename {BigBite => BigBiteDocs}/Tests/Commenting/DocCommentLineLengthUnitTest.1.inc.fixed (100%) rename {BigBite => BigBiteDocs}/Tests/Commenting/DocCommentLineLengthUnitTest.2.inc (61%) rename {BigBite => BigBiteDocs}/Tests/Commenting/DocCommentLineLengthUnitTest.3.inc (50%) rename {BigBite => BigBiteDocs}/Tests/Commenting/DocCommentLineLengthUnitTest.php (92%) rename {BigBite-Docs => BigBiteDocs}/ruleset.xml (94%) diff --git a/BigBite/ruleset.xml b/BigBite/ruleset.xml index 33f0abf..d3f4ea9 100644 --- a/BigBite/ruleset.xml +++ b/BigBite/ruleset.xml @@ -1,5 +1,5 @@ - + @@ -71,7 +71,7 @@ - + diff --git a/BigBite/Docs/Commenting/DocCommentLineLengthStandard.xml b/BigBiteDocs/Docs/Commenting/DocCommentLineLengthStandard.xml similarity index 100% rename from BigBite/Docs/Commenting/DocCommentLineLengthStandard.xml rename to BigBiteDocs/Docs/Commenting/DocCommentLineLengthStandard.xml diff --git a/BigBite/Sniffs/Commenting/DocCommentLineLengthSniff.php b/BigBiteDocs/Sniffs/Commenting/DocCommentLineLengthSniff.php similarity index 98% rename from BigBite/Sniffs/Commenting/DocCommentLineLengthSniff.php rename to BigBiteDocs/Sniffs/Commenting/DocCommentLineLengthSniff.php index 8317022..9e91996 100644 --- a/BigBite/Sniffs/Commenting/DocCommentLineLengthSniff.php +++ b/BigBiteDocs/Sniffs/Commenting/DocCommentLineLengthSniff.php @@ -2,12 +2,12 @@ /** * BigBite Coding Standards. * - * @package BigBiteCS\BigBite + * @package BigBiteCS\BigBiteDocs * @link https://github.com/bigbite/phpcs-config * @license https://opensource.org/licenses/MIT MIT */ -namespace BigBiteCS\BigBite\Sniffs\Commenting; +namespace BigBiteCS\BigBiteDocs\Sniffs\Commenting; use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Sniffs\Sniff; diff --git a/BigBiteDocs/Tests/AbstractSniffUnitTest.php b/BigBiteDocs/Tests/AbstractSniffUnitTest.php new file mode 100644 index 0000000..63a7e16 --- /dev/null +++ b/BigBiteDocs/Tests/AbstractSniffUnitTest.php @@ -0,0 +1,18 @@ + - + diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index 2582e08..de69c95 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -56,7 +56,8 @@ } $bigbite_standards = array( - 'BigBite' => true, + 'BigBite' => true, + 'BigBiteDocs' => true, ); $all_standards = PHP_CodeSniffer\Util\Standards::getInstalledStandards(); diff --git a/composer.json b/composer.json index 0862920..28628fb 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "prefer-stable" : true, "minimum-stability": "dev", - "non-feature-branches": ["chore/*", "hotfix/*"], + "non-feature-branches": ["chore/*", "hotfix/*", "fix/*"], "authors": [ { "name": "Paul Taylor", @@ -66,16 +66,19 @@ "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs ." ], "test": [ - "@php ./vendor/bin/phpunit --filter BigBite ./vendor/squizlabs/php_codesniffer/tests/AllTests.php" + "@php ./vendor/bin/phpunit --filter BigBite ./vendor/squizlabs/php_codesniffer/tests/AllTests.php", + "@php ./vendor/bin/phpunit --filter BigBiteDocs ./vendor/squizlabs/php_codesniffer/tests/AllTests.php" ], "analyse": [ "./vendor/bin/phpstan" ], "is-complete": [ - "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./BigBite" + "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./BigBite", + "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./BigBiteDocs" ], "is-complete-strict": [ - "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness ./BigBite" + "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness ./BigBite", + "@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness ./BigBiteDocs" ], "all-checks": [ "@lint", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 196340e..c30f79f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,5 +11,8 @@ ./BigBite/Tests/ + + ./BigBiteDocs/Tests/ +