codyze icon indicating copy to clipboard operation
codyze copied to clipboard

Combine Only and Never Evaluator

Open CodingDepot opened this issue 8 months ago • 1 comments

The Only- and Never-Evaluators have a lot of overlap in their logic, which makes sense regarding their very similar purpose. However, this also causes them to use duplicated code to achieve the same result.

Furthermore, over time slight differences in the implementations emerged which makes it increasingly annoying to implement changes for both Evaluators. For example, the Only-Evalutor created a pass-Finding for each valid call while the Never-Evaluator did not. Combining both evaluators makes it more easy to keep the functionality synchronized while still allowing for smaller differences depending on the chosen functionality.

This PR also includes an example for a new functionality for both Evaluators. Each finding generated by a Never- or Only- Evaluator will now include usages of the code as relatedLocations.

CodingDepot avatar Jun 17 '24 09:06 CodingDepot