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

Short Circuit Analyzer Execution if all topics filtered out #140

Open
Noggog opened this issue Sep 27, 2024 · 2 comments
Open

Short Circuit Analyzer Execution if all topics filtered out #140

Noggog opened this issue Sep 27, 2024 · 2 comments
Labels
engine A feature for the analyzer engine itself

Comments

@Noggog
Copy link
Member

Noggog commented Sep 27, 2024

We have ISeverityLookup which can report the severity to be considered per topic. So maybe the engine can loop the topics in an analyzer and not run any that aren't applicable after the adjustment?

Can we do this filtering somehow ahead of a run at the time of config loading? Otherwise we'll be paying for this filtering on every analyzer execution, which is not great

@Noggog Noggog added the engine A feature for the analyzer engine itself label Sep 27, 2024
@Noggog Noggog changed the title Short Circuit Analyzer Execution if no topics enabled Short Circuit Analyzer Execution if all topics filtered out Sep 27, 2024
@Elscrux
Copy link
Member

Elscrux commented Nov 23, 2024

Probably needs to be part of the same abstraction for calling analyzers that's needed for #125

@Noggog
Copy link
Member Author

Noggog commented Nov 25, 2024

We can accomplish this just by adding a layer between the driver and the analyzers

public ContextualDriver(
    IContextualAnalyzer[] contextualAnalyzers,

Right now it's requesting them straightaway, but we could swap it for
IAnalyzerProvider<IContextualAnalyzer> analyzersProvider
where the implementation of that brings in all contextual analyzers + the config and filters them out for the driver

Driver remains naive. It just takes the list of analyzers and runs them. Something else does the filtering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine A feature for the analyzer engine itself
Projects
None yet
Development

No branches or pull requests

2 participants