From 6e107c0dc5e68f728ce496819ed3ff0d08c4b947 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 May 2026 18:15:30 +0000 Subject: [PATCH 1/2] chore(release): 1.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f408644..084c689 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bsu/BSUWordPressCS", - "version": "1.3.0", + "version": "1.3.1", "description": "Custom PHPCS sniffs for BSU WordPress standards", "author": "BSU|NTC Web Services", "license": "Copyright Web Services, Bemidji State University - All Rights Reserved. Unauthorized copying of any files or code in this package, via any medium is strictly prohibited.", From 7f07b7898912e445674a86e14c52d5bf5790b7a8 Mon Sep 17 00:00:00 2001 From: "Hagen, Kody J" Date: Tue, 2 Jun 2026 10:07:43 -0500 Subject: [PATCH 2/2] feat(sniffs): allow @phpstan directives in single-line comments PHPStan ignore directives require // syntax. Add @phpstan as an exempted pattern in SingleLineCommentSniff alongside phpcs: and @codeCoverageIgnore. Update the test fixture with @phpstan examples that are not flagged. --- Sniffs/Commenting/SingleLineCommentSniff.php | 3 ++- Tests/Commenting/SingleLineCommentUnitTest.inc | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Sniffs/Commenting/SingleLineCommentSniff.php b/Sniffs/Commenting/SingleLineCommentSniff.php index c5f464b..3d92ce2 100644 --- a/Sniffs/Commenting/SingleLineCommentSniff.php +++ b/Sniffs/Commenting/SingleLineCommentSniff.php @@ -90,7 +90,8 @@ public function process( File $phpcs_file, $stack_position ) { */ if ( strpos( $check_content, 'phpcs:' ) !== false || - strpos( $check_content, '@codeCoverageIgnore' ) !== false + strpos( $check_content, '@codeCoverageIgnore' ) !== false || + strpos( $check_content, '@phpstan' ) !== false ) { return; diff --git a/Tests/Commenting/SingleLineCommentUnitTest.inc b/Tests/Commenting/SingleLineCommentUnitTest.inc index d4ad822..8c9caac 100644 --- a/Tests/Commenting/SingleLineCommentUnitTest.inc +++ b/Tests/Commenting/SingleLineCommentUnitTest.inc @@ -15,6 +15,10 @@ $a = 1; // trailing comment. +// @phpstan-ignore-next-line identifier -- reason + +// @phpstan-ignore identifier -- reason + /* * This spans * multiple lines.