Repository navigation
Conversation
Adds a basic linting action for PHPCS
Merged
The linting workflow only had a workflow_call trigger and nothing called it, so it never ran. Run it on pull requests and on pushes to master. Pin setup-php to a SHA and move every action to its latest release. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
humanmade/coding-standards 2.x, which the WPCS advisory fix needs, requires PHP 8.2 to run. The ruleset still checks compatibility with PHP 7.2. Co-Authored-By: Claude <noreply@anthropic.com>
3 of 4 tasks
svandragt
reviewed
Oct 16, 2026
Contributor
There was a problem hiding this comment.
Lint now runs and passes. Two problems needed fixing before this could merge:
- PRs from forks get a read-only token. lint-action can't create its check run, and the sticky comment can't post, so both jobs fail on fork PRs whatever the code looks like.
- If a later push reverts
composer.lock, the old package-change comment stays on the PR.
I've pushed fixes for both. Fork PRs now run composer lint without the check run annotations.
This workflow also replaces hmlinter: we now prefer a per-repo GitHub Action over hm-linter. This PR adds .github/hmlinter.yml to turn hm-linter off for this repo, so each PR gets one PHPCS report.
Fork PRs get a read-only GITHUB_TOKEN, so lint-action can't create its check run and the sticky comment can't post. Run plain composer lint on forks instead, and skip the comment there. Delete the package-change comment when a later push leaves composer.lock with no changes. Co-Authored-By: Claude <noreply@anthropic.com>
The Linting workflow now runs phpcs on every PR, and per-repository Actions are preferred over hm-linter. Disable all three hm-linter checks so contributors get one lint report. Co-Authored-By: Claude <noreply@anthropic.com>
svandragt
approved these changes
Oct 16, 2026
Contributor
|
@tomjn I've picked this up. Changes since your last commit:
CI is green. This should merge before #31. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a basic linting action for PHPCS
This PR also turns hm-linter off for this repository, because per-repository Actions are now preferred. The workflow covers everything hm-linter checked here, except annotations on fork PRs and linting branches that have no PR.1
Footnotes
What hm-linter covered, and what replaces it:
phpcs.ruleset.xml: the Linting workflow runs it with the same ruleset..jsor.cssfiles, so nothing is lost. The CSS ininc/admin-bar.phpis a PHP string, which hm-linter never checked. If the plugin gains front-end assets, add both to the workflow.composer lintinstead, so the check still passes or fails, but errors appear only in the job log.masteronly. A branch with no PR gets no lint.composer.lock, so CI matches a localcomposer lint, and new rules arrive through dependency updates.masterlints clean..github/hmlinter.ymldisables all three hm-linter checks. The app stays installed at org level. ↩