Skip to content

shell script to generate PHP quality assurance and metrics reports

License

Notifications You must be signed in to change notification settings

bb-drummer/php-qa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP quality assurance and metrics reports

USAGE:

php-qa.sh {arguments and parameters}

DESCRIPTION:

This script generates quality assurance and metrics reports for your PHP project.

It calls several code analysis tools (if available), stores their output in a given directory and wraps it with an index page.

analysing tools

INSTALL

download the script and set it to be executable:

$~/>  wget https://raw.githubusercontent.com/bb-drummer/php-qa/master/php-qa.sh

$~/>  chmod -x php-qa.sh

$~/>  sudo mv php-qa.sh /usr/local/bin/php-qa

to install dependend scripts/tools:

$~/>  sudo su   (or any user having write priveliges to your bin-path)

$~/>  php-qa -setup -v

if not exists, create your directory to store the report files, ex:

$~/>  cd myproject/

$myproject/>  mkdir -p ./public/.reports

Examples:

to run a non-interactive and (nearly) silent report generation with default path settings, simply type:

$~/>  php-qa -n

change the target for the report files:

$~/>  php-qa -n -target "/path/to/my/report/files"

specify a different path to the test-files:

$~/>  php-qa -n -tests "./my/test/files"

specify a different path to the source-files:

$~/>  php-qa -n -src "./module/src"

turn off log-file:

$~/>  php-qa -n --skip-log

or

$~/>  php-qa -n --disable-log

OPTIONS:

on command prompt type php-qa --help to see the list of options

  • -src sourcepath source path to analyse (default './src/')

  • --source-path sourcepath

  • --sourcepath sourcepath

  • -tests testspath path to (phpunit) test configuration (default './tests/')

  • --tests-path testspath

  • --testspath testspath

  • -target targetpath target path to store reports in (default './public/.reports/')

  • --target-path targetpath

  • --targetpath targetpath

  • -setup if set, download and install tools (you need sufficient writing privileges there)

  • --install-dependencies

  • -bin binpath path to executable (default '/usr/local/bin/')

  • --bin-path binpath

  • --binpath binpath

  • -l logfile target path to installer logfile

  • --log-file logfile

  • --logfile logfile

  • -T tmppath installer path for temporary file storage

  • --tmp-path tmppath

  • --tmppath tmppath

  • -n be non-interactive

  • --non-interactive

  • --noninteractive

  • --skip-log do not write to logfile

  • --disable-log

  • -h show help message

  • --help

  • -v verbose output

  • --verbose

DISCLAIMER:

THIS SCRIPT COMES WITH ABSOLUTELY NO WARRANTY !!! USE AT YOUR OWN RISK !!!

please, see LICENSE.txt for further information

CHANGELOG:

  • 2016-09-24 : (bba) initial release

About

shell script to generate PHP quality assurance and metrics reports

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published