diff --git a/codyze-core/src/main/kotlin/de/fraunhofer/aisec/codyze/Project.kt b/codyze-core/src/main/kotlin/de/fraunhofer/aisec/codyze/Project.kt index 38fb31b192..c95c496d70 100644 --- a/codyze-core/src/main/kotlin/de/fraunhofer/aisec/codyze/Project.kt +++ b/codyze-core/src/main/kotlin/de/fraunhofer/aisec/codyze/Project.kt @@ -60,6 +60,9 @@ class TranslationOptions : OptionGroup("CPG Translation Options:") { "The components to analyze. They must be located inside the 'components' folder inside the project directory. The 'components' folder will be taken as the topLevel property for the translation configuration.", ) .multiple() + + val exclusionPatterns: List? by + option("--exclusion-patterns", help = "A pattern of files to exclude").multiple() } /** @@ -134,5 +137,9 @@ fun buildConfig( .topLevel(componentDir) } + translationOptions.exclusionPatterns?.forEach { + builder = builder.exclusionPatterns(it) + } + return builder.build() }