From 0eb0236febe4bf3de9bc4571b68ddf8be88a54c6 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 6 Sep 2021 18:45:14 +0100 Subject: [PATCH] [TOOLS] Run PHPStan on the whole codebase on each commit --- bin/pre-commit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/pre-commit b/bin/pre-commit index 46fb272a3d..aa75aecd7a 100755 --- a/bin/pre-commit +++ b/bin/pre-commit @@ -25,5 +25,9 @@ if echo "${staged_files}" | grep -F ".php"; then "${root}/bin/php-doc-check" src plugins components fi +echo "Running phpstan" + +"${root}/vendor/bin/phpstan" --memory-limit=2G analyse src tests components plugins + # Only commit if there wasn't an error exit $?