diff --git a/docs/converter/README.md b/docs/converter/README.md index 21609aa..827b871 100644 --- a/docs/converter/README.md +++ b/docs/converter/README.md @@ -1,6 +1,7 @@ # Converter Reference [phpcs]: https://github.com/PHPCSStandards/PHP_CodeSniffer +[phpmd]: https://github.com/phpmd/phpmd [phplint]: https://github.com/overtrue/phplint [phpstan]: https://github.com/phpstan/phpstan @@ -8,6 +9,10 @@ See official [website][phpcs] +## [phpmd](phpmd) converter + +See official [website][phpmd] + ## [phplint](phplint.md) converter See official [website][phplint] diff --git a/docs/converter/phpmd.md b/docs/converter/phpmd.md new file mode 100644 index 0000000..7db2f15 --- /dev/null +++ b/docs/converter/phpmd.md @@ -0,0 +1,10 @@ + +# PHPMD Converter + +![phpmd converter](../assets/images/converter-phpmd.graphviz.svg) + +## How to use + +See details on demo [`examples/converters/phpmd/`][example-folder] directory into repository. + +[example-folder]: https://github.com/llaville/sarif-php-sdk/blob/master/examples/converters/phpmd/ diff --git a/examples/converters/README.md b/examples/converters/README.md index 71daef6..7fcd4b9 100644 --- a/examples/converters/README.md +++ b/examples/converters/README.md @@ -9,3 +9,10 @@ The SDK is now able to convert for three well-known PHP linters their output to - PHP_CodeSniffer (see feature request ) - PHPLint (see feature request ) - PHPStan (see feature request ) + +> [!NOTE] +> Available since release [1.4.0](https://github.com/llaville/sarif-php-sdk/releases/tag/1.4.0) + +The SDK is now able to convert with a new PHP linter its output to an improved version of SARIF format. + +- PHPMD (has a native [Sarif Renderer](https://github.com/phpmd/phpmd/issues/858) feature) diff --git a/resources/converter-phpmd/datasource.php b/resources/converter-phpmd/datasource.php new file mode 100644 index 0000000..634ae8b --- /dev/null +++ b/resources/converter-phpmd/datasource.php @@ -0,0 +1,19 @@ + 'TB', + // @link https://plantuml.com/en/color + 'cluster.Bartlett\Sarif\Converter.graph.bgcolor' => 'BurlyWood', +]; diff --git a/resources/gh-pages-hook.sh b/resources/gh-pages-hook.sh index efa81ab..6ac333b 100755 --- a/resources/gh-pages-hook.sh +++ b/resources/gh-pages-hook.sh @@ -7,6 +7,7 @@ ASSETS_IMAGE_DIR="docs/assets/images" php $SCRIPT_DIR/build.php graph-composer $ASSETS_IMAGE_DIR php $SCRIPT_DIR/build.php builder-api $ASSETS_IMAGE_DIR php $SCRIPT_DIR/build.php converter-phpcs $ASSETS_IMAGE_DIR +php $SCRIPT_DIR/build.php converter-phpmd $ASSETS_IMAGE_DIR php $SCRIPT_DIR/build.php converter-phplint $ASSETS_IMAGE_DIR php $SCRIPT_DIR/build.php converter-phpstan $ASSETS_IMAGE_DIR php $SCRIPT_DIR/build.php reference-address $ASSETS_IMAGE_DIR