drupol/backdrop-conventions

Backdrop conventions for coding.

0.1.5 2019-06-04 13:06 UTC

README

This tool will check your code against Backdrop's coding standard.

It's based on GrumPHP and comes with a default configuration tailored for Backdrop development.

The following checks are triggered:

Installation

composer require drupol/backdrop-conventions --dev

If you're not using GrumPHP

Manually add to your composer.json file:

    "extra": {
        "grumphp": {
            "config-default-path": "vendor/drupol/backdrop-conventions/config/backdrop/grumphp.yml"
        }
    }

If you're using GrumPHP already

Edit the file grumphp.yml.dist or grumphp.yml and add on the top it:

imports:
  - { resource: vendor/drupol/backdrop-conventions/config/backdrop/grumphp.yml }

To add an extra Grumphp task:

imports:
  - { resource: vendor/drupol/backdrop-conventions/config/backdrop7/grumphp.yml }

parameters:
  extensions:
    - drupol\BackdropConventions\GrumphpTasksExtension
  extra_tasks:
    phpunit:
      always_execute: false

In conjunction with extra_tasks, use skip_tasks to exclude default tasks if needed.

Usage

./vendor/bin/grumphp run

Contributing

Feel free to contribute to this library by sending Github pull requests. I'm quite reactive :-)