From 0491a66435dbb5751c32d0be1550b2c659095f64 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 May 2026 16:26:56 +0000 Subject: [PATCH 1/2] chore(release): 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ecca68..f408644 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bsu/BSUWordPressCS", - "version": "1.2.0", + "version": "1.3.0", "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 302f9f5aa9f76654e62a191b331daf8d2eaa6433 Mon Sep 17 00:00:00 2001 From: "Hagen, Kody J" Date: Thu, 21 May 2026 13:07:18 -0500 Subject: [PATCH 2/2] fix(ruleset): exclude tests and non-functions paths to prevent false positives --- ruleset.xml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ruleset.xml b/ruleset.xml index 2e2cf1f..8a2052a 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -22,11 +22,11 @@ Covers: functions (bsu_), classes (BSU_), constants (BSU_). Hook names and global variables are excluded: - - Hook names: WordPress core hooks (the_content, gallery_style, etc.) cannot be - renamed. We hook into them via add_filter/apply_filters — not defining new ones. - - Global variables: WordPress core globals ($post, $wpdb, $wp_query) are accessed - with the global keyword inside methods. The rule cannot distinguish accessing an - existing global from declaring a new one. + - Hook names: WordPress core hooks cannot be renamed; hooking into them via + add_filter/apply_filters produces unavoidable false positives. + - Global variables: WordPress core globals ($post, $wpdb, $wp_query) accessed + with the global keyword inside methods cannot be distinguished from new + declarations by the rule. --> @@ -36,13 +36,16 @@ + */tests/*\.php$ + */crons/*\.php$ */template-parts/*\.php$ */template-*\.php$ */templateincludes-*\.php$ + */blocks-component-panel-postmeta/*\.php$ + */blocks/*\.php$ */functions/class-bsu\.php$ */Sniffs/*\.php$ */vendor/*\.php$