Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

To show PHP CodeSniffer analysis results, print the analysis results with report format checkstyle to the build log.

Using PHP CodeSniffer

PHP CodeSniffer supports the report format checkstyle which is supported by Code Review Assistant out of the box.

Example for Bamboo:

#!/bin/bash
php phpcs.phar --basepath=${bamboo.build.working.directory} \ 
    --report=checkstyle \
    --report-file=phpcodesniffer.xml .
cat phpcodesniffer.xml || echo "No PHP CodeSniffer report generated"

  • No labels