-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v9.4] Add support to more output formats #208
Comments
Now, the major version 2.0 of SARIF PHP SDK is available, I'm focus to prepare the first release of This is the reason, why PHPLint SarifOutput code should be upgrade before apply any dependency constraint (reason why I've declined #209) |
FYI @overtrue : I've just pushed code on new branch In summary:
PS: see also examples https://github.com/overtrue/phplint/tree/9.4/examples/outputFormat |
it's OK 👍 |
FYI @overtrue : I've just tested upcoming PHPLint 9.4.0 with More details on how to use/print SARIF report with PHPLint may be found at https://github.com/llaville/sarif-php-converters/blob/1.0/docs/converter/phplint.md |
I should be able to publish the new version 9.4.0 stable (in state) later today. |
Here is an example of how to invoke PHPLint on command line, to print results in bin/phplint --format checkstyle -p meter --no-cache --format console --format '\Overtrue\PHPLint\Output\SarifOutput' --bootstrap /shared/backups/bartlett/sarif-php-converters/vendor/autoload.php -v Note
|
Available on official release 9.4.0 |
Summary
Simplify ability to add support to more formats
Context
Even if I consider SARIF as the futur of reporter solution, I must admit that PHP project leaders/maintainers are a little reluctant to set up this format, and prefer to implement
checkstyle
,junit
,codeclimate
... to reference only few of them.This is the reason why I've already provided a PHP binding solution https://github.com/llaville/sarif-php-sdk,, and I'm currently working on an improvement with upcoming version 2.0
My goal is to maintain all classes for PHP Linters and Static Code Analyser on a new package
bartlett/sarif-php-converters
and removed converters from base package packagebartlett/sarif-php-sdk
See Reference below
Description
Even, If I've already implemented a solution into PHPLint, I must admit that it's a bit hard, and current OutputFormat extension did not allow to add support to more format easily. This is the MAIN goal of this feature request !
Recently, I've look on PHP Insights source code (especially the
FormatResolver
component), and I like ability to load custom format (not predefined).BTW, it suffer from a problem that PHPLint has not : the bootstrapping option.
This is the main reason of new upcoming version 9.4.0 (/cc @overtrue)
Secondary goal is to simplify
OutputFormat
extension and respect the O (SRP) of SOLID principle.And last but not least, clean-up SARIF current implementation in PHPLint.
v9.4.0 will come after I've finished https://github.com/llaville/sarif-php-converters and release the first version 1.0 with sarif-php-sdk 2.0
FormatResolver source code
We will continue to support legacy options
--log-[*]
but we also add more genericReference
Here are officially what I will support
The text was updated successfully, but these errors were encountered: