From f2b9b7d1fa8d01846426517593f958722ef0fc09 Mon Sep 17 00:00:00 2001 From: sv3n Date: Fri, 30 Dec 2022 14:43:31 +0100 Subject: [PATCH] Added ddev command shortcuts (#2868) --- .ddev/commands/web/php-cs-fixer | 7 +++ .ddev/commands/web/phpcbf | 7 +++ .ddev/commands/web/phpcs | 7 +++ .ddev/commands/web/phpmd | 7 +++ .ddev/commands/web/phpstan | 7 +++ .github/labeler.yml | 4 ++ .phpmd.dist.xml | 93 +++++++++++++++++---------------- 7 files changed, 86 insertions(+), 46 deletions(-) create mode 100755 .ddev/commands/web/php-cs-fixer create mode 100755 .ddev/commands/web/phpcbf create mode 100755 .ddev/commands/web/phpcs create mode 100755 .ddev/commands/web/phpmd create mode 100755 .ddev/commands/web/phpstan diff --git a/.ddev/commands/web/php-cs-fixer b/.ddev/commands/web/php-cs-fixer new file mode 100755 index 00000000000..b891a13dd54 --- /dev/null +++ b/.ddev/commands/web/php-cs-fixer @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHP-CS-Fixer +## Usage: php-cs-fixer +## Example: ddev php-cs-fixer + +php vendor/bin/php-cs-fixer fix "$@" diff --git a/.ddev/commands/web/phpcbf b/.ddev/commands/web/phpcbf new file mode 100755 index 00000000000..7a34ea1dec0 --- /dev/null +++ b/.ddev/commands/web/phpcbf @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPCodeBeautifier +## Usage: phpcbf +## Example: ddev phpcbf + +php vendor/bin/phpcbf -s -p --report=full,source,summary "$@" diff --git a/.ddev/commands/web/phpcs b/.ddev/commands/web/phpcs new file mode 100755 index 00000000000..95cbaa9e02f --- /dev/null +++ b/.ddev/commands/web/phpcs @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPCodeSniffer +## Usage: phpcs +## Example: ddev phpcs + +php vendor/bin/phpcs -s -p --report=full,summary "$@" diff --git a/.ddev/commands/web/phpmd b/.ddev/commands/web/phpmd new file mode 100755 index 00000000000..88bdd914ea0 --- /dev/null +++ b/.ddev/commands/web/phpmd @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPMD +## Usage: phpmd +## Example: ddev phpmd + +php vendor/bin/phpmd "$@" text .phpmd.dist.xml diff --git a/.ddev/commands/web/phpstan b/.ddev/commands/web/phpstan new file mode 100755 index 00000000000..b365b081c83 --- /dev/null +++ b/.ddev/commands/web/phpstan @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPStan +## Usage: phpstan +## Example: ddev phpstan + +XDEBUG_MODE=off php vendor/bin/phpstan analyze "$@" diff --git a/.github/labeler.yml b/.github/labeler.yml index 7909fe63c73..bad2405eba0 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -623,3 +623,7 @@ - dev/sonar* - .github/workflows/phpunit.yml - .github/workflows/sonar.yml + +'ddev': + - .ddev/* + - .ddev/**/* diff --git a/.phpmd.dist.xml b/.phpmd.dist.xml index 41c0e8c67d5..8bbcf608db5 100644 --- a/.phpmd.dist.xml +++ b/.phpmd.dist.xml @@ -1,5 +1,5 @@ - @@ -41,12 +41,12 @@ @@ -67,31 +67,32 @@ + @@ -100,16 +101,16 @@