From d95f9172eb356705f67fab30e54e3d751386187a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Pai=C4=8Dius?= Date: Fri, 24 Jan 2025 14:20:50 +0200 Subject: [PATCH] Lint.sh --- lint.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lint.sh diff --git a/lint.sh b/lint.sh new file mode 100644 index 0000000..bb1a860 --- /dev/null +++ b/lint.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +alias composer='docker run --rm -it -v "$(pwd):/app" composer/composer' + +action=$1 + +case $action in +"check") + composer update + composer install + ./vendor/bin/phpcs -s --ignore=node_modules,build/\* omnisend-for-surecart + ;; +"fix") + composer update + composer install + ./vendor/bin/phpcbf --ignore=node_modules,build/\* omnisend-for-surecart + ;; +*) + echo "pass one of these argument: check,fix" + exit 1 + ;; +esac