-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Add excludes neon formatter #2523
Add excludes neon formatter #2523
Conversation
$formatter = new NeonExcludesErrorFormatter(); | ||
|
||
$this->assertSame($exitCode, $formatter->formatErrors( | ||
$this->getAnalysisResult($numFileErrors, $numGenericErrors), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe i should add different error messages with special characters like #, <, \, \n, 😃, ', ", \n
f38402a
to
d9fb7b6
Compare
a97e818
to
04c8b36
Compare
Thank you very much for this! I took this idea and improved on it a bit: I introduced And then improved your error formatter to actually generate the file with This is how a generated files looks like now: 2518159 I will release this feature as 0.11.17, I hope I'll find to write an article about this tomorrow. |
That's awesome. This looks much better than my version. |
Yes, it happened to me to and it was because Symfony output butchered some escaping around |
I released it and described in this article :) https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff |
Hi,
i have created a
NeonExcludes
Error Formatter to create a exludes.neon file. This file could be used as a baseline for a higher PHPStan level.We can upgrade to phpstan level max and create the excludes.neon file. This file should be included and the new code could be validated with the higher level.