Skip to content
Snippets Groups Projects
Commit 3a22e1b3 authored by danielspeicher's avatar danielspeicher
Browse files

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

parent f095afad
Branches
No related tags found
1 merge request!6Develop
...@@ -15,11 +15,10 @@ It provides a massive amount of testing tools, which can be executed out of the ...@@ -15,11 +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) - [Dependency Analysis](../../../dev_tools/test.md#drupal-dependency-analysis)
- [PHP Unit](../../../dev_tools/test.md#unitkernelfunctional-testing) - [PHP Unit](../../../dev_tools/test.md#unitkernelfunctional-testing)
- [PHP Code Sniffer](../../../dev_tools/test.md#php-code-sniffer) - [PHP Code Sniffer](../../../dev_tools/test.md#php-code-sniffer)
- [PHP PHPStan](../../../dev_tools/test.md#php-stan) - [PHP Stan](../../../dev_tools/test.md#php-stan)
- [PHP Lint](../../../dev_tools/test.md#php-code-sniffer) - [PHP Lint](../../../dev_tools/test.md#php-lint)
- [PHP LOC](../../../dev_tools/test.md#php-loc) - [PHP LOC](../../../dev_tools/test.md#php-loc)
- [PHP Mess Detection](../../../dev_tools/test.md#php-mess-detection) - [PHP Mess Detection](../../../dev_tools/test.md#php-mess-detection)
- [PHP Copy and Paste Detector](../../../dev_tools/test.md#php-code-sniffer) - [PHP Metrics](../../../dev_tools/test.md#php-metrics)
- [PHP Metrics](../../../dev_tools/test.md#php-code-sniffer)
- [PHP Stylelint](../../../dev_tools/test.md#php-code-sniffer) - [PHP Stylelint](../../../dev_tools/test.md#php-code-sniffer)
- [Eslint](../../../dev_tools/test.md#php-code-sniffer) - [Eslint](../../../dev_tools/test.md#php-code-sniffer)
...@@ -44,11 +44,10 @@ We have several tools to perform static code analysis. ...@@ -44,11 +44,10 @@ We have several tools to perform static code analysis.
- [PHP Code Sniffer](#php-code-sniffer) - [PHP Code Sniffer](#php-code-sniffer)
- [PHP PHPStan](#php-stan) - [PHP PHPStan](#php-stan)
- [PHP Lint](#php-code-sniffer) - [PHP Lint](#php-lint)
- [PHP LOC](#php-loc) - [PHP LOC](#php-loc)
- [PHP Mess Detection](../../../dev_tools/test.md#php-mess-detection) - [PHP Mess Detection](../../../dev_tools/test.md#php-mess-detection)
- [PHP Copy and Paste Detector](../../../dev_tools/test.md#php-code-sniffer) - [PHP Metrics](#php-metrics)
- [PHP Metrics](../../../dev_tools/test.md#php-code-sniffer)
- [PHP Stylelint](../../../dev_tools/test.md#php-code-sniffer) - [PHP Stylelint](../../../dev_tools/test.md#php-code-sniffer)
- [Eslint](../../../dev_tools/test.md#php-code-sniffer) - [Eslint](../../../dev_tools/test.md#php-code-sniffer)
...@@ -134,6 +133,22 @@ a test phpstan <file_ordirectory> ...@@ -134,6 +133,22 @@ a test phpstan <file_ordirectory>
Whether it is a directory, it runs the analysis for everything under this directory Whether it is a directory, it runs the analysis for everything under this directory
recursively. recursively.
### PHP Lint
You can execute PHP Lint for a specific Drupal contrib module:
```phplint
a test phplintmodule <contrib_module>
```
Now the entire code in that module will be analysed.
If you want to analyse a custom module, just do the following:
```phplint
a test phplintmodule ../custom/<custom_module>
```
### PHP LOC ### PHP LOC
PHP LOC prints several metrics about your code, like the average size of a class. PHP LOC prints several metrics about your code, like the average size of a class.
...@@ -164,6 +179,32 @@ a test phpmd <file_ordirectory> json <profile> ...@@ -164,6 +179,32 @@ a test phpmd <file_ordirectory> json <profile>
Whether it is a directory, it runs the analysis for everything under this directory Whether it is a directory, it runs the analysis for everything under this directory
recursively. recursively.
### PHP Metrics
This useful tool provides more information as [PHP LOC](#php-loc). It adds for example:
- complexity
- bugs
- object-oriented programming stats
- coupling
- etc.
Note: **This can take a while depending on your module.**
You can execute PHP Metrics for a specific Drupal contrib module:
```phpmet
a test phpmetricsmodule <contrib_module>
```
Now the entire code in that module will be analysed.
If you want to analyse a custom module, just do the following:
```phpmet
a test phpmetricsmodule ../custom/<custom_module>
```
## Unit/Kernel/Functional Testing ## Unit/Kernel/Functional Testing
To execute the tests, you can use a single command: To execute the tests, you can use a single command:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment