Set up automated code quality tool
Closed this issue · 3 comments
e.g.
Sonarqube https://www.sonarqube.org/
Sensiolabs Insight https://insight.sensiolabs.com/docs/github/analyze-a-php-library-on-github.html
Scrutinizer https://scrutinizer-ci.com/
CodeClimate https://docs.codeclimate.com/docs/open-source-free
@caciobanu @trq - if either of you have a preference for analysis please let me know.
I think it would be good to:
- Have a badge to motivate us to improve the quality of the library;
- Enable build failures if a certain quality threshold is not met;
CodeClimate appears to have good OSS support and documentation (e.g. all the resources here). It's used by Laravel and CakePHP.
Scrutinizer includes Johannes Schmitt (JMS serializer) on their team. It's used by Doctrine ODM and Doctrine ORM (amongst others). Actually, looks like CakePHP uses it as well.
Also Doctrine ODM uses travis builds with phpstan
(here) and phpcs
(here).
I suppose we could start by configuring phpstan
and phpcs
to fail builds?
I think Scrutinizer is a great fit for a php package as it supports a lot of insights out of the box.
Scrutinzer is fine for me also.