Skip to content
Snippets Groups Projects
Commit 1e7bddf0 authored by danielspeicher's avatar danielspeicher
Browse files

Document Drupal Development Env: composer/plugin/drupal-development-environment#1

parent 21ea631e
No related branches found
No related tags found
1 merge request!7Develop
......@@ -15,10 +15,10 @@ It provides a massive amount of testing tools, which can be executed out of the
- [Dependency Analysis](../../../dev_tools/test.md#drupal-dependency-analysis)
- [PHP Unit](../../../dev_tools/test.md#unitkernelfunctional-testing)
- [PHP Code Sniffer](../../../dev_tools/test.md#php-code-sniffer)
- [PHP Stan](../../../dev_tools/test.md#php-stan)
- [PHPStan](../../../dev_tools/test.md#phpstan)
- [PHP Lint](../../../dev_tools/test.md#php-lint)
- [PHP LOC](../../../dev_tools/test.md#php-loc)
- [PHP Mess Detection](../../../dev_tools/test.md#php-mess-detection)
- [PHP Mess Detector](../../../dev_tools/test.md#php-mess-detector)
- [PHP Metrics](../../../dev_tools/test.md#php-metrics)
- [Stylelint](../../../dev_tools/test.md#stylelint)
- [Eslint](../../../dev_tools/test.md#es-lint)
......@@ -43,10 +43,10 @@ drupal/blazy 2.16.0 2.27.0 Provides..
We have several tools to perform static code analysis.
- [PHP Code Sniffer](#php-code-sniffer)
- [PHP PHPStan](#php-stan)
- [PHPStan](#phpstan)
- [PHP Lint](#php-lint)
- [PHP LOC](#php-loc)
- [PHP Mess Detection](#php-mess-detection)
- [PHP Mess Detector](#php-mess-detector)
- [PHP Metrics](#php-metrics)
- [Stylelint](#stylelint)
- [Eslint](#es-lint)
......@@ -54,7 +54,7 @@ We have several tools to perform static code analysis.
### PHP Code Sniffer
PHP Code Sniffer performs a static code analysis with a specific Drupal profile. It detects
code smells like static calls.
code smells like static calls. See [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer).
You can execute PHP CS for a specific Drupal contrib module:
......@@ -99,10 +99,10 @@ a test phpcs-fix <contrib_module>
Now th errors are gone, which saves a lot of time and effort.
### PHP Stan
### PHPStan
We use level 6 as default, which is pretty good and strict and provides a very clean code. You can adjust this in the
`phpstan.neon` file. It looks like this:
`phpstan.neon` file. See [PHPStan](https://phpstan.org/). It looks like this:
```phpstan
parameters:
......@@ -135,7 +135,7 @@ recursively.
### PHP Lint
You can execute PHP Lint for a specific Drupal contrib module:
You can execute [PHP Lint](https://github.com/overtrue/phplint) for a specific Drupal contrib module:
```phplint
a test phplintmodule <contrib_module>
......@@ -151,7 +151,7 @@ a test phplintmodule ../custom/<custom_module>
### PHP LOC
PHP LOC prints several metrics about your code, like the average size of a class.
[PHP LOC](https://github.com/sebastianbergmann/phploc) prints several metrics about your code, like the average size of a class.
To execute PHP LOC on the console:
......@@ -159,9 +159,9 @@ To execute PHP LOC on the console:
a test phploc <file_ordirectory>
```
### PHP Mess Detection
### PHP Mess Detector
PHP Mess Detection is a more detailed analysis comparing to code sniffer. It
[PHP Mess Detector](https://phpmd.org) is a more detailed analysis comparing to code sniffer. It
uses several profiles like:
* cleancode
......@@ -170,7 +170,7 @@ uses several profiles like:
This analysis detects also code smells like the complexity (e.g. number of
dependencies) of classes.
To execute PHP Mess Detection on the console:
To execute PHP Mess Detector on the console:
```phpmd
a test phpmd <file_ordirectory> json <profile>
......@@ -191,7 +191,7 @@ This useful tool provides more information as [PHP LOC](#php-loc). It adds for e
Note: **This can take a while depending on your module.**
You can execute PHP Metrics for a specific Drupal contrib module:
You can execute [PHP Metrics](https://github.com/phpmetrics/PhpMetrics) for a specific Drupal contrib module:
```phpmet
a test phpmetricsmodule <contrib_module>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment