Skip to content

Commit

Permalink
Scrutinizer-CI.com support.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-orlando committed Jan 9, 2016
1 parent ae8dd7c commit 4068c33
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 5 deletions.
1 change: 1 addition & 0 deletions .scrutinizer.yml
4 changes: 4 additions & 0 deletions documents/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[travis]: https://travis-ci.org/servo-php/fluidxml
[travis-badge]: https://travis-ci.org/servo-php/fluidxml.svg?branch=master
[scrutinizer]: https://scrutinizer-ci.com/g/servo-php/fluidxml/?branch=master
[scrutinizer-badge]: https://scrutinizer-ci.com/g/servo-php/fluidxml/badges/quality-score.png?b=master
[apis]: https://github.com/servo-php/fluidxml/blob/master/documents/APIs.md
[gettingstarted]: https://github.com/servo-php/fluidxml/blob/master/documents/Getting-Started.md
[examples]: https://github.com/servo-php/fluidxml/blob/master/documents/Examples.php
Expand All @@ -16,9 +18,11 @@
[thankyou]: https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Heart_corazón.svg/2000px-Heart_corazón.svg.png

[![Build Status][travis-badge]][travis]
[![Scrutinizer][scrutinizer-badge]][scrutinizer]

[![Donate][donate-button]][donate-link]


## Changelog

**1.12** (2016-01-08):
Expand Down
60 changes: 60 additions & 0 deletions support/scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
build:
environment:
php:
version: 7.0.0
tests:
override:
-
command: ./support/tools/init && ./support/tools/test && ./support/tools/coverage clover-code-coverage
coverage:
file: 'sandbox/code-coverage-report/clover.xml'
format: 'php-clover'
filter:
paths:
- source/
excluded_paths:
- sandbox/
- specs/
- support/
checks:
php:
code_rating: true
duplication: true
one_class_per_file: false
no_debug_code: true
no_commented_out_code: false
uppercase_constants: true
use_self_instead_of_fqcn: true
optional_parameters_at_the_end: true
encourage_single_quotes: true
classes_in_camel_caps: true
properties_in_camelcaps: true
parameters_in_camelcaps: true
missing_arguments: false
coding_style:
php:
indentation:
general:
size: 8
braces:
classes_functions:
class: new-line
function: new-line
closure: end-of-line
if:
opening: end-of-line
for:
opening: end-of-line
while:
opening: end-of-line
do_while:
opening: end-of-line
switch:
opening: end-of-line
try:
opening: end-of-line
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower
21 changes: 16 additions & 5 deletions support/tools/coverage
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,29 @@ fi

cd sandbox

peridot_arguments='-c "../support/peridot.php" -r html-code-coverage -g "*.php" "../specs/"'
reporter=html-code-coverage

if chkcmd 'phpdbg'; then
if test $# -eq 1; then
reporter=$1
fi

peridot_arguments="-c \"../support/peridot.php\" -r $reporter -g \"*.php\" \"../specs/\""

if php -m | grep -i 'xdebug' > /dev/null; then
echo ' info: using Xdebug.'

eval "peridot $peridot_arguments"
elif chkcmd 'phpdbg'; then
echo ' info: using phpdbg.'
echo
echo ' type: run'
echo ' quit'
echo

eval "phpdbg -e \"$(which peridot)\" $peridot_arguments"
else
echo ' info: "phpdbg" command not found.'

eval "peridot $peridot_arguments"
echo ' error: no profiling tool found.'
exit 1
fi

chkcmd 'open' && open "code-coverage-report/index.html"

0 comments on commit 4068c33

Please sign in to comment.