Skip to content

[FEATURE] Add PHP_CodeSniffer (phpcs) CI snippet#26

Merged
prog-time merged 3 commits into
mainfrom
issues-11
Apr 22, 2026
Merged

[FEATURE] Add PHP_CodeSniffer (phpcs) CI snippet#26
prog-time merged 3 commits into
mainfrom
issues-11

Conversation

@prog-time
Copy link
Copy Markdown
Owner

Summary

Adds a PHP_CodeSniffer (phpcs) CI snippet to the linters category — closing the PHP linter gap. PHPStan (static analysis) already ships; phpcs covers style / structural conventions (PSR-12, custom rulesets). The snippet checks four config variants (phpcs.xml / .dist / .phpcs.xml / .phpcs.xml.dist), runs vendor/bin/phpcs with a fallback to the global binary, and uses shivammathur/setup-php@v2 + composer cache in CI.

Changes

  • issues-11|add phpcs CI snippetscripts/shell/linters/phpcs.sh, scripts/CI/linters/phpcs.yml, CI/linters/phpcs.yml
  • issues-11|add BATS tests for phpcs — 3 tests (missing config, clean, violation)
  • issues-11|document phpcs in README — Snippets table, detailed Linters section, project structure tree

Test plan

  • bats tests/linters/phpcs.bats — 3/3 pass
  • yamllint clean on both new YAML files
  • CI green on this PR

Closes #11

@prog-time prog-time merged commit 500b987 into main Apr 22, 2026
5 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.

[FEATURE] Add PHP_CodeSniffer (phpcs) CI snippet

1 participant