Skip to content

aramean/git-hook-drupal-lints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

git-hook-drupal-lints

Prevents git push when linters aren't passing tests.

Install on your GIT project

curl -o .git/hooks/pre-commit https://raw.githubusercontent.com/aramean/git-hook-drupal-lint/main/pre-commit && chmod 777 .git/hooks/pre-commit

Uninstall from your GIT project

rm -fr .git/hooks/pre-commit

Test on your GIT project

git commit

Configuration

  • 0 to Disable
  • 1 to Enable
  • "path to binary" to override drupal vendor path

.git/hooks/pre-commit

# PHP Lint
PHP_BIN=1

# Code Sniffer
PHPCS_BIN=1

# PHP Stan
PHPSTAN_BIN=1