Joined January 2015
·
Posted to
Run Code Sniffer on modified files
over 1 year
ago
One more improvement. If I want to have pre-commit hook, I need to include files in the commit. git ls-files -om --exclude-standard
exclude those files.
This is the solution (so far):
#!/bin/bash
files=$(git diff --name-only HEAD master);
if [ -z $files ]; then
phpcs $files
fi
Posted to
Run Code Sniffer on modified files
over 1 year
ago
Awesome idea! Thanks for sharing :)
Negation was missing: