You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-o, --output=OUTPUT Generate an output to the specified path [default: "php://stdout"]
--format=FORMAT Format of the report [default: "console"]
And remove old --xml-ouptut option
Here are some use cases :
Console (default output)
No change because this is the default. (Option to write/redirect results to a file with --output option)
SARIF format
bin/phpmnd /path/to/source --format SarifPrinter
source code
<?phprequire_once'/path/to/autoload.php';
class SarifPrinter extends \Bartlett\Sarif\Converter\PhpMndConverter
{
}
Note
no implemention here because I propose to add support to my project as I did since release 1.2.0 for at least 3 other PHP linters : PHPCS, PHPLint, PHPStan
Hello,
As author of the SARIF PHP binding solution https://github.com/llaville/sarif-php-sdk I would like to propose a SARIF support.
For audience that don't know yet what is SARIF (Static Analysis Results Interchange Format), I suggest to read :
But my proposal is not limited to SARIF. With it we could add support to other formats not yet supported.
That will include, for example :
And whatever else we will need !
Now that introduction is opened, here is in details my proposal !
A
Povils\PHPMND\Printer\Custom
class that implements the standardPovils\PHPMND\Printer\Printer
contractand inspired by https://github.com/phpmd/phpmd/blob/2.15.0/src/main/php/PHPMD/TextUI/CommandLineOptions.php#L780
CLI options will be only :
And remove old
--xml-ouptut
optionHere are some use cases :
Console (default output)
No change because this is the default. (Option to write/redirect results to a file with
--output
option)SARIF format
source code
Note
no implemention here because I propose to add support to my project as I did since release 1.2.0 for at least 3 other PHP linters : PHPCS, PHPLint, PHPStan
Checkstyle format
Now a version of CheckStyle implementation we can have :
source code
I'll propose a POC PR (not optimized, because we can do better, but essential are available) and link to this feature request just after.
The text was updated successfully, but these errors were encountered: