Skip to content

Instantly share code, notes, and snippets.

View lolandese's full-sized avatar
💭
My public code is on Drupal.org and Backdrop CMS

Martin Postma lolandese

💭
My public code is on Drupal.org and Backdrop CMS
View GitHub Profile
@lolandese
lolandese / Drupal git pre-commit hook.md
Last active October 16, 2019 09:00 — forked from skwashd/README.md
Drupal git pre-commit hook

Referrer: https://www.drupal.org/docs/develop/local-server-setup/linux-development-environments/set-up-a-local-development-drupal#githooks

This pre-commit hook is designed to be used for Drupal 7 and 8 sites.

Download the pre-commit file. Save it as .git/hook/pre-commit in your git repo. You need to ensure that the file is executable.

If you want this to be added to all new projects automatically, add it to your git init templates.

To install and PHP CodeSniffer for Drupal, please read the official documentation.