Skip to content

Commit

Permalink
Add support exclusion patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Jan 21, 2025
1 parent 50c173e commit d27fea4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>? by
option("--exclusion-patterns", help = "A pattern of files to exclude").multiple()
}

/**
Expand Down Expand Up @@ -134,5 +137,9 @@ fun buildConfig(
.topLevel(componentDir)
}

translationOptions.exclusionPatterns?.forEach {
builder = builder.exclusionPatterns(it)
}

return builder.build()
}

0 comments on commit d27fea4

Please sign in to comment.