From c9376ff63bebeb590d119b5dc834c798a1e166c6 Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Wed, 11 Dec 2024 16:00:40 +0100 Subject: [PATCH] Exposed exclusionPatterns as option --- .../de/fraunhofer/aisec/cpg_vis_neo4j/Application.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cpg-neo4j/src/main/kotlin/de/fraunhofer/aisec/cpg_vis_neo4j/Application.kt b/cpg-neo4j/src/main/kotlin/de/fraunhofer/aisec/cpg_vis_neo4j/Application.kt index bacea40c1b..a1ef85e5b6 100644 --- a/cpg-neo4j/src/main/kotlin/de/fraunhofer/aisec/cpg_vis_neo4j/Application.kt +++ b/cpg-neo4j/src/main/kotlin/de/fraunhofer/aisec/cpg_vis_neo4j/Application.kt @@ -252,6 +252,15 @@ class Application : Callable { ) private var topLevel: File? = null + @CommandLine.Option( + names = ["--exclusion-patterns"], + description = + [ + "Set top level directory of project structure. Default: Largest common path of all source files" + ] + ) + private var exclusionPatterns: List = listOf() + @CommandLine.Option( names = ["--benchmark-json"], description = ["Save benchmark results to json file"] @@ -450,6 +459,7 @@ class Application : Callable { .optionalLanguage("de.fraunhofer.aisec.cpg.frontends.jvm.JVMLanguage") .optionalLanguage("de.fraunhofer.aisec.cpg.frontends.ini.IniFileLanguage") .loadIncludes(loadIncludes) + .exclusionPatterns(*exclusionPatterns.toTypedArray()) .addIncludesToGraph(loadIncludes) .debugParser(DEBUG_PARSER) .useUnityBuild(useUnityBuild)