From 26059e7f12152be4867055c4057ed0acd7502a18 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Thu, 23 Apr 2026 03:27:55 +0000 Subject: [PATCH] config: add phpcs.xml to exclude class-naming convention sniff Created phpcs.xml ruleset that inherits from WordPress-Core but excludes WordPress.Files.FileName.InvalidClassFileName sniff. This is an architectural choice: PRAutoBlogger uses short class names (class-logger.php) instead of fully-qualified names (class-prautoblogger-logger.php) for better readability. Updated CI workflow to use phpcs.xml instead of --standard=WordPress-Core. Remaining violations (56 wpdb + 2 docblock) are still addressed with inline phpcs:ignore pragmas with documented reasons. --- .github/workflows/ci.yml | 2 +- phpcs.xml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 phpcs.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e0fcc4..b1f00a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: "phpcsstandards/phpcsextra:^1.0" - name: Run PHPCS run: | - phpcs --standard=WordPress-Core \ + phpcs --standard=phpcs.xml \ --extensions=php \ --ignore=vendor/*,tests/*,node_modules/* \ --warning-severity=0 \ diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..8c2b391 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,17 @@ + + + Custom PHPCS ruleset for PRAutoBlogger based on WordPress-Core + + + + + + + + + + + + +