What it does

This action runs PHP CodeSniffer to that tokenizes PHP, JavaScript and CSS files to detect and fix violations of a defined set of coding standards.

How it works

This action launches a Docker container using the official PHP image with preinstalled PHP CodesSniffer and runs phpcbf on the source code pulled from the repository to the pipeline filesystem.

Action preview

screenshot

PHP CodeSniffer Action Features

  • Available coding standards: MySource, PEAR, PHPCS, PSR1, PSR2, Squiz and Zend
  • More options: here
  • The action can be ran in two modes: analyze code or analyze and fix issues automatically. The fixes will be applied only in the source code pulled into the pipeline filesystem - they won’t be pushed to the repository
  • The action supports conditional execution: it can be run on each execution, only if there are changes in the repository or specific paths since last execution or if an environment variable has a specific value
PHP CodeSniffer

Do more with PHP CodeSniffer

Buddy allows you to instantly connect PHP CodeSniffer with 100+ actions to automate your development and build better apps faster.

1 - 9 (of 108)