From 85592f94fdd7e4edd83fbf60d66cde98ac7745f8 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 16 Jan 2023 16:54:04 +0100 Subject: [PATCH] Configure pre-commit to run PHPstan before commiting --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..e611e2b8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +# Pre-commit hooks to run tests and ensure code is cleaned. +# See https://pre-commit.com for more information +repos: +- repo: https://github.com/digitalpulp/pre-commit-php.git + rev: 1.4.0 + hooks: + - id: php-stan + files: ^src\/.*\.(php)$ + args: ['--configuration=.phpstan/config.neon']