feat: filters api (#407)

* fix: stop execution after matching condition in RunAnalysis()

The commit fixes the issue where the RunAnalysis() function continues execution even after matching a condition. The fix ensures that the execution stops at the end of the corresponding if statement, improving the control flow and preventing unnecessary processing.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

* feat: include filters parameter in AnalyzeRequest initialization

The commit introduces a new feature where the filters parameter is included in the initialization of the AnalyzeRequest. This enhancement allows for more specific analysis by specifying filters during the analysis process.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
Matthis
2023-05-14 11:07:43 +02:00
committed by GitHub
parent ed73485d92
commit e5e613acee
4 changed files with 10 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ func (h *handler) Analyze(ctx context.Context, i *schemav1.AnalyzeRequest) (
config, err := analysis.NewAnalysis(
i.Backend,
i.Language,
[]string{},
i.Filters,
i.Namespace,
i.Nocache,
i.Explain,