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
1e7bddf0
Commit
1e7bddf0
authored
10 months ago
by
danielspeicher
Browse files
Options
Downloads
Patches
Plain Diff
Document Drupal Development Env:
composer/plugin/drupal-development-environment#1
parent
21ea631e
No related branches found
No related tags found
1 merge request
!7
Develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/composer/plugin/drupal-dev-environment/index.md
+2
-2
2 additions, 2 deletions
docs/composer/plugin/drupal-dev-environment/index.md
docs/dev_tools/test.md
+11
-11
11 additions, 11 deletions
docs/dev_tools/test.md
with
13 additions
and
13 deletions
docs/composer/plugin/drupal-dev-environment/index.md
+
2
−
2
View file @
1e7bddf0
...
...
@@ -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 Detect
ion
](
../../../dev_tools/test.md#php-mess-detect
ion
)
-
[
PHP Mess Detect
or
](
../../../dev_tools/test.md#php-mess-detect
or
)
-
[
PHP Metrics
](
../../../dev_tools/test.md#php-metrics
)
-
[
Stylelint
](
../../../dev_tools/test.md#stylelint
)
-
[
Eslint
](
../../../dev_tools/test.md#es-lint
)
This diff is collapsed.
Click to expand it.
docs/dev_tools/test.md
+
11
−
11
View file @
1e7bddf0
...
...
@@ -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 Detect
ion
](
#php-mess-detect
ion
)
-
[
PHP Mess Detect
or
](
#php-mess-detect
or
)
-
[
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 Detect
ion
### PHP Mess Detect
or
PHP Mess Detect
ion
is a more detailed analysis comparing to code sniffer. It
[
PHP Mess Detect
or
](
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 Detect
ion
on the console:
To execute PHP Mess Detect
or
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>
...
...
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