From 2ff5d13cc5ed246189c5f8962f66e9cdc2d64bac Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Sun, 31 Jan 2021 23:26:41 -0500 Subject: [PATCH] Add fix and lint global commands --- README.md | 24 +++++++++++++++++++++++- bin/fix | 5 +++++ bin/lint | 5 +++++ composer.json | 4 +++- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100755 bin/fix create mode 100755 bin/lint diff --git a/README.md b/README.md index 159da1c..7afbbd7 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,30 @@ composer require tightenco/duster ## Usage +To run individual lints: + +```bash +./vendor/duster-tlint-lint +./vendor/duster-phpcs-lint ``` -// Usage code and examples here + +To run individual fixes: + +```bash +./vendor/duster-tlint-fix +./vendor/duster-phpcs-fix +``` + +To lint everything at once: + +```bash +./vendor/duster-lint +``` + +To fix everything at once: + +```bash +./vendor/duster-fix ``` ## Contributing diff --git a/bin/fix b/bin/fix new file mode 100755 index 0000000..f666ad7 --- /dev/null +++ b/bin/fix @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +${DIR}/duster-tlint-fix +${DIR}/duster-phpcs-fix diff --git a/bin/lint b/bin/lint new file mode 100755 index 0000000..d971980 --- /dev/null +++ b/bin/lint @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +${DIR}/duster-tlint-lint +${DIR}/duster-phpcs-lint diff --git a/composer.json b/composer.json index 0f8f5cc..3417cf9 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,8 @@ "bin/duster-tlint-lint", "bin/duster-tlint-fix", "bin/duster-phpcs-lint", - "bin/duster-phpcs-fix" + "bin/duster-phpcs-fix", + "bin/duster-lint", + "bin/duster-fix" ] }