Download the PHP package andrey-tech/pdepend-summary-formatter-php without Composer
On this page you can find all versions of the php package andrey-tech/pdepend-summary-formatter-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrey-tech/pdepend-summary-formatter-php
More information about andrey-tech/pdepend-summary-formatter-php
Files in andrey-tech/pdepend-summary-formatter-php
Package pdepend-summary-formatter-php
Short Description Tool to show software code quality metrics, measured by PHP Depend, in console and CI/CD pipeline
License MIT
Homepage https://github.com/andrey-tech/pdepend-summary-formatter-php
Informations about the package pdepend-summary-formatter-php
Pdepend Summary Formatter
Pdepend Summary Formatter is a tool to show software code quality metrics, measured by PHP Depend (pdepend), in console for development and in CI/CD pipeline.
Table of contents
- Installation
- Command line options
- Software metrics
- Configuration YAML file
- Exit codes
- Authors and Maintainers
- License
Installation
Pdepend Summary Formatter tool requires PHP >= 7.4, latest version of PHP Depend and Composer.
Generate a default config file pdepend-summary-formatter.yml.dist
in current working directory:
Then run PHP Depend
to scan your source PHP-code in directory src
and generate an XML report in file summary.xml
:
Then run Pdepend Summary Formatter tool to show code quality metrics,
measured by PHP Depend, in console and to write results to specified text file summary.txt
:
Command line options
The Pdepend Summary Formatter tool command line interface also accepts the following optional arguments:
--init
— Will generate a default config filepdepend-summary-formatter.yml.dist
in current working directory.--output-file=
— Write results also to the specified text file.--config-file=
— The filepath to a custom config YAML file.--ignore-red-metrics-on-exit
— Will exit with a zero code, even "red" metrics exist.--ignore-yellow-metrics-on-exit
— Will exit with a zero code, even "yellow" metrics exist.--no-colors
— Disable colors in console.
An example command line of Pdepend Summary Formatter tool and PHP Depend tool:
An example of output text file summary.txt
:
Software metrics
PHP Depend (pdepend) tool can generate a large set of software metrics from a given code base. These values can be used to measure the quality of a software project and they help to identify that parts of an application where a refactoring should be applied.
Pdepend Summary Formatter tool shows only the part of software metrics, measured by PHP Depend,
and shows them in green
, yellow
and red
colors in the console,
according to boundaries for values, defined in configuration YAML file.
This table shows a list of the software metrics by Pdepend Summary Formatter tool for entire project, classes, traits, methods. The table also shows the default values for "red" boundaries of software metrics, based on PHP Mess Detector (PHPMD) tool.
Note: ✓ — means there are no defined "red" color boundaries for this metric.
Configuration YAML file
By default Pdepend Summary Formatter tool is looking for following configuration YAML files is current working directory:
pdepend-summary-formatter.yml
,pdepend-summary-formatter.yml.dist
.
Configuration YAML file allows to set color boundaries for values of software metrics.
Pdepend Summary Formatter tool currently defines three color boundaries:
Color | Description |
---|---|
green |
Ok |
yellow |
Warning |
red |
Error |
A white value means there are no defined color boundaries for this metric.
You can also add/set custom colors and styles. See How to Color and Style the Console Output in Symfony console.
Fragment of default configuration file:
Exit codes
Pdepend Summary Formatter tool currently defines four different exit codes:
Code | Description |
---|---|
0 | This exit code indicates that everything worked as expected without "red" or "yellow" metrics. |
1 | This exit code indicates that an error/exception occurred which has interrupted tool during execution. |
2 | This exit code means that tool has processed the summary file without the occurrence of an error/exception with "red" metrics. |
3 | This exit code means that tool has processed the summary file without the occurrence of an error/exception with "yellow" metrics. |
Authors and Maintainers
The author and maintainer of Pdepend Summary Formatter tool is andrey-tech.
License
This tool is licensed under the MIT license.
All versions of pdepend-summary-formatter-php with dependencies
ext-simplexml Version *
symfony/console Version ^4.4 || ^5.4 || ^6.3 || ^7.1
symfony/yaml Version ^4.4 || ^5.4 || ^6.3 || ^7.1