Skip to content

Commit

Permalink
fix converters doc
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Jul 28, 2024
1 parent e3374c8 commit bec8b26
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions docs/converter/phpcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ class MyPhpCsReport extends PhpCsReport
{
public function __construct()
{
// enable pretty print flag
parent::__construct(new PhpCsConverter(null, true));
}
parent::__construct(new PhpCsConverter(['format_output' => true]));
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/converter/phplint.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ vendor/bin/phplint --format=checkstyle --output=checkstyle.xml /path/to/source/c
**Step 2:** And finally, convert it to SARIF with the **Console Tool**

```shell
report-converter convert phplint --input-format=checkstyle --input-file=examples/phplint/checkstyle.xml -v
php report-converter convert phplint --input-format=checkstyle --input-file=examples/phplint/checkstyle.xml -v
```

> [!TIP]
Expand Down
2 changes: 1 addition & 1 deletion docs/converter/phpstan.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class MySarifFormatter extends PhpStanFormatter
{
public function __construct(bool $prettyPrint)
{
parent::__construct(new PhpStanConverter(null , $prettyPrint));
parent::__construct(new PhpStanConverter(['format_output' => $prettyPrint]));
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions docs/converter/twigcs-fixer.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ composer require --dev vincentlanglet/twig-cs-fixer bartlett/sarif-php-converter
## Usage

```shell
vendor/bin/twigcs-fixer lint /path/to/source --report sarif --config .twig-cs-fixer.dist.php
vendor/bin/twig-cs-fixer lint /path/to/source --report sarif --config .twig-cs-fixer.dist.php
```

> [!TIP]
Expand Down Expand Up @@ -85,7 +85,7 @@ class MyTwigCsFixerReporter extends TwigCsFixerReporter
**Step 2:** And finally, print the SARIF report

```shell
vendor/bin/twigcs-fixer lint /path/to/source --report sarif --config .twig-cs-fixer.php
vendor/bin/twig-cs-fixer lint /path/to/source --report sarif --config .twig-cs-fixer.php
```

> [!TIP]
Expand All @@ -99,7 +99,7 @@ If you prefer to convert from a [format supported natively][[twigcs-fixer-custom
**Step 1:** Build the checkstyle output report

```shell
vendor/bin/twigcs-fixer lint /path/to/source --report checkstyle
vendor/bin/twig-cs-fixer lint /path/to/source --report checkstyle
```

**Step 2:** And finally, convert it to SARIF with the **Console Tool**
Expand Down

0 comments on commit bec8b26

Please sign in to comment.