Skip to content
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

Develop #2

Merged
merged 7 commits into from
Aug 8, 2022
Merged

Develop #2

merged 7 commits into from
Aug 8, 2022

Conversation

juampi92
Copy link
Owner

@juampi92 juampi92 commented Aug 8, 2022

No description provided.

juampi92 and others added 7 commits August 2, 2022 00:17
…hanges

== Check Interface ==
Instead of having one `run()` method, now we separated the getMatches with processMatch methods.

In a way, it's similar to PHPStan's Rule interface. getNodeTypes and processNodes.

The processMatch method returns an array of ViolationBuilder instances. If it returns an empty array, the match will not be counted as a violation.

The ViolationBuilder now changed. The identifier and file are not required. If they are not present, they will be added automatically by the CheckRunner. If they are present, they won't be changed.

== ViolationBuilder ==

The explanation is changed for `message` now. And the `build` method should not be called from the processMatch. It will be called from the CheckRunner, with the fallback identifier as the check name, and the fallback file as the match found initially.
@juampi92 juampi92 merged commit 3da508c into juampi92:main Aug 8, 2022
@juampi92 juampi92 deleted the develop branch August 8, 2022 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant