mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-21 23:56:12 +01:00
This commit is contained in:
Eike Starkmann 2024-11-07 01:01:39 -05:00 committed by GitHub
commit 3e6181c004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 0 deletions

View file

@ -156,6 +156,7 @@ Options:
- composerUpdateMax: "composer update", with no platform.php config. - composerUpdateMax: "composer update", with no platform.php config.
- composerUpdateMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0. - composerUpdateMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0.
- docsGenerate: Renders the extension ReST documentation. - docsGenerate: Renders the extension ReST documentation.
- fix: Runs all automatic code style fixes.
- functional: PHP functional tests - functional: PHP functional tests
- lintCss: CSS file linting. Set -n for dry-run. - lintCss: CSS file linting. Set -n for dry-run.
- lintJs: JavaScript file linting. Set -n for dry-run. - lintJs: JavaScript file linting. Set -n for dry-run.
@ -542,6 +543,15 @@ case ${TEST_SUITE} in
${CONTAINER_BIN} run ${CONTAINER_INTERACTIVE} --rm --pull always ${USERSET} -v "${ROOT_DIR}":/project ${IMAGE_DOCS} --config=Documentation --fail-on-log ${CONTAINER_BIN} run ${CONTAINER_INTERACTIVE} --rm --pull always ${USERSET} -v "${ROOT_DIR}":/project ${IMAGE_DOCS} --config=Documentation --fail-on-log
SUITE_EXIT_CODE=$? SUITE_EXIT_CODE=$?
;; ;;
fix)
COMMAND="composer fix"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-command-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/sh -c "${COMMAND}"
COMMAND="echo ${HELP_TEXT_NPM_CI}; npm ci --silent || { echo ${HELP_TEXT_NPM_FAILURE}; exit 1; } && npm run fix:lint:js"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name npm-command-${SUFFIX} ${IMAGE_NODE} /bin/sh -c "${COMMAND}"
COMMAND="echo ${HELP_TEXT_NPM_CI}; npm ci --silent || { echo ${HELP_TEXT_NPM_FAILURE}; exit 1; } && npm run fix:lint:css"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name npm-command-${SUFFIX} ${IMAGE_NODE} /bin/sh -c "${COMMAND}"
SUITE_EXIT_CODE=$?
;;
shellcheck) shellcheck)
${CONTAINER_BIN} run ${CONTAINER_INTERACTIVE} --rm --pull always ${USERSET} -v "${ROOT_DIR}":/project:ro -e SHELLCHECK_OPTS="-e SC2086" ${IMAGE_SHELLCHECK} /project/Build/Scripts/runTests.sh ${CONTAINER_BIN} run ${CONTAINER_INTERACTIVE} --rm --pull always ${USERSET} -v "${ROOT_DIR}":/project:ro -e SHELLCHECK_OPTS="-e SC2086" ${IMAGE_SHELLCHECK} /project/Build/Scripts/runTests.sh
SUITE_EXIT_CODE=$? SUITE_EXIT_CODE=$?

View file

@ -106,6 +106,13 @@ Lints the TypoScript files.
Lints the YAML files. Lints the YAML files.
.. index:: Commands; composer fix
.. code-block:: bash
composer fix
Runs all fixers (except for the ones that need JavaScript).
.. index:: Commands; composer fix:php .. index:: Commands; composer fix:php
.. code-block:: bash .. code-block:: bash

View file

@ -174,6 +174,10 @@
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint", "ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint",
"coverage:create-directories": "mkdir -p build/coverage build/logs", "coverage:create-directories": "mkdir -p build/coverage build/logs",
"docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation", "docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation",
"fix": [
"@fix:composer:normalize",
"@fix:php"
],
"fix:composer:normalize": "@composer normalize --no-check-lock", "fix:composer:normalize": "@composer normalize --no-check-lock",
"fix:php": [ "fix:php": [
"@fix:php:rector", "@fix:php:rector",
@ -234,6 +238,7 @@
"ci:yaml:lint": "Lints the YAML files.", "ci:yaml:lint": "Lints the YAML files.",
"coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.", "coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.",
"docs:generate": "Renders the extension ReST documentation.", "docs:generate": "Renders the extension ReST documentation.",
"fix": "Runs all automatic code style fixes.",
"fix:composer:normalize": "Normalizes composer.json file content.", "fix:composer:normalize": "Normalizes composer.json file content.",
"fix:php": "Runs all fixers for the PHP code.", "fix:php": "Runs all fixers for the PHP code.",
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.", "fix:php:cs": "Fixes the code style with PHP-CS-Fixer.",