[Scanner]: Introduce a Scanner class to handle file logic before checkers #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
Description:
Note
This is just a first draft! I am looking for active feedback on this, so we can develop this feature together. So before you open a new pull request with a slightly different version, feel free to write a review or suggestion here. I am more than open to accepting your suggestions on this topic!
This pull request adds a new Scanner class as introduced in #22 which handles the file scanning and then calls the checkers for each class.
In #22 it was proposed to also create the reflection in the scanner, in order to only have to create one reflection, which we then can process in multiple classes. However, at the moment we have one checker that checks the file's path and name and one checker that uses reflection.
I already had to add a function
supports()
in the Checker Interface to know when to call which checker.Important
At the moment the tests obviously fail, as I changed the interfaces and checkers so the initialization and tests are all messed up. Before fixing the test suite I would love to get your feedback to further develop this feature
Related: