Skip to content

Add phpcs module for PHP CodeSniffer (v2.2.6)#42

Merged
AntonioCS merged 1 commit intomainfrom
feature/phpcs-module
Jan 4, 2026
Merged

Add phpcs module for PHP CodeSniffer (v2.2.6)#42
AntonioCS merged 1 commit intomainfrom
feature/phpcs-module

Conversation

@AntonioCS
Copy link
Owner

Summary

  • New standalone phpcs module for PHP CodeSniffer
  • Removes old php/phpcs and php/phpcbf targets from php module

New Targets

  • php/phpcs/check - Run PHP CodeSniffer to detect coding standard violations
  • php/phpcs/fix - Run PHP Code Beautifier to auto-fix violations
  • php/phpcs/staged - Run PHP CodeSniffer on staged PHP files only

Configuration Options

  • phpcs_parallel - Number of parallel processes
  • phpcs_cache - Enable caching
  • phpcs_progress - Show progress dots
  • phpcs_report - Report format (json, checkstyle, junit, etc.)

Runtime Variables

  • phpcs_files= - Specify files/directories to check
  • phpcs_args= - Pass extra arguments

Documentation

  • Added pitfall about ## comments in define...endef blocks being literal text (not comments)

Test Plan

  • All phpcs module tests pass (16 assertions)
  • All existing tests still pass (198/199 - 1 pre-existing flaky test)

- New standalone module with targets:
  - php/phpcs/check - detect coding standard violations
  - php/phpcs/fix - auto-fix violations with phpcbf
  - php/phpcs/staged - check staged PHP files only
- Config options: phpcs_parallel, phpcs_cache, phpcs_progress, phpcs_report
- Runtime variables: phpcs_files=, phpcs_args=
- Remove old php/phpcs and php/phpcbf targets from php module
- Add pitfall documentation about ## comments in define blocks
@AntonioCS AntonioCS merged commit 5d950d6 into main Jan 4, 2026
1 check passed
@AntonioCS AntonioCS deleted the feature/phpcs-module branch January 4, 2026 09:04
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.

1 participant