Skip to content

Instantly share code, notes, and snippets.

@mechastorm
Created January 28, 2015 05:11
Show Gist options
  • Save mechastorm/07792d2eb818ef20ee0b to your computer and use it in GitHub Desktop.
Save mechastorm/07792d2eb818ef20ee0b to your computer and use it in GitHub Desktop.
Pre-commit hook Yaml to run PHP syntax check against staged files before commit.
- id: php-lint
name: PHP Syntax Check (Quick)
description: Runs php -l on all staged files. Exits when it hits the first
errored file
entry: php -l
language: system
files: \.php$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment