Skip to content

Commit

Permalink
refactor: extract picker
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 20, 2023
1 parent d23c9e9 commit 6eaea43
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions unit-cli/src/main/kotlin/cc/unitmesh/runner/Picker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ private val logger = org.slf4j.LoggerFactory.getLogger(PickerCommand::class.java
fun main(args: Array<String>) = PickerCommand().main(args)

class PickerCommand : CliktCommand() {
val completionTypeSize by option(help = "Limit each CompletionType size").int().default(500)
private val completionTypeSize by option(help = "Limit each CompletionType size").int().default(500)
private val gitDepth by option(help = "Git depth").int().default(1)
private val maxCompletionInOneFile by option(help = "Max completion in one file").int().default(3)

override fun run() {
val outputDir = File("datasets" + File.separator + "origin")
Expand All @@ -40,8 +42,8 @@ class PickerCommand : CliktCommand() {
url = code.repository,
branch = code.branch,
language = code.language,
maxCompletionInOneFile = 3,
gitDepth = 1,
maxCompletionInOneFile = maxCompletionInOneFile,
gitDepth = gitDepth,
completionTypeSize = completionTypeSize
)

Expand Down

0 comments on commit 6eaea43

Please sign in to comment.