-
Notifications
You must be signed in to change notification settings - Fork 20
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 non-ignorable error handling feature #66
Conversation
e8bc44c
to
580f2f5
Compare
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.
Thanks for this contribution, could you please update CHANGELOG.md as well?
580f2f5
to
9a490f2
Compare
Yes, sure. What is the next version? Should be v2.1.0 right? |
9a490f2
to
b66491b
Compare
yes perfect |
@Spomky the CI is failing, could you please check it? |
b66491b
to
0641be9
Compare
Looks good on my side. I missed to verify the error implements all expected interfaces |
Extend the `BannedNodesRule` and `BannedUseTestRule` classes to support non-ignorable error handling. Introduced the `BannedNodesErrorBuilder` class to streamline error message construction and updated the configuration and tests accordingly.
0641be9
to
c3d6975
Compare
🎉. I am happy to contribute. |
Proposal for #65.
Instead of returning a list of strings, the extension now returns a RuleError object built using the RuleErrorBuilder.
Note that I am not familiar with PHPStan extension development and this PR is a very first attempt to solve the issue I created.
Please note that this PR also sets identifiers to the errors. They are namely:
bannedcode.function
bannedcode.expression
bannedcode.test
Let me know if these IDs are suitable or if you prefer to define others.