Skip to content

Harden PR quality gates and complete PHPCS alignment#20

Merged
bradvin merged 17 commits into
mainfrom
develop
Feb 21, 2026
Merged

Harden PR quality gates and complete PHPCS alignment#20
bradvin merged 17 commits into
mainfrom
develop

Conversation

@bradvin
Copy link
Copy Markdown
Owner

@bradvin bradvin commented Feb 21, 2026

Summary

This merge brings CI hardening, lint workflow cleanup, PHPCS compliance fixes, and supporting docs from develop into main.

  • Diff scope: 27 files changed, 330 insertions, 171 deletions (origin/main..origin/develop).
  • Includes commits from 884e885 through 187d984 (CI/lint hardening series).

What Changed

1. CI and quality gates

  • Added wp-content/plugins/clawpress/.github/workflows/ci.yml.
  • Consolidated PHP checks into one job: composer test + composer lint.
  • Added JS lint job for changed files only.
  • Optimized JS job to skip npm ci/lint when no JS files changed (dorny/paths-filter).

2. Changed-file lint tooling

  • Added wp-content/plugins/clawpress/bin/lint-changed.
  • Improved base branch handling (fetches from BASE_REF correctly).
  • Uses safe file handling for changed-file detection and currently lints changed JS files.

3. Scripts and developer workflow

  • Updated wp-content/plugins/clawpress/package.json scripts.
  • test delegates to composer test.
  • Added/standardized changed-file JS lint script (lint:changed:js).
  • Added wp-content/plugins/clawpress/.github/pull_request_template.md validation checklist:
  • composer test
  • composer lint
  • npm run lint:changed:js

4. PHPCS and code quality fixes

  • Added ideas/ exclusion in wp-content/plugins/clawpress/phpcs.xml.dist.
  • Fixed docblock @param issues across command handlers.
  • Resolved remaining PHPCS errors (Yoda condition + short ternary).
  • Added targeted ignore for WordPress.DB.SlowDBQuery.slow_db_query_meta_key in includes/helpers/class-user-helper.php.

5. Docs and artifacts

  • Added lint process docs:
  • docs/lint-baseline.md
  • docs/lint-debt-reduction-plan.md
  • Updated translation template:
  • languages/clawpress.pot

Net Effect

  • PRs are now blocked by PHP unit/lint checks and changed-file JS lint.
  • CI runtime is improved by skipping JS setup when no JS files changed.
  • Lint baseline and workflow are formalized, and current PHPCS run is clean under the updated rules.

@bradvin bradvin requested a review from foo-bender February 21, 2026 14:23
Copy link
Copy Markdown
Collaborator

@foo-bender foo-bender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed end-to-end. CI hardening and lint workflow updates look solid, and local verification passed (composer test + composer lint) on the PR branch. No blocking issues found.

@bradvin bradvin merged commit 222a373 into main Feb 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants