mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-19 23:36:13 +02:00

[TASK] Move the Composer script descriptions to the composer.json (#284)

Composer has a built-in functionality for describing Composer scripts,
and we should use it for documentating our custom scripts.
This commit is contained in:
Oliver Klee 2021-08-24 02:27:27 +02:00 committed by GitHub
parent 47455a8941
commit 32d456f593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 22 deletions

View file

@ -125,28 +125,8 @@ before you can use the Composer scripts.
### Available Composer scripts ### Available Composer scripts
You can run `composer` (or `ddev composer`) to display a list of all available You can run `composer` (or `ddev composer`) to display a list of all available
Composer commands and scripts. Composer commands and scripts. (For all custom Composer scripts, are descriptions
in the `composer.json` in the `script-description` section.)
| Script name | Action | Tool |
|------------------------|-------------------------------|---------------------------------------------------------------------------------|
|`ci` | run code checks | the tools listed for the individual checks |
|`ci:composer:normalize` | normalize `composer.json` | [composer-normalize](https://github.com/ergebnis/composer-normalize) |
|`ci:json:lint` | lint the JSON files | [JSON Lint](https://github.com/Seldaek/jsonlint) |
|`ci:php` | run all static checks for PHP | the tools listed for the individual checks |
|`ci:php:copypaste` | check for copy'n'pasted code | [PHP Copy/Paste Detector (PHPCPD)](https://github.com/sebastianbergmann/phpcpd) |
|`ci:php:cs-fixer` | check the code style | [PHP Coding Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) |
|`ci:php:lint` | lint the PHP files | `php -l` |
|`ci:php:sniff` | check the code style | [PHP_CodeSniffer (PHPCS)](https://github.com/squizlabs/PHP_CodeSniffer) |
|`ci:php:stan` | check the types | [PHPStan](https://github.com/phpstan/phpstan) |
|`ci:tests:functional` | run the functional tests | [PHPUnit](https://github.com/sebastianbergmann/phpunit/) |
|`ci:tests:tests` | run all PHPUnit tests | [PHPUnit](https://github.com/sebastianbergmann/phpunit/) |
|`ci:tests:unit` | run the unit tests | [PHPUnit](https://github.com/sebastianbergmann/phpunit/) |
|`ci:ts:lint` | lint the TypoScript files | [TypoScript Lint](https://github.com/martin-helmich/typo3-typoscript-lint) |
|`ci:yaml:lint` | lint the YAML files | [yaml-lint](https://github.com/j13k/yaml-lint) |
|`docs:generate` | render documentation | [dockrun_t3rd](https://github.com/t3docs/docker-render-documentation#readme) |
|`fix:php` | run all fixes for PHP | the tools listed for the individual checks |
|`fix:php:cs` | fix the code style | [PHP Coding Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) |
|`fix:php:sniff` | fix the code style | [PHP_CodeSniffer (PHPCS)](https://github.com/squizlabs/PHP_CodeSniffer) |
## Running the unit and functional tests ## Running the unit and functional tests

View file

@ -145,6 +145,28 @@
"rm phpcs.xml" "rm phpcs.xml"
] ]
}, },
"scripts-descriptions": {
"ci": "Runs all dynamic and static code checks.",
"ci:composer:normalize": "Checks the composer.json.",
"ci:dynamic": "Runs all PHPUnit tests (unit and functional).",
"ci:json:lint": "Lints the JSON files.",
"ci:php": "Runs all static checks for the PHP files.",
"ci:php:copypaste": "Checks for copy'n'pasted PHP code.",
"ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).",
"ci:php:lint": "Lints the PHP files for syntax errors.",
"ci:php:sniff": "Checks the code style with PHP_CodeSniffer (PHPCS).",
"ci:php:stan": "Checks the PHP types using PHPStan.",
"ci:static": "Runs all static code checks (syntax, style, types).",
"ci:tests": "Runs all PHPUnit tests (unit and functional).",
"ci:tests:functional": "Runs the functional tests.",
"ci:tests:unit": "Runs the unit tests.",
"ci:ts:lint": "Lints the TypoScript files.",
"ci:yaml:lint": "Lints the YAML files.",
"docs:generate": "Renders the extension ReST documentation.",
"fix:php": "Runs all fixers for the PHP code.",
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.",
"fix:php:sniff": "Fixes the code style with PHP_CodeSniffer."
},
"support": { "support": {
"issues": "https://github.com/TYPO3-Documentation/tea/issues", "issues": "https://github.com/TYPO3-Documentation/tea/issues",
"source": "https://github.com/TYPO3-Documentation/tea" "source": "https://github.com/TYPO3-Documentation/tea"