Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DevOps Tools
Documentation
Commits
3a22e1b3
Commit
3a22e1b3
authored
10 months ago
by
danielspeicher
Browse files
Options
Downloads
Patches
Plain Diff
Document Drupal Development Env:
composer/plugin/drupal-development-environment#1
parent
f095afad
Branches
Branches containing commit
No related tags found
1 merge request
!6
Develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/composer/plugin/drupal-dev-environment/index.md
+3
-4
3 additions, 4 deletions
docs/composer/plugin/drupal-dev-environment/index.md
docs/dev_tools/test.md
+44
-3
44 additions, 3 deletions
docs/dev_tools/test.md
with
47 additions
and
7 deletions
docs/composer/plugin/drupal-dev-environment/index.md
+
3
−
4
View file @
3a22e1b3
...
@@ -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
PHP
Stan
](
../../../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
)
This diff is collapsed.
Click to expand it.
docs/dev_tools/test.md
+
44
−
3
View file @
3a22e1b3
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment