diff --git a/docs/converter/ecs.md b/docs/converter/ecs.md index 0a8aa9d..076e1d8 100644 --- a/docs/converter/ecs.md +++ b/docs/converter/ecs.md @@ -37,7 +37,7 @@ composer require --dev symplify/easy-coding-standard bartlett/sarif-php-converte > (see e.g: [add junit output formatter](https://github.com/easy-coding-standard/easy-coding-standard/pull/212)), > we have no other alternative that using the **Console Tool** convert command. -**Step 1:** Create a basic ECS config file +### :material-numeric-1-box: Create a basic ECS config file For example : @@ -75,7 +75,7 @@ return ECSConfig::configure() ; ``` -**Step 2:** Build the native checkstyle output report +### :material-numeric-2-box: Build the native checkstyle output report ```shell vendor/bin/ecs check --output-format=checkstyle > examples/ecs/checkstyle.xml @@ -93,7 +93,7 @@ vendor/bin/ecs check --output-format=checkstyle > examples/ecs/checkstyle.xml > return ECSConfig::configure()->withRealPathReporting(true); > ``` -**Step 3:** And finally, convert it to SARIF with the **Console Tool** +### :material-numeric-3-box: And finally, convert it to SARIF with the **Console Tool** ```shell php report-converter convert ecs --input-format=checkstyle --input-file=examples/ecs/checkstyle.xml -v diff --git a/docs/converter/phan.md b/docs/converter/phan.md index db0e84f..2fd80bb 100644 --- a/docs/converter/phan.md +++ b/docs/converter/phan.md @@ -36,7 +36,7 @@ composer require --dev phan/phan bartlett/sarif-php-converters > As Phan v5 is not able to specify custom printer format, > we have no other alternative that using the **Console Tool** convert command. -**Step 1:** Build the checkstyle output report +### :material-numeric-1-box: Build the checkstyle output report ```shell vendor/bin/phpan --directory /absolute/path/to/source/code --absolute-path-issue-messages --output-mode=checkstyle --output=checkstyle.xml @@ -47,7 +47,7 @@ vendor/bin/phpan --directory /absolute/path/to/source/code --absolute-path-issue > Be sure to specify `--absolute-path-issue-messages`, otherwise the Console Tool `convert` command > will raise some warnings about file names. -**Step 2:** And finally, convert it to SARIF with the **Console Tool** +### :material-numeric-2-box: And finally, convert it to SARIF with the **Console Tool** ```shell php report-converter convert phan --input-format=checkstyle --input-file=examples/phan/checkstyle.xml -v diff --git a/docs/converter/phpcs-fixer.md b/docs/converter/phpcs-fixer.md index dca4dfa..74d4479 100644 --- a/docs/converter/phpcs-fixer.md +++ b/docs/converter/phpcs-fixer.md @@ -36,7 +36,7 @@ composer require --dev php-cs-fixer/php-cs-fixer bartlett/sarif-php-converters > As PHP-CS-Fixer is not able to register custom reporter, > we have no other alternative that using the **Console Tool** convert command. -**Step 1:** Build the native checkstyle output report +### :material-numeric-1-box: Build the native checkstyle output report ```shell vendor/bin/php-cs-fixer fix --dry-run --format checkstyle /path/to/source/code > checkstyle.xml @@ -47,7 +47,7 @@ vendor/bin/php-cs-fixer fix --dry-run --format checkstyle /path/to/source/code > > Be sure to specify absolute path to source code to analyze, otherwise the Console Tool `convert` command > will raise some warnings about file names. -**Step 2:** And finally, convert it to SARIF with the **Console Tool** +### :material-numeric-2-box: And finally, convert it to SARIF with the **Console Tool** ```shell php report-converter convert phpcs-fixer --input-format=checkstyle --input-file=examples/phpcs-fixer/checkstyle.xml -v diff --git a/docs/converter/phpcs.md b/docs/converter/phpcs.md index a6f517a..735bb60 100644 --- a/docs/converter/phpcs.md +++ b/docs/converter/phpcs.md @@ -63,7 +63,7 @@ To make your report human-readable, you have to specify the `\JSON_PRETTY_PRINT` Here is the way to do it ! -**Step 1:** Create your report specialized class : +#### :material-numeric-1-box: Create your report specialized class ```php namespace MyStandard\CS; @@ -80,7 +80,7 @@ class MyPhpCsReport extends PhpCsReport } ``` -**Step 2:** And finally, print the SARIF report +#### :material-numeric-2-box: And finally, print the SARIF report ```shell vendor/bin/phpcs --report=MyPhpCsReport --standard=examples/phpcs/.phpcs.xml.dist @@ -90,13 +90,13 @@ vendor/bin/phpcs --report=MyPhpCsReport --standard=examples/phpcs/.phpcs.xml.dis If you prefer to convert from a [format supported natively][phpcs-reporting] by PHPCS, then : -**Step 1:** Build the native [checkstyle output][phpcs-checkstyle-output] report +#### :material-numeric-1-box: Build the native [checkstyle output][phpcs-checkstyle-output] report ```shell vendor/bin/phpcs --report=checkstyle --report-file=checkstyle.xml /path/to/source/code ``` -**Step 2:** And finally, convert it to SARIF with the **Console Tool** +#### :material-numeric-2-box: And finally, convert it to SARIF with the **Console Tool** ```shell report-converter convert phpcs --input-format=checkstyle --input-file=examples/phpcs/checkstyle.xml -v diff --git a/docs/converter/phplint.md b/docs/converter/phplint.md index bb5b6ef..1f48ff4 100644 --- a/docs/converter/phplint.md +++ b/docs/converter/phplint.md @@ -68,7 +68,7 @@ Here is the way to do it ! > > * Without verbose option (`-v`) the PHPLint `SarifOutput` will print a compact SARIF version. -**Step 1:** Prints the SARIF report +#### :material-numeric-1-box: Prints the SARIF report ```shell vendor/bin/phplint --format='\Overtrue\PHPLint\Output\SarifOutput' --bootstrap vendor/autoload.php --output=examples/phplint/.sarif.json -v /path/to/source/code @@ -78,13 +78,13 @@ vendor/bin/phplint --format='\Overtrue\PHPLint\Output\SarifOutput' --bootstrap v If you prefer to convert from a format supported natively by PHPLint, then : -**Step 1:** Build the native checkstyle output report +#### :material-numeric-1-box: Build the native checkstyle output report ```shell vendor/bin/phplint --format=checkstyle --output=checkstyle.xml /path/to/source/code ``` -**Step 2:** And finally, convert it to SARIF with the **Console Tool** +#### :material-numeric-2-box: And finally, convert it to SARIF with the **Console Tool** ```shell php report-converter convert phplint --input-format=checkstyle --input-file=examples/phplint/checkstyle.xml -v diff --git a/docs/converter/phpmd.md b/docs/converter/phpmd.md index 181422d..6571a4c 100644 --- a/docs/converter/phpmd.md +++ b/docs/converter/phpmd.md @@ -51,13 +51,13 @@ composer require --dev phpmd/phpmd bartlett/sarif-php-converters > As PHMMD v2.15 is not able to specify/boot custom renderer easily, > we have no other alternative that using the **Console Tool** convert command. -**Step 1:** Build the checkstyle output report +### :material-numeric-1-box: Build the checkstyle output report ```shell vendor/bin/phpmd /path/to/source checkstyle ruleset --report-file=checkstyle.xml ``` -**Step 2:** And finally, convert it to SARIF with the **Console Tool** +### :material-numeric-2-box: And finally, convert it to SARIF with the **Console Tool** ```shell php report-converter convert phpmd --input-format=checkstyle --input-file=examples/phpmd/checkstyle.xml -v @@ -74,7 +74,7 @@ Alternative usage > > When PHPMD 3.0 will be [GA][general-availability], you can use this alternative -**Step 1:** Build the sarif output report directly via the default `Bartlett\Sarif\Converter\Reporter\PhpMdRenderer` +### :material-numeric-3-box: Build the sarif output report directly via the default `Bartlett\Sarif\Converter\Reporter\PhpMdRenderer` ```shell vendor/bin/phpmd /path/to/source '\Bartlett\Sarif\Converter\Reporter\PhpMdRenderer' ruleset --bootstrap vendor/autoload.php --report-file=sarif.json diff --git a/docs/converter/phpstan.md b/docs/converter/phpstan.md index 44f7c78..453698f 100644 --- a/docs/converter/phpstan.md +++ b/docs/converter/phpstan.md @@ -60,7 +60,7 @@ To make your report human-readable, you have to specify the `\JSON_PRETTY_PRINT` Here is the way to do it ! -**Step 1:** Create your formatter specialized class : +#### :material-numeric-1-box: Create your formatter specialized class ```php As Psalm v5 is not able to specify/boot custom renderer easily, > we have no other alternative that using the **Console Tool** convert command. -**Step 1:** Initialize Psalm configuration file `psalm.xml` +### :material-numeric-1-box: Initialize Psalm configuration file `psalm.xml` ```shell vendor/bin/psalm path/to/source --init @@ -65,13 +65,13 @@ vendor/bin/psalm path/to/source --init > Be sure to specify absolute path reporting (`absolutePathReporting="true"`) into `psalm.xml` config file, > otherwise the Console Tool `convert` command will raise some warnings about file names. -**Step 2:** Build the checkstyle output report +### :material-numeric-2-box: Build the checkstyle output report ```shell vendor/bin/psalm --report=psalm.checkstyle.xml ``` -**Step 3:** And finally, convert it to SARIF normalized with the **Console Tool** +### :material-numeric-3-box: And finally, convert it to SARIF normalized with the **Console Tool** ```shell php report-converter convert psalm --input-format=checkstyle --input-file=examples/psalm/psalm.checkstyle.xml -v diff --git a/docs/converter/rector.md b/docs/converter/rector.md index 66d0738..d5ac173 100644 --- a/docs/converter/rector.md +++ b/docs/converter/rector.md @@ -31,7 +31,7 @@ composer require --dev rector/rector bartlett/sarif-php-converters ## Usage -**Step 1:** Update your `rector.php` configuration file +### :material-numeric-1-box: Update your `rector.php` configuration file Register at least the `RectorFormatter` service to be able to specify `--output-format sarif` with rector command. @@ -53,7 +53,7 @@ return RectorConfig::configure() ; ``` -**Step 2:** Then print the SARIF report +### :material-numeric-2-box: Then print the SARIF report ```shell vendor/bin/rector process --dry-run --output-format sarif --config /path/to/rector.php > .sarif.json diff --git a/docs/converter/twigcs-fixer.md b/docs/converter/twigcs-fixer.md index c7541bd..ba05e5d 100644 --- a/docs/converter/twigcs-fixer.md +++ b/docs/converter/twigcs-fixer.md @@ -60,7 +60,7 @@ To make your report human-readable, you have to specify the `\JSON_PRETTY_PRINT` Here is the way to do it ! -**Step 1:** Create your report specialized class : +#### :material-numeric-1-box: Create your report specialized class ```php