From ad03ea6a570ce4bacdf0dc28d2bf3bef1871f4fd Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sat, 30 Dec 2017 15:41:49 -0200 Subject: [PATCH] Create clean_levels.sh --- bin/clean_levels.sh | 3 +++ composer.json | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 bin/clean_levels.sh diff --git a/bin/clean_levels.sh b/bin/clean_levels.sh new file mode 100755 index 00000000000..1b84e443d79 --- /dev/null +++ b/bin/clean_levels.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +# trailing whitespaces +sed -i -E 's/\s+$//g' src/config/level/*/*.yml diff --git a/composer.json b/composer.json index e4b957f9b12..17505d457e9 100644 --- a/composer.json +++ b/composer.json @@ -57,9 +57,16 @@ } }, "scripts": { - "complete-check": ["@check-cs", "phpunit", "@phpstan"], + "complete-check": [ + "@check-cs", + "phpunit", + "@phpstan" + ], "check-cs": "vendor/bin/ecs check bin packages src tests", - "fix-cs": "vendor/bin/ecs check bin packages src tests --fix", + "fix-cs": [ + "vendor/bin/ecs check bin packages src tests --fix", + "bin/clean_levels.sh" + ], "phpstan": "vendor/bin/phpstan.phar analyse packages src tests --level max --configuration phpstan.neon" }, "bin": [