mainlycode/code-quality

Project for standardising and enforcing coding standards

This package's canonical repository appears to be gone and the package has been frozen as a result.

0.1.1 2018-03-03 10:40 UTC

This package is auto-updated.

Last update: 2019-11-30 11:25:01 UTC


README

Project for standardising and enforcing coding standards.

Components

  • phpro/grumphp: runs all code quality check on a pre commit git hook
  • phpunit/phpunit: runs unit tests and functional tests (when available) in your project
  • simgroep/coding-standards: defines the coding standards used by SIMgroep
  • sensiolabs/security-checker: checks your composer.lock for known security issues

Installation

composer require --dev mainlycode/code-quality

cp vendor/mainlycode/code-quality/grumphp.yml.dist ./grumphp.yml

The commit hook for GrumPHP is automatically installed on composer require.

Usage

  1. The code quality checks are run every time you commit.
  2. You can run the checks manually with:
./bin/grumphp run

Usage in Continuous Integration

You can easily use the code quality checkers on your CI (Jenkins/GitLab CI) by added this line:

./bin/grumphp run --no-ansi --no-interaction