colours/codebeast

Composer package used to generate git hooks for automating code quality control

dev-master 2019-07-31 14:14 UTC

This package is auto-updated.

Last update: 2024-04-29 04:12:44 UTC


README

Purpose

Package is used to automate code quality control during the development process and git workflow. It installs dependencies such as: phpcs, phpcbf, phpmd and configures pre-commit git hook according to user preferences. Pre-commit git hook is executed right before the commit is created, thus the code, added to commit is checked against syntax errors, violation of code standards and violation of some structural standards (phpmd).

Usage

To configure git hook and generate settings file, use following command:

vendor/bin/codebeast configure

Configure command generates pre-commit.settings file, which can be added to the repository, so every team member have the same settings within the project. Configure command also suggest to install the hook.

To install the hook follow the wizard of 'configure' command or run following:

vendor/bin/codebeast install

Install command sets the path (absolute) to your vendor folder and creates pre-commit hook file in target .git directory.

Configuration

Package is shipped with phpmd configuration in minimal.xml file. You can use your own phpmd config, by creating settings file according to documentation. Rest of the configuration is done as a part of the wizard process during 'configure' command execution.