2017 © Pedro Peláez
 

library drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

image

jover_be/drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

  • Tuesday, April 18, 2017
  • by jover
  • Repository
  • 2 Watchers
  • 0 Stars
  • 154 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

Drupal Code Check

A Git pre-commit hook to check Drupal Coding Standards and more., (*1)

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*2)

Description

This Git pre-commit hook will be active on your Composer based Drupal project., (*3)

Things which will be checked in the pre-commit hook:, (*4)

  • Syntax checking using PHP Linter
  • Automatically try to match code style via PHP Code Sniffer Beautifier and Fixer
  • Coding standards checking using PHP Code Sniffer
  • Blacklisted strings checking/validation

Note that files of the following origins are not checked:, (*5)

  • Drupal Core
  • Contributed Modules
  • Contributed Libraries
  • Contributed Themes
  • Contributed Profiles

Getting started

Prerequisites

  • Composer
  • Composer based Drupal project
  • PHP 5.4 or higher

Installation

Add this project as a composer dependency on your Composer based Drupal project., (*6)

composer require jover_be/drupal-code-check

And don't forget to update..., (*7)

composer update jover_be/drupal-code-check

In order to activate the Git Hooks, update your composer.json file like following:, (*8)

{
    "scripts": {
        "post-install-cmd": [
            "jover_be\\drupal_code_check\\GitHooks::create"
        ],
        "post-update-cmd": [
            "jover_be\\drupal_code_check\\GitHooks::create",
        ]
    }
}

Development requirement

In case you want to install it as a development requirement (_require-dev_), make use of the project neronmoon/scriptsdev in order to execute the scripts only in case your project was installed in development mode., (*9)

composer require --dev neronmoon/scriptsdev
composer require --dev jover_be/drupal-code-check

And instead, you should be using the scripts-dev part as described by, (*10)

{
    "extra": {
        "scripts-dev": {
            "post-install-cmd": [
                "jover_be\\drupal_code_check\\GitHooks::create"
            ],
            "post-update-cmd": [
                "jover_be\\drupal_code_check\\GitHooks::create",
            ]
        }
    }
}

Author

jover.be, (*11)

License

This project is licensed under the MIT License - see the LICENSE file for details., (*12)

The Versions

18/04 2017

dev-master

9999999-dev https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

18/04 2017

v0.0.13

0.0.13.0 https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

18/04 2017

v0.0.12

0.0.12.0 https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

10/01 2017

v0.0.11

0.0.11.0 https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

19/12 2016

v0.0.10

0.0.10.0 https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

19/12 2016

v0.0.9

0.0.9.0 https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

16/12 2016

v0.0.8

0.0.8.0 https://github.com/jover/drupal-code-check

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

16/12 2016

v0.0.7

0.0.7.0 https://github.com/jover/drupal-code-check

A Git code-check hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

16/12 2016

v0.0.6

0.0.6.0 https://github.com/jover/drupal-code-check

A Git code-check hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

git phpcs pre-commit drupal standards code review

16/12 2016

v0.0.5

0.0.5.0 https://github.com/jover/drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

phpcs pre-commit drupal standards code review

16/12 2016

v0.0.4

0.0.4.0 https://github.com/jover/drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

phpcs pre-commit drupal standards code review

12/12 2016

v0.0.3

0.0.3.0 https://github.com/jover/drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

phpcs pre-commit drupal standards code review

16/11 2016

v0.0.2

0.0.2.0 https://github.com/jover/drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

phpcs pre-commit drupal standards code review

14/11 2016

v0.0.1

0.0.1.0 https://github.com/jover/drupal-pre-commit

A Git pre-commit hook to check Drupal Coding Standards and more.

  Sources   Download

MIT

The Requires

 

phpcs pre-commit drupal standards code review