From 9929166f2852ec49af371dea616b3c9fb241fa66 Mon Sep 17 00:00:00 2001 From: Ori Hoch Date: Tue, 18 Apr 2017 10:14:31 +0300 Subject: [PATCH] coding standards, scrutinizer-ci for code analysis --- CONTRIBUTING.md | 15 +++++++++++++++ README.md | 1 + 2 files changed, 16 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3da114e..9395936 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,8 @@ The project follows the [Open Knowledge International coding standards](https://github.com/okfn/coding-standards). +All PHP Code should conform to [PHP-FIG](http://www.php-fig.org/psr/) accepted PSRs. + ## Getting Started @@ -12,12 +14,25 @@ $ composer install $ composer test ``` + ## Phpunit - for unit tests Phpunit is used for unit tests, you can find the tests under tests directory Running Phpunit directly: `vendor/bin/phunit` + ## Coveralls - for coverage +[![Coveralls](http://img.shields.io/coveralls/frictionlessdata/datapackage-php.svg?branch=master)](https://coveralls.io/r/frictionlessdata/datapackage-php?branch=master) + when running `composer test` phpunit generates coverage report in coverage-clover.xml - this is then sent to Coveralls via Travis. + + +## Scrutinizer-ci - for code analysis + +[Scrutinizer-ci](https://scrutinizer-ci.com/) integrates with GitHub and runs on commits. + +It does static code analysis and ensure confirmation to the coding stnadards. + +At the moment, the integration with frictionlessdata repo is not working, you can setup a Scrutinizer-ci account for your fork and run against that. diff --git a/README.md b/README.md index cb077d1..c237089 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Travis](https://travis-ci.org/frictionlessdata/datapackage-php.svg?branch=master)](https://travis-ci.org/frictionlessdata/datapackage-php) [![Coveralls](http://img.shields.io/coveralls/frictionlessdata/datapackage-php.svg?branch=master)](https://coveralls.io/r/frictionlessdata/datapackage-php?branch=master) +[![Scrutinizer-ci](https://scrutinizer-ci.com/g/OriHoch/datapackage-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/OriHoch/datapackage-php/) [![Packagist](https://img.shields.io/packagist/dm/frictionlessdata/datapackage.svg)](https://packagist.org/packages/frictionlessdata/datapackage) [![SemVer](https://img.shields.io/badge/versions-SemVer-brightgreen.svg)](http://semver.org/) [![Gitter](https://img.shields.io/gitter/room/frictionlessdata/chat.svg)](https://gitter.im/frictionlessdata/chat)