From 990c7e79b9799634a33e03c4ca2e92ac8cc674d5 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Thu, 24 Mar 2022 16:59:44 +0800 Subject: [PATCH] fix: add lost language config for cli app --- chapi-application/src/main/kotlin/chapi/app/cli/Chapi.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chapi-application/src/main/kotlin/chapi/app/cli/Chapi.kt b/chapi-application/src/main/kotlin/chapi/app/cli/Chapi.kt index 2cf8e261..8e933cde 100644 --- a/chapi-application/src/main/kotlin/chapi/app/cli/Chapi.kt +++ b/chapi-application/src/main/kotlin/chapi/app/cli/Chapi.kt @@ -2,6 +2,7 @@ package chapi.app.cli import chapi.app.analyser.ChapiAnalyser import chapi.app.analyser.TypeScriptAnalyserApp +import chapi.app.analyser.config.ChapiConfig import chapi.app.frontend.ContainerService import chapi.app.frontend.FrontendApiAnalyser import com.github.ajalt.clikt.core.CliktCommand @@ -14,9 +15,10 @@ import java.io.File class Ast : CliktCommand() { val path: String by option(help="the path to analysis").default(".") + val language: String by option(help="the path to analysis").default("java") override fun run() { - val results = ChapiAnalyser().analysis(path) + val results = ChapiAnalyser(ChapiConfig(language)).analysis(path) File("chapi.json").writeText(results.toList().toString()) } }