From f6986abb24b5228c6444b84232f9ff153cb42577 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Wed, 22 May 2024 09:00:32 -0400 Subject: [PATCH] Fix url to phpcs.xml.dist, ignore .ddev dir, support 'drupal' project type (#51) * Fix url to phpcs.xml.dist * Support drupal project type --- commands/web/eslint | 2 +- commands/web/nightwatch | 2 +- commands/web/phpcbf | 2 +- commands/web/phpcs | 6 +++--- commands/web/phpunit | 2 +- commands/web/poser | 4 ++-- commands/web/stylelint | 2 +- commands/web/symlink-project | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/commands/web/eslint b/commands/web/eslint index e7d234f..414db22 100755 --- a/commands/web/eslint +++ b/commands/web/eslint @@ -5,7 +5,7 @@ ## Description: Run eslint inside the web container ## Usage: eslint [flags] [args] ## Example: "ddev eslint" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true if "$DDEV_DOCROOT/core/node_modules/.bin/eslint" --version >/dev/null ; then diff --git a/commands/web/nightwatch b/commands/web/nightwatch index de0937d..c92b32c 100755 --- a/commands/web/nightwatch +++ b/commands/web/nightwatch @@ -5,7 +5,7 @@ ## Description: Run nightwatch inside the web container ## Usage: nightwatch [flags] [args] ## Example: "ddev nightwatch" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true yarn --cwd "$DDEV_DOCROOT/core" test:nightwatch "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/custom/" "$@" diff --git a/commands/web/phpcbf b/commands/web/phpcbf index 04c20a7..34b21b4 100644 --- a/commands/web/phpcbf +++ b/commands/web/phpcbf @@ -5,7 +5,7 @@ ## Description: Run phpcbf inside the web container ## Usage: phpcbf [flags] [args] ## Example: "ddev phpcbf" or "ddev phpcbf -n" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true if ! command -v phpcbf >/dev/null; then diff --git a/commands/web/phpcs b/commands/web/phpcs index f85a7ad..e4f78f8 100755 --- a/commands/web/phpcs +++ b/commands/web/phpcs @@ -5,12 +5,12 @@ ## Description: Run phpcs inside the web container ## Usage: phpcs [flags] [args] ## Example: "ddev phpcs" or "ddev phpcs -n" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true if ! command -v phpcs >/dev/null; then echo "phpcs is not available. You may need to 'ddev composer install'" exit 1 fi -test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/phpcs.xml.dist -phpcs -s --report-full --report-summary --report-source web/modules/custom "$@" +test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist +phpcs -s --report-full --report-summary --report-source web/modules/custom --ignore=*/.ddev/* "$@" diff --git a/commands/web/phpunit b/commands/web/phpunit index 7ef9cba..2ee15e8 100755 --- a/commands/web/phpunit +++ b/commands/web/phpunit @@ -5,7 +5,7 @@ ## Description: Run phpunit inside the web container ## Usage: phpunit [flags] [args] ## Example: "ddev phpunit" or "ddev phpunit --stop-on-failure" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true if ! command -v phpunit >/dev/null; then diff --git a/commands/web/poser b/commands/web/poser index 02fbf6c..a7cb27f 100755 --- a/commands/web/poser +++ b/commands/web/poser @@ -5,7 +5,7 @@ ## Description: Expand composer.json and run composer install. ## Usage: poser [flags] [args] ## Example: "ddev poser" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true export COMPOSER=composer.contrib.json @@ -13,4 +13,4 @@ export COMPOSER=composer.contrib.json composer install rm composer.contrib.json composer.contrib.lock yarn --cwd $DDEV_DOCROOT/core install -touch $DDEV_DOCROOT/core/.env \ No newline at end of file +touch $DDEV_DOCROOT/core/.env diff --git a/commands/web/stylelint b/commands/web/stylelint index 927d1fd..795e609 100755 --- a/commands/web/stylelint +++ b/commands/web/stylelint @@ -5,7 +5,7 @@ ## Description: Run stylelint inside the web container ## Usage: stylelint [flags] [args] ## Example: "ddev stylelint" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true if yarn --cwd "$DDEV_DOCROOT/core" stylelint --version >/dev/null ; then diff --git a/commands/web/symlink-project b/commands/web/symlink-project index bdb6683..98b70d5 100644 --- a/commands/web/symlink-project +++ b/commands/web/symlink-project @@ -5,7 +5,7 @@ ## Description: Symlink all root files/dirs into web.modules/custom/[PROJECT_NAME] ## Usage: symlink-project [flags] [args] ## Example: "ddev symlink-project" -## ProjectTypes: drupal8,drupal9,drupal10 +## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true export _WEB_ROOT=$DDEV_DOCROOT